Closed S-Przybylski closed 4 years ago
Hey there @emontnemery, mind taking a look at this issue as its been labeled with an integration (tasmota
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
I'll try to reply to the issues one by one:
Sonoff 4CHProR2 to Tasmota 9.0.0.2 shown as unavailable
"%prefix%/%topic%/"
, and the Tasmota discovery messageals says: "%prefix%/%topic%/"
tasmota_xxxxxx/tele/LWT
which is the other way around: "%topic%/%prefix%/"
fulltopic
on Tasmta console?logger:
default: info
logs:
hatasmota: debug
homeassistant.core: debug
homeassistant.components.mqtt: debug
homeassistant.components.tasmota: debug
Perhaps it should be stated that setoption 19 should be disabled and the firmware should be newer that 9.0.x.x
Before upgrading to 9.0.0.2 (running 8.5.1) and disabling setoption19 (to 0) i sometimes got an error message from this integration within HA.
Hi @emontnemery thank you for your fast reaction and passion to work on that! Great!
Sonoff4CHProR2
I just looked up the topic in the web interface of tasmota: %topic%/%prefix%/
I rechecked the MQTT discovery message: "ft":"%prefix%/%topic%/" - that's strange
I just restarted the sonoff and again i got the message: tasmota/discovery/
tasmota/discovery/macadr/config: {"ip":"10.10.x.y","dn":"Sonoff4CHProR2","fn":["Tasmota","Tasmota2","Tasmota3","Tasmota4",null,null,null,null],"hn":"tasmota_xxxxxx-yyyy","mac":"zzzzzzxxxxxx","md":"Sonoff 4CH Pro","ty":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"9.0.0.2","t":"tasmota_xxxxxx","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[1,1,1,1,0,0,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1],"btn":[0,0,0,0],"so":{"11":0,"13":0,"17":1,"20":0,"30":0,"68":0,"73":0,"80":0,"82":0},"lk":1,"lt_st":0,"ver":1}
--> So I assume that the tasmota device send the wrong fulltopic for tasmota/discovery Do you have another idea? Should we close this issue then?
Documentation - you are right - i found an older pull request i looked into ... - sorry
Version 8.5.1 - Due to the fact that the current released (officially) version is 8.5.1 and not 9.x, i think i make sense to handle (block) this too (many people use the mqtt configuration manually -like i have done before). Perhaps it could come form enabling Setoption19 in 8.5.1 before.
As you can see i just raised an issue at tasmota
Fixed on my side Erik, you can close here.
Dear @emontnemery I just checked 9.0.0.3 - it worked! But i found out that it requires to setoption59. This integration seems to wait for tele messages as a response. Could you kindly recheck my result and perhaps add an notice to the docs to enable setoption59 (1)?
Setoption59 is set to on if you set option19 to on (but its not reseted) - see Tasmota docs. Therefore a fresh installation without setoption19 would fail i think.
@S-Przybylski Oops, you're right about setoption59, here's a PR to add it to the docs: https://github.com/home-assistant/home-assistant.io/pull/15417. Edit: And another one which makes setoption59 not necessary: https://github.com/home-assistant/core/pull/42394
Dear @emontnemery cool using the stat topic instead of the additional tele topic is definitly more straight forward for relay and lights! Now my mqtt group message "tasmotas/cmnd/power" grabs the current status of the relays again at startup (using an automation). I appreciate that! Today i upgraded a sonoff basic from 8.5.1 to 9.0.0.3. Before upgrading it uses setoption19. After the upgrade i switched it off and the integration took the configured switch and sensors over from mqtt discovery protocol without intervention. Really cool!
I have one recommendation. Perhaps its could be mentioned in the docs to disable setoption 59 (=0) to disable the telemetry messages, because this are no longer necessary.
Dear @emontnemery I just checked my sensors and found out that the naming convention differs from the mqtt discovery one. Example:
I just checked my sensors and found out that the naming convention differs from the mqtt discovery one. Before - MQTT discovery: sensor.wohnzimmer_si7021_temperature After - Tasmota discovery: sensor.si7021_temperature
Hmm, the idea was to not include the device name in the entity's friendly name since it's a bit redundant.
Agreed the entity_id
is not good though.
How about like this: Friendly name: "SI7021 Temperature" entity_id: sensor.wohnzimmer_si7021_temperature
When you have more than 1 device with a similar sensor, it is not good. Something is needed to tie the sensor to the device so you know what is what... In this picture you see what happens when I have devices with the same sensor in the system. I have a half dozen of these...
Damn you're right James.
@emontnemery I think is better revert to the old name structure devicename_sensorname_subsensortype
for the displayed name too...
Hi I opened a new issue in parallel to your discussion. Perhaps you could use that to process further...
sensors entity_id should definitely contain devicename so you can differentiate between devices.
Let's continue the discussion in #42603, instead of in this closed and fixed issue 👍
The problem
After upgrading my Sonoff 4CHProR2 to Tasmota 9.0.0.2 and switch Setoption19 0 tried to use the new tasmota integration without success. The integration includes four switches and one deactivated status binary sensor for the new device but they are all unavailable. The log doesn't show any warnings or errors related to that. I have deleted the integration and added it again (discovery topic: tasmota/discovery) My fulltopic follows not the tasmota default. Its turned around %topic%/%prefix%/ The hostname and the %topic% is default
I read the currently unpublished documentation: Perhaps it should be stated that setoption 19 should be disabled and the firmware should be newer that 9.0.x.x... (if not updated meanwhile)
Before i have used the existing method with setoption19 1 and MQTT discovery - it worked (without the tasmota integration).
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information
Note: This is not relevant for the current problem! Before upgrading to 9.0.0.2 (running 8.5.1) and disabling setoption19 (to 0) i sometimes got an error message from this integration within HA. It seems that the integration doesn't filter (block) discoveries with an version less than 9.x.x.x. The integration doesn't show any device...: