Ich versuche, OpenHAB eine Philips Hue Farbglühlampe zu steuern. Ich habe die Hilfe eines Freundes in einigen der Dateien verwendet, kann sie aber immer noch nicht über die Benutzeroberfläche steuern. Hier ist, was in [email protected]:/opt/openhab/configurations/sitemaps $ vim iotpi.sitemap
existiert:Die Benutzeroberfläche kann die Philips Hue Farbglühlampe nicht steuern
sitemap demo label="Main Menu"
{
Frame label="Lights" {
Switch item=Toggle_1 label="Garage"
Colorpicker item=Color_1 visibility=[Toggle_1==ON] label="Garage Light Color"
Slider item=Dimm_1 visibility=[Toggle_1==ON] label="Garage Brightness"
Slider item=CT_Dimm_1 visibility=[Toggle_1==ON] label="Garage Color Temperature"
}
}
Hier ist, was in [email protected]:/opt/openhab/configurations/rules $ vim iotpi.rules
existiert:
import org.openhab.core.library.types.*
import org.openhab.model.script.actions.*
import org.openhab.core.persistence.*
//var DecimalType hue = new DecimalType(240) // 0-360; 0=red, 120=green, 240=blue, 360=red(again)
//var PercentType sat = new PercentType(100) // 0-100
//var PercentType bright = new PercentType(100) // 0-100
//var HSBType light = new HSBType(hue,sat,bright)
rule "Garage Light"
when
Item Toggle_1 received command
then
if(receivedCommand==ON) {
sendCommand(Toggle_1, ON)
//sendHttpGetRequest("http://<ip_address>/cgi-bin/do?cmd=ir_code&ir_code=A05FBF00")
} else if(receivedCommand==OFF) {
// turn off Dune HD and AVR
//sendHttpGetRequest("http://<ip_address>/cgi-bin/do?cmd=ir_code&ir_code=A15EBF00")
sendCommand(Toggle_1, OFF)
}
end
Und hier ist es, was in existiert mein [email protected]:/opt/openhab/configurations/items $ vi iotpi.items
:
Switch Toggle_1 "Garage bulb" (Switching) {hue="3"}
Color Color_1 "Garage bulb" (Colorize) {hue="1"}
Dimmer Dimm_1 "Garage bulb" (WhiteDimmer) {hue="1;brightness;30"}
Dimmer CT_Dimm_1 "Garage bulb" (CTDimmer) {hue="1;colorTemperature;30"}
Auch habe ich die folgenden in beiden openhab.cfg
und openhab_default.cfg
Dateien in configuration
Ordner:
hue:ip=192.168.1.105
hue:secret=openHABRuntime
hue:refresh=10000
Ich bin nicht sicher, was die fehlenden Teile sind und warum der Farbton nicht durch Openhab UI gesteuert werden kann, die auf Raspberry Pi 2 Modell B wird
Wenn ich die Pi IP zu sehen, wird die folgende schaltet laufen Ohne mich zu unterbrechen, bin ich mir nicht sicher, wer die ON/OFF-Befehle an die Benutzeroberfläche sendet, da sie sich alle paar Sekunden ohne Unterbrechung ändert.
Dies ist, was events.log
in openhab
log
Ordner zeigt:
2016-03-22 23:39:40 - Toggle_1 received command ON
2016-03-22 23:39:40 - Toggle_1 received command ON
2016-03-22 23:39:40 - Toggle_1 received command ON
2016-03-22 23:39:40 - Toggle_1 received command ON
2016-03-22 23:39:40 - Toggle_1 received command ON
2016-03-22 23:39:40 - Toggle_1 received command ON
2016-03-22 23:39:40 - Toggle_1 received command ON
2016-03-22 23:39:40 - Toggle_1 received command ON
2016-03-22 23:39:40 - Toggle_1 received command ON
2016-03-22 23:39:40 - Toggle_1 received command ON
2016-03-22 23:39:41 - Toggle_1 received command ON
2016-03-22 23:39:41 - Toggle_1 received command ON
2016-03-22 23:39:41 - Toggle_1 received command ON
2016-03-22 23:39:41 - Toggle_1 received command ON
2016-03-22 23:39:41 - Toggle_1 received command ON
2016-03-22 23:39:41 - Toggle_1 received command ON
2016-03-22 23:39:41 - Toggle_1 received command ON
2016-03-22 23:39:41 - Toggle_1 received command ON
2016-03-22 23:39:41 - Toggle_1 received command ON
2016-03-22 23:39:41 - Toggle_1 received command OFF
2016-03-22 23:39:41 - Toggle_1 received command ON
2016-03-22 23:39:41 - Toggle_1 received command OFF
2016-03-22 23:39:41 - Toggle_1 received command OFF
2016-03-22 23:39:41 - Toggle_1 received command OFF
2016-03-22 23:39:41 - Toggle_1 received command OFF
2016-03-22 23:39:41 - Toggle_1 received command OFF
Und hier ein paar Zeilen aus einer anderen Protokolldatei 2016_03_22.request.log
:
0:0:0:0:0:0:0:1 - - [22/Mar/2016:23:40:41 +0000] "GET /openhab.app?sitemap=iotpi&poll=true&__async=true&__source=waHome HTTP/1.1" 200 2310
0:0:0:0:0:0:0:1 - - [22/Mar/2016:23:40:42 +0000] "GET /openhab.app?sitemap=iotpi&poll=true&__async=true&__source=waHome HTTP/1.1" 200 1925
0:0:0:0:0:0:0:1 - - [22/Mar/2016:23:40:43 +0000] "GET /openhab.app?sitemap=iotpi&poll=true&__async=true&__source=waHome HTTP/1.1" 200 644
0:0:0:0:0:0:0:1 - - [22/Mar/2016:23:40:43 +0000] "GET /openhab.app?sitemap=iotpi&poll=true&__async=true&__source=waHome HTTP/1.1" 200 644
0:0:0:0:0:0:0:1 - - [22/Mar/2016:23:40:44 +0000] "GET /openhab.app?sitemap=iotpi&poll=true&__async=true&__source=waHome HTTP/1.1" 200 644
0:0:0:0:0:0:0:1 - - [22/Mar/2016:23:40:44 +0000] "GET /openhab.app?sitemap=iotpi&poll=true&__async=true&__source=waHome HTTP/1.1" 200 644
0:0:0:0:0:0:0:1 - - [22/Mar/2016:23:40:45 +0000] "GET /openhab.app?sitemap=iotpi&poll=true&__async=true&__source=waHome HTTP/1.1" 200 644
0:0:0:0:0:0:0:1 - - [22/Mar/2016:23:40:45 +0000] "GET /openhab.app?sitemap=iotpi&poll=true&__async=true&__source=waHome HTTP/1.1" 200 644
0:0:0:0:0:0:0:1 - - [22/Mar/2016:23:40:46 +0000] "GET /openhab.app?sitemap=iotpi&poll=true&__async=true&__source=waHome HTTP/1.1" 200 644
0:0:0:0:0:0:0:1 - - [22/Mar/2016:23:40:47 +0000] "GET /openhab.app?sitemap=iotpi&poll=true&__async=true&__source=waHome HTTP/1.1" 200 644
0:0:0:0:0:0:0:1 - - [22/Mar/2016:23:40:47 +0000] "GET /openhab.app?sitemap=iotpi&poll=true&__async=true&__source=waHome HTTP/1.1" 200 644
0:0:0:0:0:0:0:1 - - [22/Mar/2016:23:40:48 +0000] "GET /openhab.app?sitemap=iotpi&poll=true&__async=true&__source=waHome HTTP/1.1" 200 644
0:0:0:0:0:0:0:1 - - [22/Mar/2016:23:40:48 +0000] "GET /openhab.app?sitemap=iotpi&poll=true&__async=true&__source=waHome HTTP/1.1" 200 644
0:0:0:0:0:0:0:1 - - [22/Mar/2016:23:40:49 +0000] "GET /openhab.app?sitemap=iotpi&poll=true&__async=true&__source=waHome HTTP/1.1" 200 2310
Endlich:
[email protected]:/opt/openhab/logs $ vi openhab.log
2016-03-22 23:35:07.415 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.8.1).
2016-03-22 23:35:14.419 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
2016-03-22 23:35:14.606 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Discovery initialization completed.
2016-03-22 23:35:21.676 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'demo.script'
2016-03-22 23:35:23.349 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'rrd4j.persist'
2016-03-22 23:35:23.484 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'logging.persist'
2016-03-22 23:35:23.550 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'db4o.persist'
2016-03-22 23:35:23.586 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'exec.persist'
2016-03-22 23:35:23.736 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'iotpi.items'
2016-03-22 23:35:23.872 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'demo.items'
2016-03-22 23:35:34.028 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
2016-03-22 23:35:34.783 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'demo.sitemap'
2016-03-22 23:35:35.405 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'iotpi.sitemap'
2016-03-22 23:35:35.459 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'buiten.sitemap'
2016-03-22 23:35:39.918 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /classicui/openhab.app
2016-03-22 23:35:46.003 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'zwave.rules'
2016-03-22 23:35:46.977 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'demo.rules'
2016-03-22 23:36:04.466 [WARN ] [.o.c.p.e.PersistenceExtensions] - There is no queryable persistence service registered with the name 'rrd4j'
2016-03-22 23:36:04.478 [ERROR] [m.r.internal.engine.RuleEngine] - Error during the execution of startup rule 'Update max and min temperatures': cannot invoke method public abstract org.openhab.core.types.State org.openhab.core.persistence.HistoricItem.getState() on null
2016-03-22 23:36:04.494 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'iotpi.rules'
2016-03-22 23:36:04.610 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'hue.rules'
2016-03-22 23:36:04.869 [INFO ] [.service.AbstractActiveService] - NTP Refresh Service has been started
2016-03-22 23:36:05.021 [INFO ] [.service.AbstractActiveService] - HTTP Refresh Service has been started
2016-03-22 23:36:06.127 [INFO ] [.p.rrd4j.internal.RRD4jService] - Removing invalid defintion component = null heartbeat = 0 min/max = 0.0/0.0 step = 0 0 archives(s) = [] 0 items(s) = []
2016-03-22 23:36:12.314 [INFO ] [.service.AbstractActiveService] - Hue Refresh Service has been started
2016-03-22 23:36:13.497 [INFO ] [g.openhab.model.script.Weather] - Temperature evolved of 0 degrees.
~
Hier ist der Link zu meinem GitHub des neuesten Openhab wie in diesem Problem beschrieben: https://github.com/lamiastella/OpenHAB