- The main config file is in /etc/pilight/config.json
- Connect your 433 MHz receiver and sender to the pins mentioned in the config file (default: sender - pin0, receiver - pin1). I have an extension board, so maybe the numbering will be different for you. Here is the mapping between the two numbering:
- pilight-receive - run it from command line, then press the button on your remote
- It will display a lot of possible decoding of your protocol. Try to find one, which you think is correct.
- Go to https://wiki.pilight.org/doku.php and search for your protocol to find an implementation with sample code.
- sudo service pilight stop; sudo nano config.json - stop pilight and open config.json
- Copy the sample code to config.json and change according to the received values (usually change the id, unit etc.).
- Test it with: sudo service pilight start; sudo service pilight status
- If it says: "pilight failed to start" check the debug messages with sudo pilight-daemon -D Probably there is an error in config.json. Fix it, and try again.
- If it works, access the web interface under the port written in config.json.
- Try to change the value, or just see if it is changed by pressing the buttons on the remote
- If not, try an other result of pilight-receive
{
"devices": {
"openDoor": {
"uuid": "0000-b8-27-eb-fd662e",
"protocol": [ "kaku_switch_old" ],
"id": [{
"id": 20,
"unit": 2
}],
"state": "off"
},
"plugA": {
"protocol": [ "kaku_switch" ],
"id": [{
"id": 2683906,
"unit": 0
}],
"state": "on"
},
"plugA_old": {
"protocol": [ "kaku_switch_old" ],
"id": [{
"id": 8,
"unit": 2
}],
"state": "off"
}
},
"rules": {},
"gui": {
"openDoor": {
"name": "Door open sensor",
"group": [ "Living" ]
},
"plugA": {
"name": "Plug A - desk lamp",
"group": [ "Living" ]
}
},
"settings": {
"log-level": 6,
"pid-file": "/var/run/pilight.pid",
"log-file": "/var/log/pilight.log",
"webserver-enable": 1,
"webserver-root": "/usr/local/share/pilight/",
"webserver-http-port": 5001,
"webserver-cache": 1
},
"hardware": {
"433gpio": {
"sender": 0,
"receiver": 1
}
},
"registry": {
"pilight": {
"version": {
"current": "7.0"
}
}
}
}
No comments:
Post a Comment