Is my Dashbutton-Thing REALLY online

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?

It needs to be recognized as a “thing”:

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"
        Channel "amazondashbutton:dashbutton:ac-63-xx-xx-xx-xx:press" triggered  
        logInfo("Test","DASHBUTTON: The dash button has been pressed")

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)

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 “” 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 …?

That’s optinal, but recommended.

Use notepad++, avoid windows notepad or word or anything like that. Best way to edit your files is either through, ESHD vim, nano or notepad++.

Good luck

o.k. i’ve tried the following steps:

I’ve created a file "DashButtonGilette.rules in this folder. This is the code:

rule "Dash button pressed"
    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

… or are there other suggestions out there?

If you forgot to select the demo setup at initial startup of openHAB you may find those files here:

See my picture above. You need to see the dashbutton under “Things” in PaperUI and it needs to say “Online”.

Thing, Thomas, Thing, not Item :grinning: For that little sample rule you don’t need an item at all, only the thing and a dashbutton which is online.

Or you can go with VSCode with openHAB extension :slight_smile:

1 Like

Arrrghh, forgot the most important one, sorry :grinning:

1 Like

Arrgh … I meant “Thing” of course … sorry

Okay, it your device thing is green and online and you don’t have any errors in your openhab.log that trigger should work.

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.

… … for this i start an new thread later …

1 Like