org.openhab.binding.rflink
org.openhab.binding.rflink copied to clipboard
Admin tools
As discussed in the issue cyrilcc#39 : https://github.com/cyrilcc/org.openhab.binding.rflink/issues/39 (see here : https://github.com/cyrilcc/org.openhab.binding.rflink/issues/39#issuecomment-457688437 ) The plugin actually lacks of a kind of "raw message", allowing the user to send a specific handmade command straight to the bridge without any link to an existing item (RTS, Energy, Wind, Switch, whatever...)
This would be very interesting to :
- test devices
- admin the RfLink bridge : pair elements, reboot the bridge, etc.
- simulate event reception from a fictive device (using the "echo" command)
Regarding the "specifications" :
I just added a RawData channel on the bridge, taking a StringType as input.
NOTE : to see it within PaperUI, you will need to delete the existing bridge instance and recreate it.
This channel enables the user to send any String command to the bridge.
Beware : the message must be compliant with the RfLink specifications available here : http://www.rflink.nl/blog2/protref
It works also from PaperUI without any requirement.
The logs shows the event has been processed by the plugin, sent to the bridge, and the result was received as expected :
2019-02-18 22:38:05.982 [DEBUG] [.r.handler.RfLinkBridgeHandler:193 ] - sendMessage: Raw data = 10;PING;, Seq number = 0, Device name = null, Device ID = null 2019-02-18 22:38:05.982 [DEBUG] [.r.handler.RfLinkBridgeHandler:79 ] - Transmitting message 'Raw data = 10;PING;, Seq number = 0, Device name = null, Device ID = null' 2019-02-18 22:38:05.988 [DEBUG] [.o.b.r.c.RfLinkSerialConnector:163 ] - Send data (after 0ms, len=9): 31303B50494E473B0A 2019-02-18 22:38:05.989 [DEBUG] [.s.c.t.i.p.ProfileCallbackImpl:101 ] - Delegating update '10;PING;' for item 'rflink_bridge_RfLinkUSB_rawdata' to handler for channel 'rflink:bridge:RfLinkUSB:rawdata' 2019-02-18 22:38:05.989 [DEBUG] [.s.c.i.c.InvocationHandlerSync:55 ] - Already in a safe-call context, executing 'ThingHandler.handleUpdate()' directly on 'org.openhab.binding.rflink.handler.RfLinkBridgeHandler@52d43a43'. 2019-02-18 22:38:06.023 [DEBUG] [.o.b.r.c.RfLinkSerialConnector:222 ] - <<< 20;01;PONG; 2019-02-18 22:38:06.023 [DEBUG] [.r.handler.RfLinkBridgeHandler:221 ] - Message not supported, data: 20;01;PONG; 2019-02-18 22:38:06.024 [INFO ] [ome.event.ThingStatusInfoEvent:53 ] - 'rflink:bridge:RfLinkUSB' updated: ONLINE
it is available in the last build on my fork. I also updated the README.md to reflect these changes.