Hi,
i like to controll my Hue Bulbs with a Amazon Dash-Button. The Dash-Button is -after some/many tries - recognized as a Item. But my rules (made with the experimental rule engine) won’t work. My Question is: I’m not sure if my DashButton is still recognized as a Item - how can check if there is a remark if i press the button…
My first idea was to check log-files … but the logs i’ve checked where empty (events.log) or only had old entries (openhab.log). Are there other logs? … or do i have to start the logging of acitivities and rules in a separate preference?
Read through the docs again, especially the libpcap section.
Have no experience with that, but creating a simple rules file “dash.rules” with
rule "Dash button pressed"
when
Channel "amazondashbutton:dashbutton:ac-63-xx-xx-xx-xx:press" triggered
then
logInfo("Test","DASHBUTTON: The dash button has been pressed")
end
should give you an entry in your openhab.log when pressing the button.
(Of course you need to edit the mac adress to match your dashbutton)
Hi,
Thanks for your help … Dash button was of course recognized as “thing” and not as “Item” … sorry for that mistake.
And thanks for your idea with the simple rule without using the experimental rule engine … I got little - respectively
“no” knowledge in that.
o.k. i’read the “http://docs.openhab.org/configuration/rules-dsl.html” many times by now … but I fail at first step: where is the conf/rules folder? I’ve installed Openhabian on a RaspberryPi 1 and I’ve searched the folders up and down by putty-connection from my PC. Where is this folder?
Or do I have to install eclipse smart home designer … My hope was to do the first steps with a simple Editor …?
found the “rules”- Folder in /etc/openhab2/rules. I was suprised that the folder was empty - not even found the demo.rules file (as expected becaus of this: http://docs.openhab.org/configuration/rules-dsl.html (chapter “file location”).
I’ve created a file "DashButtonGilette.rules in this folder. This is the code:
rule "Dash button pressed"
when
Channel "amazondashbutton:dashbutton:fc-a6-xx-xx-xx-xx:press" triggered
then end
but still no lifesign in events.log or openhab.log (checkt by tail command and the Folder /var/log/openhab2)
soi’ve also tried a change in the “then”-section
println(“The Dash button has been pressed”)
no result… im quite sure the dashbutton is unkown within openhab (i can see the activity in the router log).
Maybe i try to recognize the DashButton once more as a item. … tomorrow
Yeah, yippieh, yeah … it worked! Unfortunately i’ve no idea “why” … I’ve re-recognized the DashButton as thing, i think i’ve restartet the raspy some times and suddenly the hue light lit up.
I’ve done it with the expermimental rule engine which starts the next challenge: i don’t think that it’s possible to tinker a real on/off - logic … here i need to enhance the coding.
i think somewhere in the system must be a xx.rules - File based on my “clicked” “expermiental engine”-rule… which i’ve to edit.