Some tips to develop a hardware plugin (visonic receiver)
Posted: Sunday 22 November 2015 22:13
Hi,
Just wondering if someone could give me a few hints to start to develop a hardware plugin. I know it's to much work to explain the whole procedure, but I could at least start to try to understand an already existing hardware plugin that's able to read ASCII output of a device. Which plugin is good example to start with, is that maybe the P1Meter plugin? Which cpp file is the correct file to read, maybe P1MeterBase.cpp? Any other tips that are helpful to get me started?
The hardware I'm trying to develop for is a Alphatronic Visonic Wireless Interface (868,95 Mhz), it can receive signals from a Visonic alarm sensors. The device is connected to a raspberry via a serial to USB PL2303 interface. The output of the device is pretty simple, as is visible below, just plain vanilla ASCII output each time a response is received from one the sensors. In addition, the format is always the same.
Each response from a sensor can be transcoded as follows:
- P is message from a powercode sensor, K is from a keyfob
- the 8 numbers is an unique identifier for each sensor
- then bit 7 and 6 are never used (always a dot)
- bit 5, s, supervision messages
- bit 4, r, restore, e.g when a door sensor is put back on normal state (door closes)
- bit 3, low battery, when a B is displayed the battery power it to low
- bit 2, supervision, T a supervision timer
- bit 1, Alarm, when A a sensor is activated, PIR or door sensor
- bit 0, Sabotage, when S a sensor is opened
- @123, signal strength (a value between 20 and 130, 30 is weak but acceptable, 90 and above is a strong signal.
Output from my raspberry below....
pi@raspberrypi /dev $ screen ttyUSB0
#P14933113:..s.T...@060
#P14933113:..s.T...@061
#P10100117:..sR....@058
#P10100117:..sR....@058
#P13865205:..s.T...@106
#P13865205:..s.T...@106
#P08776324:..sRT...@013
#P08776324:..sRT...@014
#P08776404:..sRT...@059
#P08776404:..sRT...@058
#P13850765:..s.T...@016
#P13850765:..s.T...@016
#P13865290:..s.T...@103
#P13865290:..s.T...@103
#P14933170:..s.T...@028
#P14933158:..s..B..@029
#P14933158:..s..B..@030
#P14933166:..s.T...@035
#P14933153:..s.T...@037
#P07553292:..s.T...@080
#P07553292:..s.T...@080
#P07738788:..sRT...@064
#P07738788:..sRT...@063
Just wondering if someone could give me a few hints to start to develop a hardware plugin. I know it's to much work to explain the whole procedure, but I could at least start to try to understand an already existing hardware plugin that's able to read ASCII output of a device. Which plugin is good example to start with, is that maybe the P1Meter plugin? Which cpp file is the correct file to read, maybe P1MeterBase.cpp? Any other tips that are helpful to get me started?
The hardware I'm trying to develop for is a Alphatronic Visonic Wireless Interface (868,95 Mhz), it can receive signals from a Visonic alarm sensors. The device is connected to a raspberry via a serial to USB PL2303 interface. The output of the device is pretty simple, as is visible below, just plain vanilla ASCII output each time a response is received from one the sensors. In addition, the format is always the same.
Each response from a sensor can be transcoded as follows:
- P is message from a powercode sensor, K is from a keyfob
- the 8 numbers is an unique identifier for each sensor
- then bit 7 and 6 are never used (always a dot)
- bit 5, s, supervision messages
- bit 4, r, restore, e.g when a door sensor is put back on normal state (door closes)
- bit 3, low battery, when a B is displayed the battery power it to low
- bit 2, supervision, T a supervision timer
- bit 1, Alarm, when A a sensor is activated, PIR or door sensor
- bit 0, Sabotage, when S a sensor is opened
- @123, signal strength (a value between 20 and 130, 30 is weak but acceptable, 90 and above is a strong signal.
Output from my raspberry below....
pi@raspberrypi /dev $ screen ttyUSB0
#P14933113:..s.T...@060
#P14933113:..s.T...@061
#P10100117:..sR....@058
#P10100117:..sR....@058
#P13865205:..s.T...@106
#P13865205:..s.T...@106
#P08776324:..sRT...@013
#P08776324:..sRT...@014
#P08776404:..sRT...@059
#P08776404:..sRT...@058
#P13850765:..s.T...@016
#P13850765:..s.T...@016
#P13865290:..s.T...@103
#P13865290:..s.T...@103
#P14933170:..s.T...@028
#P14933158:..s..B..@029
#P14933158:..s..B..@030
#P14933166:..s.T...@035
#P14933153:..s.T...@037
#P07553292:..s.T...@080
#P07553292:..s.T...@080
#P07738788:..sRT...@064
#P07738788:..sRT...@063