Hi all,
I’m brand new to HA and am also having trouble accessing my Sonoff mini device via MQTT
I’ve tried:
-
Auto Discovery - see details below
-
Manually entering (though I’m not sure I’ve done it correctly) as it sounds like @manjulapra is says that worked for him
-
Using the Mini template - as others (see: Sonoff Mini auto discovery) have said they’ve gotten the mini to auto discover using the mini template (I wonder what firmware they were using)
Maybe @hackiero 's note is true with the tasmota-lite.bin as well (see below bullet) but I’m also trying manual and others
- “To ease Home Assistant configuration a feature called MQTT discovery is available. (warning: this feature is not included in sonoff-basic.bin and sonoff-classic.bin)”
Config:
- HassOS 3.11 ver 206 - Running in Windows Hyper-V
- Mosquitto broker 5.1
Auto Discovery
- I SetOption19 & SetOption30 to 5 devices
- 1 Gosund WP6 plug using firmware: 8.1.0.2(tasmota) - tasmota.bin
- 4 mini’s using firmware: 8.1.0(lite) - tasmota-lite.bin (tasmota.bin doesn’t fit on the mini)
Only the 1 Gosund WP6 is discovered / shows up in MQTT integrations
NOTE:
All minis use the Mini template as follows:
{“NAME”:“Sonoff Mini”,“GPIO”:[17,0,0,0,9,0,0,0,21,56,0,0,255],“FLAG”:0,“BASE”:1}
Here’s the Log:
NOTE: 192.168.2.89 represents the 1 Gosund WP6 plug that appears in MQTT integrations)
1583122996: New connection from 192.168.2.31 on port 1883.
1583122996: Client DVES_431F8B already connected, closing old connection.
1583122996: New client connected from 192.168.2.31 as DVES_431F8B (p2, c1, k30, u’jim’).
1583122997: New connection from 192.168.2.32 on port 1883.
1583122997: Client DVES_BE15FC already connected, closing old connection.
1583122997: New client connected from 192.168.2.32 as DVES_BE15FC (p2, c1, k30, u’jim’).
1583122999: New connection from 192.168.2.54 on port 1883.
1583122999: Client DVES_C1DB30 already connected, closing old connection.
1583122999: New client connected from 192.168.2.54 as DVES_C1DB30 (p2, c1, k30, u’jim’).
1583122999: New connection from 192.168.2.89 on port 1883.
1583122999: Client DVES_D0524A already connected, closing old connection.
1583122999: New client connected from 192.168.2.89 as DVES_D0524A (p2, c1, k30, u’jim’).
1583123004: New connection from 192.168.2.33 on port 1883.
1583123004: Client DVES_B3D233 already connected, closing old connection.
1583123004: New client connected from 192.168.2.33 as DVES_B3D233 (p2, c1, k30, u’jim’).
1583123093: Saving in-memory database to /data/mosquitto.db.
Manual Attempt
I added the following to my configuration.yaml, not sure if this is correct but after restarting, I don’t see it in integrations MQTT, but I do see it in entities but when I click on it it says the following so I’m not sure how to add it to lovelace UI, with the auto discovered plug I was able to select the option to do so:
- “This entity does not have a unique ID, therefore it’s settings can not be managed from the UI.”
NOTE: I’ve tried bot with and without discovery options (below)
mqtt:
discovery: true
discovery_prefix: homeassistant
broker: 192.168.2.45
username: jim
password: xxx
light:
- platform: mqtt
name: Garage Outside
command_topic: “cmnd/Garage_Outside/power”
state_topic: “stat/Garage_Outside/POWER”
qos: 1
payload_on: “ON”
payload_off: “OFF”