-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tdm crashes on MQTT connect since I have added a pattern #59
Comments
The prefix, as it's written in the dialog, should be %prefix% The TDM config is in \TDM\tdm.cfg, patterns are there. |
If I start from console (did it over link before) I get a speaking error:
|
There is no tdm.cfg
|
I told you home directory, not downloads directory. See c:\users\tommy\TDM |
Well, found in the meantime and got it running again by deleting the pattern. But now I get only one device which not follows my normal topic convention. Only found is topic avatar01 all my 40 devices which have topic in form stadtweg/og/light1 or stadtweg/pir/hh/pir1 are not found. What I'm doing wrong? |
Please read the Autodiscovery page in this wiki project. You need to move some parts from topic to fulltopic to make it work |
Okay, that's sad, this way it is not usable for me. I would have to change my whole homeserver setup and all devices, including their direct dependencies, to get it running. Edit: Switched to DEBUG log and I don't understand why there is no solution. All devices are known to TDM
|
I'm open for suggestions how to parse such compound topic without knowing before-hand which part is the prefix to send commands to :) |
Hm, actually I might have an idea. Indeed there's something that helps solve an issue when trying to describe a problem to someone else. Stay tuned. |
On a side note, moving that path parts to fulltopic doesn't impact how your setup or automation work, because in the end, the whole device MQTT path looks exactly the same. It's just a change in tasmota side. After changing your topic to Then you just add |
Okay, I did some tests and TDM discovery won't work with granular topics. |
The full topic on LWT is IMHO always tele/x/y/z/LWT. So split by "/" I'm not so confident with python but something like that should give you prefix and topic. Maybe there is also a kind of regex to do that. pseudo-code
javascript
|
No, LWT follows the FullTopic. If you changed FullTopic to Trust me, I spent a LOT of time fiddling with topics and fulltopics to make autodiscovery work. |
okay, so we have two cases
I have no clue whether someone uses the Fulltopic manipulation as you describe and for what reason. I'm at home in JS so I'm not familar with possibilities in python. I would do it this way in JS: https://jsfiddle.net/o14b60my/1/ If someone defines an own pattern to cover his special fulltopic construction you could fork into your actual code with regex.
|
You're trying to convince me to a solution that covers your way of thinking, but mine covers all possible FullTopic patterns, with a simple inclusion of custom pattern in TDM config. And now you insist that custom patterns should be forked. And TBH I don't spend time thinking why people use such complex patterns. I just give them an option to have it work almost out of the box, as long as they use some consistency. All the code snippets are already covered in TDM defaults. And I know how to split a string by "/" to extract first, element, middle and the last part. Like it or not, but Tasmota recommends using a single-word topic, and additional path elements in fulltopic. And I repeat again and again: from your home automation side, it doesn't matter if the path is in topic or in fulltopic, because the full path will look exactly the same. But if you like to drive a screw using a butter knife because you think that's better: I'm not going to stop you/ |
Oh, another example: I've seen many users prepend all their Tasmota FullTopics with BTW: do you know that some users change their prefixes also? So then you must know not only the fulltopic beforehand, but also possible prefixes. more real examples:
etc etc ad infinitum. |
then stay with the way it is. I already closed the ticket a while ago. Means I'm done with. I've some other things on todo right now, maybe I make it running for me later. Shouldn't be that complicated. Faster than endless discussions anyway. |
Hi,
System: Win64, Python 3.7
I was able to run tdm and connect to my Broker. One device were visible. I thought this is because I have to configure a pattern. My toppics are all in the same Style stadtweg/og/light1. So I have entered a pattern %prefix%/stadtweg/ Because I don't know what prefix should be used. maybe tele ? Since I did that TDM crashes after Start while connecting Broker. Window just closes, no Errormessage. Where can I find the Settings to make the pattern undone? What would be the right pattern in my case?
The text was updated successfully, but these errors were encountered: