Hi Everyone,
first time openhab user here, excuse me if i’m asking/missing a silly thing.
I did look around on the forum but didn’t find an answer to my question.
setup: OH3 running in docker, mosquitto bridge set up - works fine.
I’m experimenting with homeassistant mqtt autodetect.
I manually post the HA sensor example to the autodiscovery topic on my mqtt broker: topichomeassistant/sensor/sensorBedroomT/config message{"device_class": "temperature", "name": "Temperature", "state_topic": "homeassistant/sensor/sensorBedroom/state", "unit_of_measurement": "°C", "value_template": "{{ value_json.temperature}}" }
and topichomeassistant/sensor/sensorBedroomH/config message{"device_class": "humidity", "name": "Humidity", "state_topic": "homeassistant/sensor/sensorBedroom/state", "unit_of_measurement": "%", "value_template": "{{ value_json.humidity}}" }
as expected this results in two devices popping up in my inbox: screenshot removed
then I post a measurement to the state topic (as per the HA example) topichomeassistant/sensor/sensorBedroom/state message{ "temperature": 23.20, "humidity": 43.70 }
at this stage I was expecting the values to show up automagically in OH3,
as individual channels under the thing(s). But the channels remain unpopulated. screenshot removed
What am I missing? How to get values populated automatically in the channels?
(or ideally as multiple channels under the ‘one thing’ , but baby steps first )
thanks, and my apologies for the long post.
(i had to remove most of the screenshots - as i’m a new member - hope it still makes senses)
I have not had good luck with the homeassistant auto discovery, for some things the discovery seems to make some channels that make sense, for others barely anything that makes sense.
I am using it together with Zigbee2mqtt so i thought it might have been on that end the problem resides, this however indicates something else
I am using zigbee2mqtt with homeassistant-autodiscovery, too. And it is working perfect.
As stated before you need both Transformations, JSONPath and JINJA to get the results you are looking for.
@Christian_Brosius I also don’t quite think I was saying that it did not work, I stated that I did not get the results that I was looking for.
For me if I have to specify both JSONPath and JINJA transformations to get the information that I need out of a channel it would be much easier to just specify the channel directly on a attribute topic instead, then I don’t need to do any transformations
Great! adding those two addons made the channel show up.
There wasn’t any mention of this in the documentation, and I was expecting dependencies like this to be handled by OH. Anyway I created a PR for the docs adding a short note. (but now github is complaining about something sign-off :-/ … ah well, get OH3 up first) .
anyway, thanks for the help.
Still, any idea why OH3 is garbling _ as _5F?
(5F a straight ASCII hex encoding of _ so it smells like a bug to me, but maybe i’m still missing something in the config.)