After upgrading to OH2 (latest SNAPSHOT), I fail to see how I get these (poll) events? Any help on how to configure or workaround this issue will be highly appreciated.
Hi! I tried same things but i get always ânullâ in my sitemap. Can u pls post every detail (item, js, part of the sitemap) for the motion sensor? THX!
Hi Holger,
Sorry for late reply. Christmas, new Year and all - you know Did you get it solved already?
My problem was that I had written http and not http1 in my addons.cfg file. That didânt work. Simultaneously I tried to install the binding via Karaf console. It worked but it didnât persist. For some reason i experienced the binding to become uninstalled automatically. It was first after putting http1 in the bindings list it worked for me.
My addons.cfg file:
# A comma-separated list of bindings to install (e.g. "sonos,knx,zwave")
binding = zwave,hue,http1,ihc1
(function(i) {
var json = JSON.parse(i);
return ((json['state']['temperature']))/100;
})(input)
My sitemap
Text item=Skur_HUE_Temp // Notice that I have the text formatting in my items file.
It can take a little while before the value is updated, no matter what your poll interval is. I think it is a matter of the bridge responding or something.
I would have two questions here: First, where is the secret key stored in OH2 if not migrated from OH1? Second, where have the java script file to be put? Thx!
You find the key in your things definition. Look out for this section:
Bridge hue:bridge:1 [ ipAddress=â192.168.x.yâ, userName=âabcdefghijklmnopqrstuvwxyzâ ] {
0210 wz2 [lightId=â1â]
0210 bl [lightId=â2â]
0210 wz1 [lightId=â3â]
0210 wi [lightId=â4â]
}
Simply take the userName as key.
Concerning Java script: put the script in conf/transform. If you hadnât done it yet, add âjavascriptâ in the transformation section of your addons.cfg.
Using log4j.logger.org.openhab.binding.http = DEBUG in the org.ops4j.pax.logging.cfg file gives me this messeage for all motion items.
[DEBUG] [ab.binding.http.internal.HttpBinding] - item 'Mgang' is not a valid URL or is a cache id yet to be initialised (192.168.x.xx/api/username/sensors/12)