- Platform information: Raspberry Pi Nano
- Hardware: Raspberry Pi Nano
- OS: Rasbian image from openHABian
- Java Runtime Environment:Zulu Embedded OpenJDK Java 8
- openHAB version: 2
- Issue of the topic:
I added Phillip Hue bindings and added all of my lights in PaperUI. Everything works great there.
Now I’m attempting to add Hue Sensors using info from this posting.
Below is a summary of changes made based on that thread. My question is where am I supposed to see the Hue Sensor? I don’t see them in PaperUI: Things or Control. I’ve tested the sensor using these guide Get Started - Philips Hue Developer Program. Also in the HabPanel when I add a widget, I see these Items in the drop down:
Skur_HUE_Motion
Skur_HUE_Temp
but they don’t do anything.
- Please post configurations (if applicable):
I added HTTP binding in PaperUI. I tried searching HTTP in inbox. Nothing.
Javascript Transformation is is installed.
\Rasberry_IP\openHAB2-conf\transform\getHueTemperature.js
(function(i) {
var json = JSON.parse(i);
return ((json['state']['temperature']))/100;
})(input)
\Rasberry_IP\openHAB2-conf\transform\getHueMotionEvent.js
(function(i) {
var json = JSON.parse(i);
return ((json['state']['presence'])) == true ? "ON" : "OFF";
})(input)
\Rasberry_IP\openHAB2-conf\sitemaps\Hue_Sensors.sitemap (note part of this was from the HomeBuilder site)
sitemap our_home label="Our Home" {
Frame label="Ground Floor" icon="groundfloor" {
Group item=GF_Bedroom
Group item=GF_Downstairs
}
Frame label="First Floor" icon="firstfloor" {
Group item=FF_Bedroom
}
Frame {
Text item=Skur_HUE_Temp // Notice that I have the text formatting in my items file.
}
}
}
\Rasberry_IP\openHAB2-conf\services\addons.cfg
binding = hue,http1 [edit 01/09/2018] removed quotes from this line (was binding = “hue,http1”
transformation = “javascript” [edit 01/09/2018] removed quotes from this line (was transformation = “javascript”
\Rasberry_IP\openHAB2-conf\services\http.cfg
hueCache.url=HUE_IP/api/secret_key/sensors [edit] 01/08/2018 - I now know this should have been hueCache.url=HTTP://HUE_IP/api/secret_key/sensors
hueCache.updateInterval=3000
\Rasberry_IP\openHAB2-conf\items\Hue_Sensors.items (Note I tried using and not using the hueCache)
Switch Skur_HUE_Motion <present> (gSkur) { http="<[hueCache/19:3000:JS(getHueMotionEvent.js)]" }
Number Skur_HUE_Temp "Skur temp [%.2f °C]" <temperature> (gSkur) { http="<[hueCache/6:300000:JS(getHueTemperature.js)]" }
PS as this is my first post, Hello and BTW I’m very impressed with everything I’ve seen in openHAB. The setup was a breeze.
- If logs where generated please post these here using code fences: