Hi everyone,
I’m very new to this whole thing but I am very eager to learn and have been enjoying spending the last couple of weeks learning how OpenHab 2 can make me even smarter, or lazier for some, than I already am.
I am running OH2 on the current LTS of Ubuntu (16.04). Within OH2 (2.1.0) I have the network binding, WoL binding, harmonyhub binding and Exec binding installed.
I have been successful in being able to write a couple of rules that wake different PC’s up that I have on my home network.
Problem: I am trying to add a rule to one of my harmony activities that will trigger a WoL. I have a home theatre setup with a PC/projector/tuner. Within Harmony, I have an activity called “Theatre” that will turn on the projector and the tuner to the correct settings. I have not been able to figure out a rule to trigger a WoL for the PC.
Here is what I have so far and to be honest, after browsing a number of threads, I seem more lost than when I started.
.items
String harmony_hub “activity [%s]” {harmonyhub=“harmonyhub:hub:HarmonyHub:currentActivity”}
.rules
rule “Home Theatre"
when
Item harmony_hub received command Theatre
then
wol=”<broadcastIP>#<MAC>"
end
I’m not very knowledgeable on how to get logs out of things, but from looking at the logs when I invoke a change through PaperUI this is what I get:
20:30:06.809 [INFO ] [marthome.event.ItemStateChangedEvent] - harmonyhub_hub_HarmonyHub_currentActivity changed from PowerOff to Theatre
20:30:06.809 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘harmonyhub_hub_HarmonyHub_currentActivity’ received command Theatre
It seems that when I had ‘simple mode’ enabled that an item was automatically created called “harmonyhub_hub_HarmonyHub_currentActivity.” When I change the rule and test it with that item, this is the error I get:
20:46:15.843 [INFO ] [marthome.event.ItemStateChangedEvent] - harmonyhub_hub_HarmonyHub_currentActivity changed from PowerOff to Theatre
20:46:15.844 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘harmonyhub_hub_HarmonyHub_currentActivity’ received command Theatre
20:46:15.854 [ERROR] [.script.engine.ScriptExecutionThread] - Rule ‘Home Theatre’: An error occurred during the script execution: Couldn’t invoke ‘assignValueTo’ for feature JvmVoid: (eProxyURI: default.rules#|::0.2.0.2.0.0::0::/1)
So two things I guess, how do I fix this item since I don’t have it in my .item file and it is just within the PaperUI database, and how can I get wol working for this activity?
Any help on how to log or move forward with this is greatly appreciated!
Thanks!!