Sensor add-on identifier targeting
Closed this issue · 0 comments
AaronLionsheep commented
It appears there is no standard for which sensors are exposed as channels 1-3, so it might be necessary to target a sensor by its unique identifier.
There is a topic shellies/<model>-<deviceid>/ext_temperatures
which publishes the data:
{
"0":{"hwID":"XXXXXXXX","tC":20.5},
"1":{"hwID":"YYYYYYYY","tC":21.5},
"2":{"hwID":"ZZZZZZZZ","tC":22.5}
}
There is also a topic shellies/<model>-<deviceid>/ext_humidities
which publishes the data:
{
"0":{"hwID":"XXXXXXXX","hum":50}
}
One solution could be to pivot to subscribing to these topics and parsing the json. The device channel dropdown could be enhanced to allow the user to select a specific channel, or to allow the selection of an identifier. Logic to determine if the channel or identifier was selected would be needed to determine how to process messages from the new topic.
Required Changes
- Process messages from the
ext_temperatures
andext_humidities
topics - Host device stores connected sensor identifiers
- User action to log connected sensor identifiers
- List generator to allow the selection of a channel or sensor identifier
- Parse new channel/identifier and extract sensor value from the new topics