As a ( very ) newcomer, I have trouble getting tcp binding working. I have a GPIO ( Pi )installed and working but I would like to output command to an ip gateway connected directly to my Luxom domotic system.
I need to be able to output true ASCII sequences like :" *S,0,2,01; " in order to switch a specific light ON or " *C,0,2,01; " to have it switched OFF.
Can someone give me a idea about the lines I need to properly insert into the OpeHAB demo files to start having tcp binding working ?
I have performed numerous tests but I still have a lot of problem. I am trying to understand the basic logic in order to go step by step.
TCP connection is ok and I have seen that when I send a command “*T,0,2,01;” to turn a light ON when it is OFF like a Toggle ( there is in fact no trailing blanks and every command start with an " * " and ends uip with a " ; " ), I see no reaction on the light but the message is well passed on the bus as I get an answer from my LUXOM system as " @1T,0,2,01;@1S,0,2,01 ". @1 seems to be taken as an answer from the system but what heart me at the moment is that the LUXOM system doesn’t react at all trun the light ON.
I still have to play with my system before getting a clear picture of what happen but the main error, since the start of the system, is something like :
tractSocketChannelBinding] - The channel for /192.168.0.25:2300 is now connected 2016-01-13 05:36:09.078 [ERROR] [t.i.s.MapTransformationService] - opening file ‘garden.luxom.map)’], >[OFF:192.168.0.25:2300:‘MAP(garden.luxom.map’ throws exception java.io.FileNotFoundException: configurations\transform\garden.luxom.map)’], >[OFF:192.168.0.25:2300:'MAP(garden.luxom.map (The filename, directory name, or volume label syntax is incorrect)
rule "Initialize knxer"
rule "Light 1 Control"
Item Light_win received command
sendCommand( cmdKNXER, "<knx>CMD=WR;GA=4/0/10;VAL=01;DLEN=0</knx>" )
sendCommand( cmdKNXER, "<knx>CMD=WR;GA=4/0/10;VAL=00;DLEN=0</knx>" )
NOTE: I have a personalized connection to KNX, whick I call KNXer. I use raspberrypi2 or beagle bone black with KNX stack written by me, together with a socket connection and a tcp protocol defined by me; that being the reason why I’m playing with TCP binding.
I didn’t test the “input mode” because in my topology openHab is the “client” of my “server” application KNXer.
Also I couldn’t figure out how to, with .map, take feedbacks. In my case the On and Off state comes via different frame. The hypotetical code of the .map would be:
My system is now working perfectly with Domoticz. It could also be working with OpenHAB but I have not yet had time enough to make the transfer ( time to write all configuration files ).
I have tried with some bindings but without true success. What I am now using is a MQTT server between Domoticz and Luxom. As such, I have also added 1-wire temperature sensors and switches. I also have HUE lights and Arduino based water flow sensors and everything is working smoothly. OpenVPN let me do everything remote.
As soon as time will permit, I am planning to go back to OpenHAB in order to have more flexibilities.
Picture below shows part of the system but pictures could be improved … Time !
Not correct. It is not that it’s obsolete and not to be used s much as it’s going to become obsolete. It won’t be supported by OH 3. However, there is not yet a replacement that will work on OH 3 so there might be a temporarily loss of support for TCP when OH 3 first comes out in a year. It won’t be a complete loss of support as there will be a way to run a stripped down OH 1/2 instance that supports OH 1 bindings and communicate with the OH 3 instance.
MQTT isn’t a work around, it’s an alternative. MQTT itself works over TCP. But it works at a much higher level which means it’s much easier to work with.
There isn’t enough detail above but I suspect Luc has a Luxom to MQTT gateway of some sort. I doubt Luxom uses MQTT natively.