tdm icon indicating copy to clipboard operation
tdm copied to clipboard

%hostname% as topic not working

Open jeroenst opened this issue 2 years ago • 3 comments

In my tasmota configuration I use %hostname% as topic. TDM tries to access 0002/%HOSTNAME%/cmnd/status 0 instead.

How can I solve this while still using the %hostname% variable in my topic?

jeroenst avatar Mar 31 '23 07:03 jeroenst

You can't There is no %hostname% variable that can be used to define %topic% You must set them independently to the same value

barbudor avatar Mar 31 '23 08:03 barbudor

Using %hostname% in topic of Tasmota works prefectly, only not with tdm.

jeroenst avatar Mar 31 '23 08:03 jeroenst

this is because Tasmota knows its hostname when operating. TDM doesn't know the hostname until it receives this information from the device, after establishing its proper topic/fulltopic. It's a race condtion.

The issue will be gone when I implement native autodiscovery, but I don't have time again.

jziolkowski avatar Mar 31 '23 08:03 jziolkowski