I configured some (about 20) Items using same http-Request with json-Transformation.
All working fine.
To reduce Network-Usage I put http://Server/json?parameters=123 in http.cfg like
Status.url=http://Server/json?parameters=123
Status.updateInverval=60000
Since using cached Item I dont get Item Updates anymore.
While testing remember another item using http cache: Should run every 15 Minutes but only gets updates irregular sometimes after 2, sometimes after 3 days, sometimes twice a day.
Any idea how to search? Is there a problem with cached Items in Version 2.5.4? Where is the storage for the cache, so I could look for requested file.
What’s the Item config? Keep in mind there are two polling periods. There is the updateInterval in http.cfg which controls how often the binding pulls the data from the URL. And on the Item there is a number that represents how often the Item pulls data from the cache.
Number R2D2X_Status "R2D2X Status Direkt [MAP(robonect_status.map):%s]" (gR40, gR40Chart2, gHistoryMi, gHistoryCh) { http="<[http://10.10.10.161/json?user=BLA&pass=NOCHMALBLA&cmd=status:60000:JSONPATH($.status.status)]"}
Doesnt work:
Number R2D2X_Status "R2D2X Status Direkt [MAP(robonect_status.map):%s]" (gR40, gR40Chart2, gHistoryMi, gHistoryCh) { http="<[R2D2_Status:60000:JSONPATH($.status.status)]"}
Just trying item for Item, with only 2 or 3 Items with cache it seems to work.
I have some Items with JSONSPATH gave a (ONE TIME ONLY) warning in Logs (no Error), because those json tree only sometimes in JSON. Maybe those warning causes http to stop?
The first thing you would need to do is to get the “whole raw message” into a String type Item, so that you could process it in a rule. You might as well set that up anyway, as it is a diagnostic step in itself.
Now I’ve slept on it, I’m not so persuaded your “missing-JSON” errors are related to your “irregular updates”.
Each Item with a JSON transform should be doing its work individually. It’s hard to see how one messing up could mess up any others.
Using a rule to do your JSON processing certainly will be tidier for you, instead of having a config that you know will produce errors. But I do not now think it would help your general updates.
So let’s look at general http.cfg
Is that it, just the two lines you’ve shown us? I would look at increasing the timeout from default 5s for a start.
What kind of service is the target? I see robonect mentioned - isn’t there a specific binding for that?
v1.x bindings make a working copy of the configuration file - http.config in this case - which can get out of step when you edit http.cfg.
Once you have .cfg as you want it, stop openHAB, delete the http.config version, restart OH (the file will be recreated)