Domoticz now supports the MySensors MQTT Gateway
-
Hey, I've been trying for a few weeks now to get Domoticz to talk to MQTT GW. Without success. It connects to the RPI 2 B directly. If you look in the log for mosquitto it will connect there. Sometimes I get socket error and disconnects. But no connection to Domoticz.
What are I doing wrong? Have reinstalled the software at RPI 2 B many times without any difference.
Log mosquitto
Insert Code Here ```1484960555: New connection from 192.168.0.178 on port 1883. 1484960555: New client connected from 192.168.0.178 as mysensors-1 (c1, k15). 1484960921: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484961568: Client mysensors-1 has exceeded timeout, disconnecting. 1484961568: Socket error on client mysensors-1, disconnecting. 1484962722: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484964523: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484966324: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484968125: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484969926: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484971727: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484973528: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484975329: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484977130: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484978931: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484980732: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484982533: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484984334: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484986135: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484987936: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484989737: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484990881: New connection from 192.168.0.178 on port 1883. 1484990881: New client connected from 192.168.0.178 as mysensors-1 (c1, k15). 1484990917: Socket error on client mysensors-1, disconnecting.And W5100 GW log
Insert Code Here 0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0 0;255;3;0;9;TSM:INIT 0;255;3;0;9;TSF:WUR:MS=0 0;255;3;0;9;TSM:INIT:TSP OK 0;255;3;0;9;TSM:INIT:GW MODE 0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0 0;255;3;0;9;MCO:REG:NOT NEEDED IP: 192.168.0.178 0;255;3;0;9;MCO:BGN:STP 0;255;3;0;9;MCO:BGN:INIT OK,TSP=1 IP: 192.168.0.178 0;255;3;0;9;Attempting MQTT connection... 0;255;3;0;9;MQTT connected 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/0/255/0/0/18 0;255;3;0;9;TSF:MSG:READ,21-21-0,s=1,c=1,t=0,pt=7,l=5,sg=0:14.0 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/21/1/1/0/0 0;255;3;0;9;TSF:MSG:READ,21-21-0,s=0,c=1,t=1,pt=7,l=5,sg=0:40.0 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/21/0/1/0/1 And Domoticz LogDomoticz Log
2017-01-21 09:38:08.641 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 09:47:34.718 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 09:49:40.736 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 09:59:06.819 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:01:12.836 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:10:39.914 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:12:45.932 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:22:12.010 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:24:18.028 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:33:44.106 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:35:50.124 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:41:40.606 MQTT: Connecting to 192.168.0.178:1883 2017-01-21 10:43:47.836 Error: MQTT: Failed to start, return code: 14 (Check IP/Port)```//Mattias
-
Hey, I've been trying for a few weeks now to get Domoticz to talk to MQTT GW. Without success. It connects to the RPI 2 B directly. If you look in the log for mosquitto it will connect there. Sometimes I get socket error and disconnects. But no connection to Domoticz.
What are I doing wrong? Have reinstalled the software at RPI 2 B many times without any difference.
Log mosquitto
Insert Code Here ```1484960555: New connection from 192.168.0.178 on port 1883. 1484960555: New client connected from 192.168.0.178 as mysensors-1 (c1, k15). 1484960921: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484961568: Client mysensors-1 has exceeded timeout, disconnecting. 1484961568: Socket error on client mysensors-1, disconnecting. 1484962722: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484964523: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484966324: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484968125: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484969926: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484971727: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484973528: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484975329: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484977130: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484978931: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484980732: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484982533: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484984334: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484986135: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484987936: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484989737: Saving in-memory database to /var/lib/mosquitto/mosquitto.db. 1484990881: New connection from 192.168.0.178 on port 1883. 1484990881: New client connected from 192.168.0.178 as mysensors-1 (c1, k15). 1484990917: Socket error on client mysensors-1, disconnecting.And W5100 GW log
Insert Code Here 0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0 0;255;3;0;9;TSM:INIT 0;255;3;0;9;TSF:WUR:MS=0 0;255;3;0;9;TSM:INIT:TSP OK 0;255;3;0;9;TSM:INIT:GW MODE 0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0 0;255;3;0;9;MCO:REG:NOT NEEDED IP: 192.168.0.178 0;255;3;0;9;MCO:BGN:STP 0;255;3;0;9;MCO:BGN:INIT OK,TSP=1 IP: 192.168.0.178 0;255;3;0;9;Attempting MQTT connection... 0;255;3;0;9;MQTT connected 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/0/255/0/0/18 0;255;3;0;9;TSF:MSG:READ,21-21-0,s=1,c=1,t=0,pt=7,l=5,sg=0:14.0 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/21/1/1/0/0 0;255;3;0;9;TSF:MSG:READ,21-21-0,s=0,c=1,t=1,pt=7,l=5,sg=0:40.0 0;255;3;0;9;Sending message on topic: domoticz/in/MyMQTT/21/0/1/0/1 And Domoticz LogDomoticz Log
2017-01-21 09:38:08.641 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 09:47:34.718 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 09:49:40.736 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 09:59:06.819 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:01:12.836 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:10:39.914 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:12:45.932 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:22:12.010 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:24:18.028 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:33:44.106 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:35:50.124 (MySensors Lan) Temp + Humidity (TempHumSrum) 2017-01-21 10:41:40.606 MQTT: Connecting to 192.168.0.178:1883 2017-01-21 10:43:47.836 Error: MQTT: Failed to start, return code: 14 (Check IP/Port)```//Mattias
@MLs In your Domoticz log I see messages with the format "MySensors Lan". Have you chosen correctly the new MySensors MQTT Type in Domoticz? You should see "MySensorsMQTT" messages in the log. This new hardware choice is only available through the new Domoticz Beta version, for the moment.
Hardware setup screen:

Select "MySensors gateway with MQTT interface." Add the Mosquitto IP address and Port address 1883. It is recommended to first clear the cache in your web browser. Otherwise the screen in your browser sometimes fails to show the new fields correctly.
I would as well recommend to install an MQTT debugging software. Personally I'm using MQTT-Spy. It's a java application, easy to install on e.g. a PC, connected to the same WiFi network, to listen to your MQTT traffic remotely what's going through your Mosquitto broker in your RPI. Then there's no need to connect to the nodes, gateways or RPI when checking the mqtt events.
-
Yes, i have lan to because I have several GW.

And I turn them off when I do not try to solve the problem to reduce the log in Domoticz.
I'll try a MQTT debugging software.But I think my problem lies in the software at RPI 2 B. Thus, communication between MQTT and Domoticz.
//Mattias
-
Yes, i have lan to because I have several GW.

And I turn them off when I do not try to solve the problem to reduce the log in Domoticz.
I'll try a MQTT debugging software.But I think my problem lies in the software at RPI 2 B. Thus, communication between MQTT and Domoticz.
//Mattias
-
I'm running mysensors mqtt gateway on rpi3, it is publishing to the topic specified in the domoticz configuration guide, I can see the messages being published in mqtt but nothing is showing up in domoticz; looking at the log I can only see the controller connecting without errors ; if I publish data to a dummy sensor as described in the guide it works, so there must be something wrong in the processing of the mysensors messages. Any ideas where to look?
-
I'm running mysensors mqtt gateway on rpi3, it is publishing to the topic specified in the domoticz configuration guide, I can see the messages being published in mqtt but nothing is showing up in domoticz; looking at the log I can only see the controller connecting without errors ; if I publish data to a dummy sensor as described in the guide it works, so there must be something wrong in the processing of the mysensors messages. Any ideas where to look?
@gohan
Unlike ordinary MQTT gateway that deals with messages to/from all devices, Mysensors MQTT Gateway will only publish messages to the sensors created VIA itself. So, just creating a dummy sensor in Domoticz will not work.
You have to create a virtual node by publishing to domotinz/in/MyMQTT
For example (based on Serial API example): domoticz/in/MyMQTT/12/6/0/0/3/"My Light""MyLight" is a payload
This will create a virtual node #12, child #6. Create a switch based on the node.
THEN you can monitor the node, by monitoring domoticz/out/MyMQTT/12/6/1/0/2/
it will publish "1" or "0"
-
I am trying to follow the guide -> https://www.domoticz.com/wiki/MySensors#Configuring_Domoticz_to_use_the_MQTT-gateway but actually I am now noticing that is missing the device type "MySensors Gateway with MQTT interface" and in fact I mistakenly added the normal MQTT Client gateway.... I wonder why it has been removed...
-
I am trying to follow the guide -> https://www.domoticz.com/wiki/MySensors#Configuring_Domoticz_to_use_the_MQTT-gateway but actually I am now noticing that is missing the device type "MySensors Gateway with MQTT interface" and in fact I mistakenly added the normal MQTT Client gateway.... I wonder why it has been removed...
-
@gohan the guide was created long time ago, while Mysensors MQTT gateway was added in December