N00b + MQTT gw + openHAB2
-
I use MQTT and Openhab2 - I find it more flexible then the Ethernet GW but yes you need to have a good understanding on all systems I suppose.
Somethings to note
- MySensors binding doesn't support MQTT gateway as far as I know, you need to use the MQTT binding and configure your OH items accordingly.
- MySensors binding is in the IOT market place and not openhab-addons
- You'll need to assign node ID to your nodes manually.
Not entirely sure what your problem is here but don't think you've got all the right pieces for the puzzle yet.
-
@Qu3Uk I remember that Mysensors binding works both ethernet and MQTT, but anyway ethernet is the best solution for beginners because you can use myscontroller to debug messages while connected to controller.
-
@Qu3Uk I remember that Mysensors binding works both ethernet and MQTT, but anyway ethernet is the best solution for beginners because you can use myscontroller to debug messages while connected to controller.
@gohan said in N00b + MQTT gw + openHAB2:
but anyway ethernet is the best solution for beginners because you can use myscontroller to debug messages while connected to controller.
With MQTT you can also debug using MQTT-Spy or MQTTLens or various other MQTT apps.
MQTT is easy in interconnecting various systems without they have to know about each-other.
As long as you have a MQTT broker (RabbitMQ, Mosquitto, ActiveMQ, ...) you're all set.
In OpenHab in conf/services create a file called mqtt.cfg, and past the following:
mqtt:broker.url=tcp://ip-address-of-mqttbroker:1883 mqtt:broker.clientId=openhab mqtt:broker.retain=true mqtt:broker.async=falseThen in your items file you can do:
Switch Light_GV_Hall "Ceiling" (GV_Hall, Lights) {mqtt=">[broker:myhome/room/switch1:command:ON:1],>[broker:myhome/room/switch1:command:OFF:0],<[broker:myhome/room/switch1:state:ON:1],<[broker:myhome/room/switch1:state:OFF:0"}And now you can turn on/off the light from OpenHab as wel as from any other device that publishes to the same toppic (yes, even from MQTT-Spy and MQTTLens)
-
@gohan said in N00b + MQTT gw + openHAB2:
but anyway ethernet is the best solution for beginners because you can use myscontroller to debug messages while connected to controller.
With MQTT you can also debug using MQTT-Spy or MQTTLens or various other MQTT apps.
MQTT is easy in interconnecting various systems without they have to know about each-other.
As long as you have a MQTT broker (RabbitMQ, Mosquitto, ActiveMQ, ...) you're all set.
In OpenHab in conf/services create a file called mqtt.cfg, and past the following:
mqtt:broker.url=tcp://ip-address-of-mqttbroker:1883 mqtt:broker.clientId=openhab mqtt:broker.retain=true mqtt:broker.async=falseThen in your items file you can do:
Switch Light_GV_Hall "Ceiling" (GV_Hall, Lights) {mqtt=">[broker:myhome/room/switch1:command:ON:1],>[broker:myhome/room/switch1:command:OFF:0],<[broker:myhome/room/switch1:state:ON:1],<[broker:myhome/room/switch1:state:OFF:0"}And now you can turn on/off the light from OpenHab as wel as from any other device that publishes to the same toppic (yes, even from MQTT-Spy and MQTTLens)
-
Update.
After much trying the Ethernet gw would not connect to Domoticz.
Then, tried my mqtt sketch again and presto! I have connection AND I can control the two relays on board the mqtt-gw.
Had a cold one...or four!
Thanks for the recommendations and help. I'm sure I will need more later on. Now I'm going to explore the Domoticz forum for answers.
Unless someone with the same setup can tell me why the lights are crossed (on = off in reality and off=light on)?