I recently bought four smart plugs from tp-link that I’ve managed to get set up. Two of them are supposed to turn on and off my LEDs. I already tried it with Time cron, but the Astro binding I’ve found online is not working. I would really appreciate help because I can’t tell what I’ve done wrong.
rule "sunset HS100c & HS100d"
when
Channel 'astro:sun:home:rise#event' triggered START
then
sendCommand(HS100c, OFF)
sendCommand(HS100d, OFF)
end
rule "turn off HS100c & HS100d"
when
Time cron "0 30 22 1/1 * ? *"
then
sendCommand(HS100c, OFF)
sendCommand(HS100d, OFF)
end
Yes, I am able to trigger the HS100c with a switch and with the cron trigger. I got the Astro binding installed.
When I used HS100c.sendCommand(OFF), the cron trigger didn’t work either. I will try your advice tomorrow though and give you another update. Thanks for the answer.
Just tried, and still. The switch works, the HS100*.sendCommand(ON) only works when using a cron trigger. Are you sure that my astro code is configured right?
Hidden quite well, the doc says start not START.
So do your Items work?
But the rule does not depend on the items.
Please look into paperUI if the astro binding is really installed as there is a bug which uninstalls bindings.
Do you have events in you log showing the astro binding working?
Add a log so you see if the rule gets trigger.
logInfo("RuleTest", "MyRulesTest")
please show all your items, ruels, sitmap files with regarding elements.
As the engine stops working propperly when there are other errors reduce yor setup to only the things you need. And reboot. Show this minimal example. And explain what you expect and what does not work in detail.
It is sometimes something different that causes the error. Have a look into your logfile.
Hello, sorry for the late reply. I rewrote my rules file with your tips and now it works. Thank you very much for giving me the tips, I’m really grateful thank you.