Analog mqtt message does not have unit number
Moderators: grovkillen, Stuntteam, TD-er
Analog mqtt message does not have unit number
Hi All
I hope that you can point me in the right direction.
I have the internal Analog enabled under "Devices" and i am trying to send it to a mqtt broker.
The issue is that it seems that the Analog message does not include the "unit number" so i am just getting the value under the "Unit name" as all my unis have the same name, but each one has an unique unit number.
How do i send the Analog value to the broker that include the Unit name and the unit number so that i can read the correct value per unit?
Or am i going about this wrong?
Z69
I hope that you can point me in the right direction.
I have the internal Analog enabled under "Devices" and i am trying to send it to a mqtt broker.
The issue is that it seems that the Analog message does not include the "unit number" so i am just getting the value under the "Unit name" as all my unis have the same name, but each one has an unique unit number.
How do i send the Analog value to the broker that include the Unit name and the unit number so that i can read the correct value per unit?
Or am i going about this wrong?
Z69
Re: Analog mqtt message does not have unit number
Not sure how you try to send it to the broker.
If no controller fits your needs, you can also create a message in rules and "publish" the data.
For example you can use the analog input plugin to create a task and refer to that value from within the rules.
If you use a VCC build, you can also use the %vcc% to create a MQTT message.
If no controller fits your needs, you can also create a message in rules and "publish" the data.
For example you can use the analog input plugin to create a task and refer to that value from within the rules.
If you use a VCC build, you can also use the %vcc% to create a MQTT message.
Re: Analog mqtt message does not have unit number
Hi TD-er
Here is my setup
ESPEasy mqtt setup as Home Assistant (openHAB) MQTT
Under "Devices" Analog input - internal, with "Send to Controller" enabled
In mqtt - i use MQTT Explorer to see the info, the Analog value is posted under the Device name and not under the Unit number.
mqtt broker ------->192.xxx.yyy.xxx
Device Name -------->ESP
Device Number-------->1
Topic--------------------->cmd = pwm,12,1023
Analog Name---------->Power
Topic---------------------> Analog = 8.00
As you can see, Power should be one level lower, under the "Device Number" level and not under the "Device Name" level.
If i have four ESP's, all four of them are under the Device name level and i am unable to differentiate between them.
Any assitance will be appreciated
Z69
Here is my setup
ESPEasy mqtt setup as Home Assistant (openHAB) MQTT
Under "Devices" Analog input - internal, with "Send to Controller" enabled
In mqtt - i use MQTT Explorer to see the info, the Analog value is posted under the Device name and not under the Unit number.
mqtt broker ------->192.xxx.yyy.xxx
Device Name -------->ESP
Device Number-------->1
Topic--------------------->cmd = pwm,12,1023
Analog Name---------->Power
Topic---------------------> Analog = 8.00
As you can see, Power should be one level lower, under the "Device Number" level and not under the "Device Name" level.
If i have four ESP's, all four of them are under the Device name level and i am unable to differentiate between them.
Any assitance will be appreciated
Z69
Re: Analog mqtt message does not have unit number
A few more questions:
- What version (.bin filename is the most informative) of ESPEasy do you have installed on your ESP's?
- What type of ESP's do you have, ESP8266 or ESP32?
- What version (.bin filename is the most informative) of ESPEasy do you have installed on your ESP's?
- What type of ESP's do you have, ESP8266 or ESP32?
/Ton (PayPal.me)
Re: Analog mqtt message does not have unit number
Hi Ath
ESP_Easy_mega_20200703_normal_ESP8266_4M1M
ESP_Easy_mega_20200703_normal_ESP8266_4M1M
Re: Analog mqtt message does not have unit number
Please close the Topic, i have resolved the issue by making some changes to the mqtt subscribe topic
Re: Analog mqtt message does not have unit number
We would appreciate if you could share the details, please.
/Ton (PayPal.me)
Re: Analog mqtt message does not have unit number
Hi Ath
In my setup, all the ESP's have the same Sysname and each one has it's own number as in 1,2,3...
I have NOT set "Append Unit Number to hostname:"
Here is my mqtt setup, i am still new to mqtt, but this work for me, if there is a better way i am open to any way to do it better.
I had to add the %unit% to the "Controller Publish" to get it to work this way.
Controller Subscribe: %sysname%/%unit%/#
Controller Publish: %sysname%/%unit%/%tskname%/%valname%
Controller LWT Topic: %sysname%/%unit%/
This way, i have one Sysname, the units with their unit numbers are one level lower and each unit messages are under each one's number.
mqtt broker ----->192.xxx.yyy.xxx
Device Name ------>ESP
Device Number------>1
Topic------------------->cmd = pwm,12,1023
Analog Name---------->Power
Topic---------------------> Analog = 8.00
Device Number------>2
Topic------------------->cmd = pwm,12,1023
Analog Name---------->Power
Topic---------------------> Analog = 8.00
Z69
In my setup, all the ESP's have the same Sysname and each one has it's own number as in 1,2,3...
I have NOT set "Append Unit Number to hostname:"
Here is my mqtt setup, i am still new to mqtt, but this work for me, if there is a better way i am open to any way to do it better.
I had to add the %unit% to the "Controller Publish" to get it to work this way.
Controller Subscribe: %sysname%/%unit%/#
Controller Publish: %sysname%/%unit%/%tskname%/%valname%
Controller LWT Topic: %sysname%/%unit%/
This way, i have one Sysname, the units with their unit numbers are one level lower and each unit messages are under each one's number.
mqtt broker ----->192.xxx.yyy.xxx
Device Name ------>ESP
Device Number------>1
Topic------------------->cmd = pwm,12,1023
Analog Name---------->Power
Topic---------------------> Analog = 8.00
Device Number------>2
Topic------------------->cmd = pwm,12,1023
Analog Name---------->Power
Topic---------------------> Analog = 8.00
Z69
Who is online
Users browsing this forum: No registered users and 28 guests