Help with my sonoff's disappearing from HA

Hi
Could anyone point me in the right direction. For some reason my internet setting were all lost last night and I didn’t take a copy of all of the port forwarding etc. I have managed to get most things working again, but for some reason my lights (Sonoff with Tasmota) no longer show in HA. They all work fine in TasmoAdmin, but they don’t show in my dev tools - states - entities? I thought that it might be because of my MQTT broker so I have restated this, I don’t remember having to set up any port forwarding for this so I haven’t. I am getting this error message from the log;

1554970396: |-- url=http://127.0.0.1:8080/superuser 1554970396: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1554970396: |-- aclcheck(DVES_USER, tele/LivingRoomLights/STATE, 2) SUPERUSER=Y by http 1554970396: |-- Cached [115DFF24C332F12ACFAA19DCFB301A222B30B2F9] for (client id not available,DVES_USER,2) 1554970396: |-- Cleanup [01E585E6E214FFCBA8858EF1683A12B343FC5B39] 1554970396: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, tele/LivingRoomLights/SENSOR, MOSQ_ACL_WRITE) 1554970396: |-- url=http://127.0.0.1:8080/superuser 1554970396: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1554970396: |-- aclcheck(DVES_USER, tele/LivingRoomLights/SENSOR, 2) SUPERUSER=Y by http 1554970396: |-- Cached [01E585E6E214FFCBA8858EF1683A12B343FC5B39] for (client id not available,DVES_USER,2)

Can anyone please let me know what I have missed?

Thanks

  • Is everything in your local network? HA, Sonoffs, Mqtt broker?
  • Which broker do you use? have you set up everything right? usernames and passwords on the broker and the clients?
  • Does your HA connect to the broker ok?
  • What do your sonoffs say in their console? do they connect?

Hi Krash,

  • Yes, everything is on the same network, well the Sonoffs and HA is. I’m using Mosquitto MQTT, through HA and I set it up ages ago.
  • I’ve not changed anything in HA, it was the internet that changed all of the settings, so it all worked before fine.
  • I am not sure how to check this, I use Hass.io and it all looks fine in there apart from the error message above.
  • I can connect to the sonoff’s through TasmoAdmin and their ip addresses, just not through HA

There was a recent change in mqtt broker add-ons and they now require client_ids and passwords for every client to operate (maybe you had something on auto-update). Are you using the embedded broker or some hassio addon like mosquitto or this one? If it’s one of the addons, go to their admin page inside hassio → add-ons, scroll down and check their logs.

Within the tasmota web-ui, click on console and check if they are connecting to the broker. You should see something similar upon restart:

00:00:00 Project sonoff Sonoff Stairs Up Version 6.5.0(release-sonoff)-2_3_0
00:00:00 WIF: Connecting to AP1 XXXX in mode 11N as sonoff_something-1234...
00:00:03 WIF: Connected
00:00:03 HTP: Web server active on sonoff_something-1234 with IP address xx.xx.xx.xx
00:00:04 MQT: Attempting connection...
00:00:04 MQT: Connected

Lastly, im guessing you have done a couple of HA restarts in the meanwhile right?

Hi Krash,

Sorry for the delay, something very weird is going on wit the internet here in NZ. We have been having all sorts of problems at work & last night my HA wouldn’t connect again and now its fine without me touching anything.
I am using the Mosquitto addon within hass.io, that is where the “client id not available” log error at the top is from.
This is a section of the console from the sonoff device;

09:36:50 MQT: stat/LivingroomLamp/STATUS2 = {"StatusFWR":{"Version":"5.12.0","BuildDateTime":"2018-07-08T15:53:42","Boot":6,"Core":"2_4_1","SDK":"2.2.1(cfd48f3)"}}
09:36:50 MQT: stat/LivingroomLamp/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"SysLog":0,"LogHost":"domus1","LogPort":514,"SSId1":"","SSId2":"","TelePeriod":300,"SetOption":"00000009"}}
09:36:50 MQT: stat/LivingroomLamp/STATUS4 = {"StatusMEM":{"ProgramSize":495,"Free":508,"Heap":21,"ProgramFlashSize":1024,"FlashSize":1024,"FlashMode":3}}
09:36:50 MQT: stat/LivingroomLamp/STATUS5 = {"StatusNET":{"Hostname":"LivingroomLamp-7927","IPAddress":"","Gateway":"","Subnetmask":"","DNSServer":"","Mac":"","Webserver":2,"WifiConfig":3}}
09:36:50 MQT: stat/LivingroomLamp/STATUS6 = {"StatusMQT":{"MqttHost":"","MqttPort":1883,"MqttClientMask":"","MqttClient":"","MqttUser":"","MAX_PACKET_SIZE":1000,"KEEPALIVE":15}}
09:36:50 MQT: stat/LivingroomLamp/STATUS7 = {"StatusTIM":{"UTC":"Fri Apr 12 08:36:50 2019","Local":"Fri Apr 12 09:36:50 2019","StartDST":"Sun Mar 31 02:00:00 2019","EndDST":"Sun Oct 27 03:00:00 2019","Timezone":1}}
09:36:50 MQT: stat/LivingroomLamp/STATUS10 = {"StatusSNS":{"Time":"2019-04-12T09:36:50"}}
09:36:5

