Well, it's still failing.
I'm using the current version 5.1 of the Mosquitto broker add-on to Home Assistant. In the configuration page I have this:
logins:
- username: myOutdoorGateway
password: outdoorPassword
- username: myIndoorGateway
password: indoorPassword
anonymous: false
customize:
active: false
folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false
In the configuration.yaml file I have this:
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
# base_url: example.duckdns.org:8123
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
mqtt:
broker: 172.17.0.1
mysensors:
gateways:
- device: mqtt
persistence_file: 'mysensors/myoutdoorsensors.json'
topic_in_prefix: 'myOutdoorGateway-out'
topic_out_prefix: 'myOutdoorGateway-in'
- device: mqtt
persistence_file: 'mysensors/myindoorsensors.json'
topic_in_prefix: 'myIndoorGateway-out'
topic_out_prefix: 'myIndoorGateway-in'
optimistic: false
persistence: true
retain: false
version: '2.3'
homeassistant:
customize: !include customize.yaml
Both of the json files are there in the mysensors folder, but they are just empty.
I compiled the two gateways with:
./configure --my-transport=rf24 --my-rf24-irq-pin=33 --my-rf24-ce-pin=37 --my-rf24-cs-pin=36 --spi-spidev-device=/dev/spidev1.0 --spi-driver=SPIDEV --my-gateway=mqtt --my-controller-ip-address=192.168.0.49 --my-mqtt-publish-topic-prefix=myIndoorGateway-out --my-mqtt-subscribe-topic-prefix=myIndoorGateway-in --my-mqtt-client-id=myIndoorGateway --my-leds-err-pin=29 --my-leds-rx-pin=31 --my-leds-tx-pin=32 --my-rf24-encryption-enabled --my-signing=password --my-security-password=indoors --my-mqtt-password=indoorPassword
./configure --my-transport=rfm69 --my-rfm69-frequency=915 --my-is-rfm69hw --my-gateway=mqtt --my-controller-ip-address=192.168.0.49 --my-mqtt-publish-topic-prefix=myOutdoorGateway-out --my-mqtt-subscribe-topic-prefix=myOutdoorGateway-in --my-mqtt-client-id=myOutdoorGateway --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18 --my-signing=password --my-security-password=outdoors --my-rfm69-encryption-enabled --my-mqtt-password=outdoorPassword
However, for both gateways, when I run the test everything looks good until it tries to connect to the mqtt server.
pi@mysensors-gateway:~/MySensorsSecond $ ./bin/mysgwIndoor
Sep 14 11:53:56 INFO Starting gateway...
Sep 14 11:53:56 INFO Protocol version - 2.4.0-alpha
Sep 14 11:53:56 DEBUG MCO:BGN:INIT GW,CP=RNNGLSQX,FQ=NA,REL=0,VER=2.4.0-alpha
Sep 14 11:53:56 DEBUG TSF:LRT:OK
Sep 14 11:53:56 DEBUG TSM:INIT
Sep 14 11:53:56 DEBUG TSF:WUR:MS=0
Sep 14 11:53:56 DEBUG TSM:INIT:TSP OK
Sep 14 11:53:56 DEBUG TSM:INIT:GW MODE
Sep 14 11:53:56 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
Sep 14 11:53:56 DEBUG MCO:REG:NOT NEEDED
Sep 14 11:53:56 DEBUG MCO:BGN:STP
Sep 14 11:53:56 DEBUG MCO:BGN:INIT OK,TSP=1
Sep 14 11:53:56 DEBUG GWT:RMQ:CONNECTING...
Sep 14 11:53:56 DEBUG connected to 192.168.0.49
Sep 14 11:53:57 DEBUG !GWT:RMQ:FAIL
Sep 14 11:53:57 DEBUG TSM:READY:NWD REQ
Sep 14 11:53:57 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
Sep 14 11:53:57 DEBUG GWT:RMQ:CONNECTING...
Sep 14 11:53:57 DEBUG connected to 192.168.0.49
Sep 14 11:53:58 DEBUG !GWT:RMQ:FAIL
Sep 14 11:53:58 DEBUG GWT:RMQ:CONNECTING...
Sep 14 11:53:58 DEBUG connected to 192.168.0.49
Sep 14 11:53:59 DEBUG !GWT:RMQ:FAIL
Sep 14 11:53:59 DEBUG GWT:RMQ:CONNECTING...
Sep 14 11:53:59 DEBUG connected to 192.168.0.49
Sep 14 11:54:00 DEBUG !GWT:RMQ:FAIL
Sep 14 11:54:00 DEBUG GWT:RMQ:CONNECTING...
Sep 14 11:54:00 DEBUG connected to 192.168.0.49
Sep 14 11:54:01 DEBUG !GWT:RMQ:FAIL
Sep 14 11:54:01 DEBUG GWT:RMQ:CONNECTING...
Sep 14 11:54:01 DEBUG connected to 192.168.0.49
and
sudo ./bin/mysgw
Sep 14 11:43:26 INFO Starting gateway...
Sep 14 11:43:26 INFO Protocol version - 2.4.0-alpha
Sep 14 11:43:26 DEBUG MCO:BGN:INIT GW,CP=RPNGLS-X,FQ=NA,REL=0,VER=2.4.0-alpha
Sep 14 11:43:26 DEBUG TSF:LRT:OK
Sep 14 11:43:26 DEBUG TSM:INIT
Sep 14 11:43:26 DEBUG TSF:WUR:MS=0
Sep 14 11:43:26 DEBUG TSM:INIT:TSP OK
Sep 14 11:43:26 DEBUG TSM:INIT:GW MODE
Sep 14 11:43:26 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
Sep 14 11:43:26 DEBUG MCO:REG:NOT NEEDED
Sep 14 11:43:26 DEBUG MCO:BGN:STP
Sep 14 11:43:26 DEBUG MCO:BGN:INIT OK,TSP=1
Sep 14 11:43:26 DEBUG GWT:RMQ:CONNECTING...
Sep 14 11:43:26 DEBUG connected to 192.168.0.49
Sep 14 11:43:27 DEBUG !GWT:RMQ:FAIL
Sep 14 11:43:27 DEBUG TSM:READY:NWD REQ
Sep 14 11:43:27 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
Sep 14 11:43:27 DEBUG GWT:RMQ:CONNECTING...
Sep 14 11:43:27 DEBUG connected to 192.168.0.49
Sep 14 11:43:28 DEBUG !GWT:RMQ:FAIL
Sep 14 11:43:28 DEBUG GWT:RMQ:CONNECTING...
Sep 14 11:43:28 DEBUG connected to 192.168.0.49
Sep 14 11:43:29 DEBUG !GWT:RMQ:FAIL
Sep 14 11:43:29 DEBUG GWT:RMQ:CONNECTING...
Sep 14 11:43:29 DEBUG connected to 192.168.0.49
Sep 14 11:43:30 DEBUG !GWT:RMQ:FAIL
Sep 14 11:43:31 DEBUG GWT:RMQ:CONNECTING...
Sep 14 11:43:31 DEBUG connected to 192.168.0.49
So they both fail with the same error message of !GWT:RMQ:FAIL but I can't get the log parser to tell me what that means. From this page: https://www.mysensors.org/apidocs/group__MyGatewayTransportgrp.html it looks like it's just a generic failure, so I don't know what I have wrong.
In the log file for the MQTT broker, all I see is a bunch of messages about a socket error. They look like this, if it matters:
1600109639: New connection from 192.168.0.48 on port 1883.
1600109639: Socket error on client <unknown>, disconnecting.
Does this mean something to you? Any pointers for where next to look?
Thanks so much!