Hi everyone!
So, I’m doing a new OH3 installation (openhabian image) because everything got way messy and glitchy with the one that was upgraded from OH2. Trying to stay close to “intended use” this time. The preferred way to set up tasmota devices appears to have changed at least 2 times since I last did it and it’s hard to find up to date information. I’m probably looking for what is in some places described as the “new / tasmota / native autodiscovery” method (which should be the successor to the “deprecated MQTT / homeassistant autodiscovery”)?
What is the preferred (mainly UI) way to do it now? Can someone correct / fill in some blanks? Looking for the future-proof approach. I guess…:
- install mosquitto (is it considered deprecated now? still available via ssh/openhab-config; discussions on whether it should still be used seemed to be going nowhere? Or was that just about the UI addon that I can’t find anymore?)
- add mqtt server binding to things
- install JINJA transformation (why is this not done automatically?)
- Update all tasmota devices to newest version (i did that part)
- setoption19 should be 0? (set to 1 and back to 0 to trigger detection?) That means, NOT the hassio detection should be used but tasmotas own new thing?
- I have to set topic, client, full topic to the new defaults that are apparently listed NOWHERE? And which setting will later be the name of the device in openhab? Is it the “client”? I think client needs to have a value distinct from the other variables, so it is usually prefixed with the user name which is “DVES” by default for some reason? Also somewhere I read I should use the MqttUser to name devices, but somewhere else I read that’s bad and I should use the same for all Tasmota devices at least?
- The homeassistant autodiscovery still seems to work and I accidentally triggered it, so now I probably have to discard all “mqtt:homeassistant_” devices?
So, the tasmoadmin (is a great help, works fine as raspie docker) commands I have to run should look something like this…( assuming I already set a unique hostname on all devices, to whatever I want the device to be named later):
setoption3 0; #turn off mqtt
setoption19 1; #turn on deprecated autodiscovery?
SetOption10 1; #clear old topic on topic change
DeviceName %hostname%; #no idea where this is used
FriendlyName %hostname%; #no idea where that is used
SetOption55 0; # disable mDNS? Helps with arp problems? No idea.
SetOption55 1; # enable mDNS? Helps with arp problems? No idea.
MqttClient DVES_%hostname%; #might reboot?
Topic %hostname%; #results in reboot?
FullTopic %prefix%/%topic%; # probably another reboot T_T
MqttHost 0; #turn on autodiscovery of mqtt host, is this reliable?
# MqttHost openhabian; # or should I set it to openhab hostname? manual says 'do NOT use .local'
# MqttHost 192.168.1.111; # IP is probably most reliable - until it changes -_-
MqttPort 1883; # should be default but why not make sure
MqttPassword 0; #not using password for now
setoption3 1; #turn on mqtt, hope it doesn't reboot
setoption19 0; #turn on 'native' autodiscovery?
# Change color scheme to mark finished devices:
WebColor {"WebColor":["#eaeaea","#252525","#282531","#eaeaea","#282531","#d7ccff","#1d1b26","#ff5661","#008000","#faffff","#694fa8","#4d3e7f","#b73d5d","#822c43","#1f917c","#156353","#faffff","#716b7f","#eaeaea"]};
And then, the devices should - in theory - be auto-discoverable again, this time the “native” way… somehow? All of this is likely wrong, so what’s the right way to do it? Is there some WIP stuff I should prepare for / install workaround until it’s implemented?
( Testing this is problematic with my setup, because I have that popular bug that results in devices disappearing after they reboot until you do random stuff like hit an asus router with a shovel, turn electricity for the whole house off and on again a couple of times and pray to your favourite animist deity for 21600 seconds. So any advice that helps me keep the amount of times I have to go through that ordeal to a minimum is highly appreciated! )