Hi,

Can anyone point me in the right direction here? I can’t get my sonoff’s with tasmota to show in HA, this is the log from my Mosquitto MQTT log.

[INFO] Setup mosquitto configuration

[INFO] Found local users inside config

[INFO] Initialize Hass.io Add-on services

[INFO] Initialize Home Assistant discovery

[INFO] Start Mosquitto daemon

1555213185: mosquitto version 1.5.6 starting

1555213185: Config loaded from /etc/mosquitto.conf.

1555213185: |-- *** auth-plug: startup

1555213185: |-- ** Configured order: http

1555213185: Opening ipv4 listen socket on port 1883.

1555213185: Opening ipv6 listen socket on port 1883.

1555213185: Opening websockets listen socket on port 1884.

1555213185: |-- with_tls=false

1555213185: |-- getuser_uri=/login

1555213185: |-- superuser_uri=/superuser

1555213185: |-- aclcheck_uri=/acl

1555213185: |-- getuser_params=(null)

1555213185: |-- superuser_params=(null)

1555213185: |-- aclcheck_params=(null)

1555213185: |-- retry_count=3

1555213185: Opening ipv4 listen socket on port 8883.

1555213185: Opening ipv6 listen socket on port 8883.

1555213185: Opening websockets listen socket on port 8884.

1555213185: Warning: Mosquitto should not be run as root/administrator.

[INFO] Setup mosquitto configuration

[INFO] Found local users inside config

[INFO] Initialize Hass.io Add-on services

[INFO] Initialize Home Assistant discovery

[INFO] Start Mosquitto daemon

1555213223: mosquitto version 1.5.6 starting

1555213223: Config loaded from /etc/mosquitto.conf.

1555213223: |-- *** auth-plug: startup

1555213223: |-- ** Configured order: http

1555213223: |-- with_tls=false

1555213223: |-- getuser_uri=/login

1555213223: |-- superuser_uri=/superuser

1555213223: |-- aclcheck_uri=/acl

1555213223: |-- getuser_params=(null)

1555213223: |-- superuser_params=(null)

1555213223: |-- aclcheck_params=(null)

1555213223: |-- retry_count=3

1555213223: Opening ipv4 listen socket on port 1883.

1555213223: Opening ipv6 listen socket on port 1883.

1555213223: Opening websockets listen socket on port 1884.

1555213223: Opening ipv4 listen socket on port 8883.

1555213223: Opening ipv6 listen socket on port 8883.

1555213223: Opening websockets listen socket on port 8884.

1555213223: Warning: Mosquitto should not be run as root/administrator.

1555213227: |-- mosquitto_auth_unpwd_check(DVES_USER)

1555213227: New connection from 192.168.1.15 on port 1883.

1555213227: |-- ** checking backend http

1555213227: |-- url=http://127.0.0.1:8080/login

1555213227: |-- data=username=DVES_USER&password=Xxxxxxxx&topic=&acc=-1&clientid=

[INFO] Setup mosquitto configuration

[INFO] Found local users inside config

[INFO] Initialize Hass.io Add-on services

[INFO] Initialize Home Assistant discovery

[INFO] Start Mosquitto daemon

1555213223: mosquitto version 1.5.6 starting

1555213223: Config loaded from /etc/mosquitto.conf.

1555213223: |-- *** auth-plug: startup

1555213223: |-- ** Configured order: http

1555213223: |-- with_tls=false

1555213223: |-- getuser_uri=/login

1555213223: |-- superuser_uri=/superuser

1555213223: |-- aclcheck_uri=/acl

1555213223: |-- getuser_params=(null)

1555213223: |-- superuser_params=(null)

1555213223: |-- aclcheck_params=(null)

1555213223: |-- retry_count=3

1555213223: Opening ipv4 listen socket on port 1883.

1555213223: Opening ipv6 listen socket on port 1883.

1555213223: Opening websockets listen socket on port 1884.

1555213223: Opening ipv4 listen socket on port 8883.

