I have the famous MQTT tree (see image).
I would like to have the value of "id" ("ced....") into a variable or state device (variable would be better), how can I do it?
Thanks
Marco
Help with MQTT
Re: Help with MQTT
- Attachments
-
- Screenshot 2022-12-15 alle 22.35.33.png (132.91 KiB) Viewed 1666 times
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Help with MQTT
You need to set up a trigger and Generic JSON device for the topic "espresense/rooms/bagno_og". Because there are other topics with more components after that, you need to use the End term as follows:
Once you do that, you set the "multi-states key" to "." per the instructions in the config dialog. Then all of the items in that dict (id, idType, etc) will be states for that device.
If you really want them in a variable (why?) you would need to set up a trigger that fires whenever that state changes to copy the value to the variable.
Code: Select all
Match: espresense
Match: rooms
Any:
End:
If you really want them in a variable (why?) you would need to set up a trigger that fires whenever that state changes to copy the value to the variable.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Help with MQTT
Ok, thanks, but I do not understand how I have to setup the device.
What shall I put into "Unique ID Location"? And then?
Sorry for the silly questions.
Thanks
What shall I put into "Unique ID Location"? And then?
Sorry for the silly questions.
Thanks
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Help with MQTT
Full disclosure - there's a way to get ALL of the data from the multiple topics into ONE Indigo device. That might be easier since you're looking at so many topics. The downside is it's not any kind of sensor device, and all the data ends up in custom states with very long and convoluted names.
I never wrote up any documentation on how it works, so I'd have to do that.
I never wrote up any documentation on how it works, so I'd have to do that.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Help with MQTT
Same as all your other devices. "bagno_og". The string that's in the "Any" slot in the trigger.MarcoGT wrote:Ok, thanks, but I do not understand how I have to setup the device.
What shall I put into "Unique ID Location"? And then?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177