• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Start command/script on pulse receive
#11
Just a heads up, I have received the receiver and hooked it up. So I tried getting piautomator respond to on-off events of the remote control. I ended up adding a new location to the pilight config.json like so

Code:
"remotes": {
        "name": "Remotes",
        "remote-1": {
            "name": "downstairs-unit-1",
            "protocol": [ "kaku_switch" ],
            "id": [{
                "id": 11449862,
                "unit": 0
            }],
            "state": "on"
        },
        "remote-2": {
            "name": "downstairs-unit-2",
            "protocol": [ "kaku_switch" ],
            "id": [{
                "id": 11449862,
                "unit": 1
            }],
            "state": "on"
        },
        "remote-3": {
            "name": "downstairs-unit-3",
            "protocol": [ "kaku_switch" ],
            "id": [{
                "id": 11449862,
                "unit": 2
            }],
            "state": "on"
        }
    }

I then added a simple rule to my automation config like so:
Code:
- when input.pilight.remotes.remote-1.state is equal to on then turn christmastree on
- when input.pilight.remotes.remote-1.state is equal to off then turn christmastree off

This way I can switch kaku (and anything else) without having to let the receiver learn that particular code. I like that, cause it makes it easier to reassign remotes to to other things. Particularly when the receivers are built into wall sockets etc.. No more need to unscrew everything Smile
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  pilight-receive terminates zackdvd 8 1,792 12-30-2017, 09:07 PM
Last Post: curlymo
  pilight nightly does not start up, no log entries PT-Biker 4 1,746 06-09-2017, 06:34 AM
Last Post: PT-Biker
  pilight-daemon fails to start 2 of 3 times tietze111 4 1,845 12-11-2016, 09:06 PM
Last Post: tietze111
  Relation between raw-output and pulse length TheWheel 9 4,739 12-11-2016, 12:29 PM
Last Post: andies
  pilight-receive not recognizing kaku remote Michel 1 1,778 01-23-2016, 09:27 PM
Last Post: wo_rasp
  Running script one time. yabapolido 8 4,956 12-03-2015, 01:48 PM
Last Post: Prutsky
  pilight does not start tihe 6 5,392 11-14-2015, 12:49 PM
Last Post: tihe
  Error message when start of pilight failed. Landixus 8 7,339 07-25-2015, 06:53 PM
Last Post: curlymo
  pilight-receive tobid 9 3,876 05-26-2015, 04:44 PM
Last Post: pilino1234
  Execute python script from Generic Switch? panton 4 3,386 04-28-2015, 07:58 AM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)