[Question] Make device supervised by panel #279
Replies: 6 comments 4 replies
-
Hi @Alviunta - this should be possible, I've considered it previously but it's been lower priority as I haven't seen requests for this feature (until yours) and it would use additional resources on the microcontrollers (mostly an issue for Arduino). As you mentioned it would be a matter of deciding which type of module to emulate and then decode the Keybus signaling for it. Emulating a keypad should be straightforward since the 0x11 command is decoded.
This would be great! Getting more of the Keybus decoded is always a goal for this library.
I haven't seen data for the PC5400 printer module, logs from the
This thread on AVRFreaks is where I first came across folks decoding the Keybus protocol. The dscKeybusPrintData.cpp file documents the parts of the protocol that are currently decoded.
No apologies needed, your post was very clear! Thanks, |
Beta Was this translation helpful? Give feedback.
-
Supervision is definitively doable but in my opinion is not really a useful addition since when you think about it, the main idea of this library is to monitor and control the alarm system and not the reverse so having the alarm system monitor the keypad emulation seems unecessary. Of course, I could be missing a scenario. Anyhow, I did implement supervision with my expander board emulation version of this library. The firmware fully allowed the emulated expander boards to be supervised. I did not supervise the keypad since i found it unecessary but it would simply have needed the addition of setting a predefined unused slot as you noted. You need to be able to respond to the cmd 11 directly in the ISR routine to send back the slot info. Here's a link to the branch where you can view the implementation. https://github.com/taligentx/dscKeybusInterface/blob/expander/src/dscKeybusInterface.cpp In my own version , I don't bother activating the supervision as I found it to be just very annoying since during testing/development needed the restart of the chip and the panel would always scream that a device is missing at that time! Nikhil is correct in noting that it will impact resource use on lower ram devices so would need to be a #define to limit this function to more powerful devices. I am rewriting the expander version to be more modular and fit better within the new structure of Nikhil's library. |
Beta Was this translation helpful? Give feedback.
-
Hi Alain, this is great to hear, integrating your expander code has been on my TODO list for too long but hopefully with the new structure it'll be easier to include different functionalities while keeping lower resource utilization for more basic uses. I'm also looking at making writes to the panel more modular, the current code is based on writing as a keypad, but I think things like responding to supervision and emulating DSC modules could use a better structure. |
Beta Was this translation helpful? Give feedback.
-
I agree Nikhil. A structure change would be benificial to allow these external components to be modular and to be able to enable/disable them easily. I've encountered some low IRAM issues with the ESP8266 when combined with the ESPHOME library which needed compile time defines to turn off the expander portion when not needed. I'll wait to see what you come up with before working on recoding my end. One critical improvment will be to optimize IRAM useage. |
Beta Was this translation helpful? Give feedback.
-
I recently made my own interface using this library and made a bunch of config changes to my panel. I have a "Module Supervision" trouble and I was wondering if it might be the arduino module being wrongly "identified" by the panel and triggering the trouble. I'm looking for confirmation that this library does not implement a concept of supervised module and thus could not be the cause of the "module supervision" trouble I am having. |
Beta Was this translation helpful? Give feedback.
-
Adding supervision (assigning ESP as keypad slot) capability could be useful when using it with SMS-GSM or telegram/push examples - so when ESP goes offline/stuck you will get trouble light and know that there's something wrong with standalone ESP notifier and wouldn't get notified if alarm occurs. |
Beta Was this translation helpful? Give feedback.
-
Great job!
Does anyone know if it is possible to get the panel to monitor the arduino connection?
As far as I understand, the modules are supervised by the panels through the code 0x11 (module supervision query) to which each module places a series of bits at a specific time to indicate presence and connection, so if a module is disconnected it is disconnected you can see this directly on the keypad.
As the panel can support up to 8 keypads, perhaps a slot could be used to monitor the aruino connection and ensure that it is working at all times. I tried to use panelData [0] == 0x11 and a timer to write 00 in the KeyPad 2 slot (slot 8 was already in use) but it didn't work out as expected and the panel showed a module error, I don't know if any other is necessary type of interaction with the panel.
I have a series of modules that can be of help to try to decipher more information and achieve what I am proposing, as soon as I have more time I will get to work on it:
On the other hand, I have seen third-party IP communicators that connect to the KeyBus and wrap themselves in the printer slot (I suppose to explicitly obtain all the information or something like that). Does anyone have information on this? Perhaps this could make things easier for the future. If I get a module that works like this, I will gladly share what I find.
Is there any documentation on how the KeyBus protocol works? I looked in many places but I could find little, if someone can give me help I would be grateful.
I apologize for my bad English (Google Translate did most of the work) and I hope someone can help me!
Beta Was this translation helpful? Give feedback.
All reactions