1555213223: Opening ipv6 listen socket on port 8883.

1555213223: Opening websockets listen socket on port 8884.

1555213223: Warning: Mosquitto should not be run as root/administrator.

1555213227: |-- mosquitto_auth_unpwd_check(DVES_USER)

1555213227: New connection from 192.168.1.15 on port 1883.

1555213227: |-- ** checking backend http

1555213227: |-- url=http://127.0.0.1:8080/login

1555213227: |-- data=username=DVES_USER&password=Xxxxxxxx&topic=&acc=-1&clientid=

[INFO] found DVES_USER on Home Assistant

1555213230: New client connected from 192.168.1.15 as DVES_79E8D7 (c1, k15, u'DVES_USER').

1555213230: |-- getuser(DVES_USER) AUTHENTICATED=1 by http

1555213230: New connection from 192.168.1.11 on port 1883.

1555213230: New connection from 192.168.1.13 on port 1883.

1555213230: New connection from 192.168.1.8 on port 1883.

1555213230: New connection from 192.168.1.6 on port 1883.

1555213230: New connection from 192.168.1.24 on port 1883.

1555213230: |-- mosquitto_auth_unpwd_check(DVES_USER)

1555213230: |-- ** checking backend http

1555213230: |-- url=http://127.0.0.1:8080/login

1555213230: |-- data=username=DVES_USER&password=Xxxxxxxx&topic=&acc=-1&clientid=

[INFO] found DVES_USER on Home Assistant

1555213233: New client connected from 192.168.1.11 as DVES_8AB9A0 (c1, k15, u'DVES_USER').

1555213233: |-- getuser(DVES_USER) AUTHENTICATED=1 by http

1555213233: |-- mosquitto_auth_unpwd_check(DVES_USER)

1555213233: |-- ** checking backend http

1555213233: |-- url=http://127.0.0.1:8080/login

1555213233: |-- data=username=DVES_USER&password=Xxxxxxxx&topic=&acc=-1&clientid=

[INFO] found DVES_USER on Home Assistant

1555213235: |-- getuser(DVES_USER) AUTHENTICATED=1 by http

1555213235: New client connected from 192.168.1.13 as DVES_2DF2F5 (c1, k15, u'DVES_USER').

1555213235: |-- mosquitto_auth_unpwd_check(DVES_USER)

1555213235: |-- ** checking backend http

1555213235: |-- url=http://127.0.0.1:8080/login

1555213235: |-- data=username=DVES_USER&password=Xxxxxxxx&topic=&acc=-1&clientid=

[INFO] found DVES_USER on Home Assistant

1555213237: |-- getuser(DVES_USER) AUTHENTICATED=1 by http

1555213237: New client connected from 192.168.1.8 as DVES_8A9EF7 (c1, k15, u'DVES_USER').

1555213237: |-- mosquitto_auth_unpwd_check(DVES_USER)

1555213237: |-- ** checking backend http

1555213237: |-- url=http://127.0.0.1:8080/login

1555213237: |-- data=username=DVES_USER&password=Xxxxxxxx&topic=&acc=-1&clientid=

1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/HallLights/#, 4) SUPERUSER=Y by http 1555213245: |-- Cached [8AAABAABF1456D41062142B70E720AFDB23445E6] for (client id not available,DVES_USER,4) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/LivingroomLamp/#, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/LivingroomLamp/#, 4) SUPERUSER=Y by http 1555213245: |-- Cached [9FD42F39D2F306CBBA6F86F8459CB8342B4835C6] for (client id not available,DVES_USER,4) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/LightsBehindTheBed/#, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/LightsBehindTheBed/#, 4) SUPERUSER=Y by http 1555213245: |-- Cached [37EA496CA148BF705DB67375D142F51E8A52B330] for (client id not available,DVES_USER,4) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/LivingRoomLights/#, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/LivingRoomLights/#, 4) SUPERUSER=Y by http 1555213245: |-- Cached [49BA0B1D9FA4CB5E210421249B9826264633BE60] for (client id not available,DVES_USER,4) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, tele/FrontDoor/LWT, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, tele/FrontDoor/LWT, 2) SUPERUSER=Y by http 1555213245: |-- Cached [482D041686FDF991177B0D412422C887345FAFC3] for (client id not available,DVES_USER,2) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/sonoffs/#, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/sonoffs/#, 4) SUPERUSER=Y by http 1555213245: |-- Cached [C2ED30697FF38CB0FF931ABB7E7B0E55F49C46AB] for (client id not available,DVES_USER,4) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/sonoffs/#, MOSQ_ACL_WRITE) 1555213245: |-- aclcheck(DVES_USER, cmnd/sonoffs/#, 4) CACHEDAUTH: 0 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/sonoffs/#, MOSQ_ACL_WRITE) 1555213245: |-- aclcheck(DVES_USER, cmnd/sonoffs/#, 4) CACHEDAUTH: 0 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/sonoffs/#, MOSQ_ACL_WRITE) 1555213245: |-- aclcheck(DVES_USER, cmnd/sonoffs/#, 4) CACHEDAUTH: 0 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/sonoffs/#, MOSQ_ACL_WRITE) 1555213245: |-- aclcheck(DVES_USER, cmnd/sonoffs/#, 4) CACHEDAUTH: 0 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/FrontDoor/POWER, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/FrontDoor/POWER, 2) SUPERUSER=Y by http 1555213245: |-- Cached [164E94F29DD04057A3883AF279D3C281F5AECF0D] for (client id not available,DVES_USER,2) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, tele/KitchenLights/LWT, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, tele/KitchenLights/LWT, 2) SUPERUSER=Y by http 1555213245: |-- Cached [0E458E124EF9212C261A7E928792C580FA02A42E] for (client id not available,DVES_USER,2) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/DVES_8AB9A0/#, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/DVES_8AB9A0/#, 4) SUPERUSER=Y by http 1555213245: |-- Cached [40C2DC30DF1E904787634928BB2A346A68250B43] for (client id not available,DVES_USER,4) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/DVES_2DF2F5/#, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/DVES_2DF2F5/#, 4) SUPERUSER=Y by http 1555213245: |-- Cached [81422A1B55830DB3785DB4E68A76BE9BABD73586] for (client id not available,DVES_USER,4) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/DVES_8A9EF7/#, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/DVES_8A9EF7/#, 4) SUPERUSER=Y by http 1555213245: |-- Cached [76F0F15FBD0AE95DC906BC57267177C15FE97000] for (client id not available,DVES_USER,4) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/DVES_68D73E/#, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/DVES_68D73E/#, 4) SUPERUSER=Y by http 1555213245: |-- Cached [D34EADBF5EF9D3A0D99461DBB93508152CDB2AEE] for (client id not available,DVES_USER,4) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/DVES_79E8D7/#, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/DVES_79E8D7/#, 4) SUPERUSER=Y by http 1555213245: |-- Cached [6BD9F58A10DD186AE584A8D4A36BA7AF441875D2] for (client id not available,DVES_USER,4) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/FrontDoor/#, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/FrontDoor/#, 4) SUPERUSER=Y by http 1555213245: |-- Cached [1611096C44E4BC49E5C2AC125EE5D53611830A56] for (client id not available,DVES_USER,4) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/KitchenLights/POWER, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/KitchenLights/POWER, 2) SUPERUSER=Y by http 1555213245: |-- Cached [315179CD040D5F1025D5FB4335DF25F2EB5E7418] for (client id not available,DVES_USER,2) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/sonoffs/#, MOSQ_ACL_WRITE) 1555213245: |-- aclcheck(DVES_USER, cmnd/sonoffs/#, 4) CACHEDAUTH: 0 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/KitchenLights/#, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/KitchenLights/#, 4) SUPERUSER=Y by http 1555213245: |-- Cached [50ABE273EFFBFAFC773BC32D500ABC095314ACFD] for (client id not available,DVES_USER,4) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/DVES_804859/#, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/DVES_804859/#, 4) SUPERUSER=Y by http 1555213245: |-- Cached [502C19D4C4BB2D3BC658F1D300788582F47D72D4] for (client id not available,DVES_USER,4) 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/sonoffs/#, MOSQ_ACL_WRITE) 1555213245: |-- aclcheck(DVES_USER, cmnd/sonoffs/#, 4) CACHEDAUTH: 0 1555213245: |-- mosquitto_auth_acl_check(..., client id not available, DVES_USER, cmnd/DVES_808AB0/#, MOSQ_ACL_WRITE) 1555213245: |-- url=http://127.0.0.1:8080/superuser 1555213245: |-- data=username=DVES_USER&password=&topic=&acc=-1&clientid= 1555213245: |-- aclcheck(DVES_USER, cmnd/DVES_808AB0/#, 4) SUPERUSER=Y by http 1555213245: |-- Cached [D6FE956EAABFF00D8FFEAD4695322F4C4B2C006B] for (client id not available,DVES_USER,4)

did you set up the ACL? Access control list? See the docs for the addon. It is a mandatory requirement in the broker addon now

No I didn’t know about this, I’ve looked at the docs but don’t understand what I need to do. Where do I add the list?

Hi David,
Sorted! thanks.

1 Like