-
Notifications
You must be signed in to change notification settings - Fork 638
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
Dallas sensor ID #377
Comments
I see two options. The first one is to add the address to the topic and then parse the topic in your application, something like:
The second option is to publish the address for each "channel". You will then receive at least two messages like this:
Then you can enable the JSON grouping in the MQTT tab to get all messages in the same payload (along with more info like timestamp, ip,...), something like:
This second option is less "invasive" so it's something I could add to the default build... |
You can give a try to the second option in the dev branch, edit the sensor.h file to enable SENSOR_PUBLISH_ADDRESSES setting. |
Original comment by Albert Weterings (Bitbucket: AlbertWeterings, GitHub: Unknown): I tested the changes as I found in [Link Text]170f0d5(Link URL)]https://bitbucket.org/xoseperez/espurna/commits/170f0d543c767e8e9a95223a36d3e6cef52bb295 For Dallas sensors I can confirm it works great. There is one downside in Node-red it is hard to handle with the identifier msg.payload.temperature/0 as it doesn't accept the slash so I first had to replace all slashes with other characters to get it working Thank you for the effort putting into this issue |
Good. I will release it with next version. About your issue with Node-RED. You can use msg.payload['temperature/0']. Is not so clean but it works. |
Released with 1.11.4 |
Removing milestone: 1.11.4 (automated comment) |
Originally reported by: Albert Weterings (Bitbucket: AlbertWeterings, GitHub: Unknown)
I'm trying to get the ID of my Dallas sensors into a MQTT message together with the temperature. Is this already possible or can you point me to where in the code I can make changes to get this?
in a different application I log sensor values to a DB together with the sensor ID and time currently when I connect multiple Dallas sensors I can't identify the sensor. I would like to change this application to ESPurna there for the sensor ID is needed..
The text was updated successfully, but these errors were encountered: