I would create a new String Channel for this Thing, with no transformation applied: can you confirm that openHAB receives the full JSON payload that you expect?
If so, remove the non-working Channel and create a new one through the UI.
In the top it looks like the HTTP response is correct. Now I am not sure about how to ‘extract’ this into 3 different ‘sensors’ ?
I also receive these errors now in the console log:
21:17:23.779 [WARN ] [rofiles.JSonPathTransformationProfile] - Could not transform state ‘{“meterkast”: {“temperature”: 20.0, “humidity”: 45.0},“bedroom2”: {“temperature”: 20.0, “humidity”: 45.0},“bedroom3”: {“temperature”: 20.0, “humidity”: 45.0}}’ with function ‘JSONPATH:$.meterkast.temperature’ and format ‘%s’
Did you enter transformation in an item profile.
no need to transform on channel and item it won’t work
You could also just add multiple items to the same channel with transformation profile
Edit:
You can’t change the channel type UID after it is created so delete thing and start again you can see this when you try and create an item and it is a different type to the channel. Is it a bug or a feature?
I think I figured it out with your help, my error was that I twice used the JSONPATH transformation.
I will check if this keeps without error, and mark as solution…
I have no errors, and the values get updated in the GUI.
However, the only thing I cannot find/understand is that there is no graph created anymore with historic values.
For simplicity I adjusted the API a little bit, so 1 URL returns only 1 location. In this case I retrieve only 2 values.
Thanks for the feedback and help.
I remove the config, and applied it with http:number again, but even though the channel is online, the values keep in UNDEF state.
I am really disappointed how difficult and unreliable a simple implementation like this is openhab. In these times when we should strive to have ‘the masses’ getting onboard with these tools to prevent energy consumption, this is simply not going to work for the majority, and also not for me.
James, no I did not try, and have no intention anymore. I removed my openhab.
The exact point why, is that for something this simple, I should be writing a new tutorial?
Exactly this should have some people scratch their head and wonder why something simple as an API rest call, and persisting the data, is that difficult in openhab to achieve.
Even though a lot of effort has been put in openhab, at this point in time, it simply cannot be used by people without thorough programming skills, lot’s of patience, and time on their hands for putting into their openhab instance. In my opinion that is a pity.