@masmat I did a test with the following configuration:
-
Raspberry Pi 1 with Raspbian (2017-11-29-raspbian-stretch-lite)
pi@raspberrypi:~/MySensors $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.1 (stretch)
Release: 9.1
Codename: stretch
-
MySensors master branch - Protocol version - 2.2.0
./configure --my-transport=nrf24 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=m ygateway1 --my-mqtt-user=rpi --my-mqtt-password=password
-
Mosquitto version 1.4.10 (build date Fri, 22 Dec 2017 08:19:25 +0000) [installed from apt-get]
pi@raspberrypi:~/MySensors $ cat /etc/mosquitto/mosquitto.conf
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
allow_anonymous false
password_file /etc/mosquitto/passwordfile
include_dir /etc/mosquitto/conf.d
Added the mosquitto user (user=rpi, password=password) with:
sudo mosquitto_passwd -c /etc/mosquitto/passwordfile rpi
It didn't show any error to connect to the MQTT broker:
pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw -d
mysgw: Starting gateway...
mysgw: Protocol version - 2.2.0
mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0
mysgw: TSF:LRT:OK
mysgw: TSM:INIT
mysgw: TSF:WUR:MS=0
mysgw: TSM:INIT:TSP OK
mysgw: TSM:INIT:GW MODE
mysgw: TSM:READY:ID=0,PAR=0,DIS=0
mysgw: MCO:REG:NOT NEEDED
mysgw: MCO:BGN:STP
mysgw: MCO:BGN:INIT OK,TSP=1
mysgw: GWT:RMQ:MQTT RECONNECT
mysgw: connected to 127.0.0.1
mysgw: GWT:RMQ:MQTT CONNECTED
mysgw: GWT:TPS:TOPIC=mysensors-out/0/255/0/0/18,MSG SENT
mysgw: TSF:MSG:READ,5-5-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
mysgw: TSF:MSG:PINGED,ID=5,HP=1
mysgw: TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
mysgw: TSF:MSG:READ,5-5-0,s=255,c=3,t=32,pt=5,l=4,sg=0:500
mysgw: GWT:TPS:TOPIC=mysensors-out/5/255/3/0/32,MSG SENT
mysgw: TSF:MSG:READ,5-5-0,s=255,c=3,t=33,pt=5,l=4,sg=0:4951
mysgw: GWT:TPS:TOPIC=mysensors-out/5/255/3/0/33,MSG SENT
mysgw: TSF:MSG:READ,5-5-0,s=1,c=1,t=37,pt=4,l=4,sg=0:36053
mysgw: GWT:TPS:TOPIC=mysensors-out/5/1/1/0/37,MSG SENT
mysgw: TSF:MSG:READ,5-5-0,s=255,c=3,t=32,pt=5,l=4,sg=0:500
mysgw: GWT:TPS:TOPIC=mysensors-out/5/255/3/0/32,MSG SENT
mysgw: TSF:MSG:READ,5-5-0,s=255,c=3,t=33,pt=5,l=4,sg=0:5000
mysgw: GWT:TPS:TOPIC=mysensors-out/5/255/3/0/33,MSG SENT
mysgw: TSF:MSG:READ,5-5-0,s=1,c=1,t=37,pt=4,l=4,sg=0:36055
mysgw: GWT:TPS:TOPIC=mysensors-out/5/1/1/0/37,MSG SENT
mysgw: TSF:MSG:READ,5-5-0,s=255,c=3,t=32,pt=5,l=4,sg=0:500
mysgw: GWT:TPS:TOPIC=mysensors-out/5/255/3/0/32,MSG SENT
mysgw: TSF:MSG:READ,5-5-0,s=255,c=3,t=33,pt=5,l=4,sg=0:5000
mysgw: GWT:TPS:TOPIC=mysensors-out/5/255/3/0/33,MSG SENT
mysgw: TSF:MSG:READ,5-5-0,s=1,c=1,t=37,pt=4,l=4,sg=0:36055
mysgw: GWT:TPS:TOPIC=mysensors-out/5/1/1/0/37,MSG SENT