Pilight 433GPIO Broken with Latest Firmware for Raspberry Pi

FYI - Pilight’s 433GPIO protocol breaks with the latest RPI Firmware.

This is known on the Pilight forums (https://forum.pilight.org/Thread-solved-Boot-from-USB-WiringX-Kernel-4-9-x?highlight=433gpio - Post 4), but took me several hours to diagnose why it stopped working. Most of my internet searches came up blank and it took some digging in the pilight forum to find out this info. So I’m passing it along to you to save you some time!

If you need to update to the latest firmware due to upgrade/reinstall, etc. make sure to use the Development branch of Pilight. To do so, perform the following steps:

  1. Backup your Pilight config (/etc/pilight/config.json)

  2. Uninstall Pilight automatically if it was installed using apt-get (sudo apt-get remove pilight)

  3. Uninstall Pilight manually if it was installed using other methods (whereis pilight - remove all directories/files)

  4. Install the Development branch of Pilight using the manual installation method (https://manual.pilight.org/en/installation#pf3

  5. Stop pilight if you started it (sudo service pilight stop)

  6. Update the /etc/pilight/config.json file with your settings. Do NOT restore your original /etc/pilight/config.json file, as there are new changes in the Development branch of pilight. Instead use it as a reference to edit the new /etc/pilight/config.json file.

  7. Start pilight (sudo service pilight start)

Enjoy!

1 Like

I was just typing up some similar advice when your thread popped up, tho’ I just reverted back to kernel 4.4.5.

Thx for the info. Just to add: It is very useful to check if pilight works after the installation by running pilight-daemon -D in the terminal to spot config issues. E.g.: the std. webserver port in the std. config did not work for me, so I deactivated it

Hi @jeremyowens
I’ve set up a new installation with Hassbian / HA 0.46 and I’m trying to get pilight up and running with no luck. The system is a raspberry 2 with Kernel 4.9.

I did the manual installation of pilight as recommended on the HA website, but it did not work when the service was started:
ERROR: config hardware module #1 “433gpio” does not exist

Your post brought me to use the development branch of pilight instead, but the setup fails due to the missing libwiringx library. Manually building that did not resolve the issue.
Did it work for out of the box after just switching to the development branch?

HA + Pilight has been a very poor experience so far. Seems like the HA documentation is outdated and not many people use it at all…

Thanks
Jochen

While my post isn’t necessarily written to be a step-by-step guide for installing/setting up pilight, I’ll give you a quick rundown of what I did to make it work.

I assume that you’ve already done the typical things to get you this far:

sudo apt-get update
sudo apt-get upgrade
sudo rpi-update

Once you’ve run the above commands and restarted your PI, start my guide in Post 1 over again. Make sure that when you follow (my) Step 4 (installing pilight dev version), that you don’t skip any steps on the pilight instructions. Read their numbers if you have to in order to make sure you don’t skip a step. Skipping a step, such as (their) Step 8, will cause it not to work. Once you’ve completed the pilight install guide, pick back up at (my) Step 5.

When you edit your /etc/pilight/config.json file, it should look something like the following:

{
	"devices": {},
	"rules": {},
	"gui": {},
	"settings": {
		"log-level": 6,
		"pid-file": "/var/run/pilight.pid",
		"log-file": "/var/log/pilight.log",
		"port": 5000,
		"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"
			}
		}
	}
}

I can’t remember exactly which wire is which receiver in pilight, but “receiver: 1” is connected to either GPIO 17 or 27, with “receiver: 2” being the other. When I wired up my PI, I used Ben’s video below. Wire yours the same way, then try out the “receiver: 1” or “receiver: 2” setting in pilight. Mine is currently set to “receiver: 2”, but I could’ve re-wired mine since then. Be sure to stop pilight before editing the config.json file. Once you’ve edited it, restart pilight using (my) Step 7. You can confirm that everything is working properly with pilight by running the command: sudo pilight-receive

Ben’s 433 MHZ RF Outlets Version 3 Video

Also note that if you re-run the pilight ./setup.sh command, it will overwrite your /etc/pilight/config.json file and you’ll need to update it again. I usually just make a copy of it prior to running the installer, then copy it back after the installer finishes

Before re-running installer: sudo cp /etc/pilight/config.json /etc/pilight/config.json.working

After re-running installer: sudo cp /etc/pilight/config.json.working /etc/pilight/config.json

Hmm been trying to install the dev version of pilight but it’s impossible as it needs stuff from wiringX but some of the library code needs stuff from wiringx :frowning:

OK, figured it out the config.json needs “gpio-platform”: “raspberrypi3” under settings and it magically starts working after rolling back the kernel :frowning: using sudo rpi-update 52241088c1da59a359110d39c1875cda56496764

I’m sorry to say I tried your set up, and get to section 4 and get the following error of`—root@raspberrypi2:~# git clone --depth 5 -b [branch] GitHub - pilight/pilight: open source domotica solution
Cloning into ‘pilight’…
warning: Could not find remote branch [branch] to clone.
fatal: Remote branch [branch] not found in upstream origin

Re-read step 3 of the pilight guide and replace the word [branch] with the name of the actual branch that you wish to install (either nightly or stable as listed in the examples).

I did this intentionally so that everyone would read the guide, as I did not write it, and if pilight made changes to it, that my steps wouldn’t need to be updated.

Thanks for your reply I have read the instructions several times and replaced the word branch with Master or Development & still had no success in getting this installed.

Make sure you type “development” in all lowercase. If that still isn’t working, try the “nightly” branch. If that still doesn’t work, I’ll poke around on the pilight forums to figure out why the install fails.

Still no joy went back and make sure that I had all the dependence, and make sure everything was in lower case but I still get the same error,

I just tried it on a fresh RPi 3. Here’s what I used to install it:

pi@pi:~ $ sudo su

root@pi:/home/pi# git clone --depth 5 -b development https://www.github.com/pilight/pilight.git

Cloning into 'pilight'...
remote: Counting objects: 993, done.
remote: Compressing objects: 100% (607/607), done.
remote: Total 993 (delta 483), reused 638 (delta 371), pack-reused 0
Receiving objects: 100% (993/993), 2.08 MiB | 3.07 MiB/s, done.
Resolving deltas: 100% (483/483), done.
Checking connectivity... done.

root@pi:/home/pi#

Cheers thanks for your reply but I’ve just literally just figured it out myself, there you should be:–“git clone --depth 5 -b development https://github.com/pilight/pilight.git” these are instead of metres --“git clone --depth 5 -b [development] https://github.com/pilight/pilight.git
Thanks for your help and patience.:blush:

I’m now getting the error:-
> CMake Error at CMakeLists.txt:282 (message):
Looking for libwiringx - not found
– Configuring incomplete, errors occurred!
See also “/home/pi/pilight/build/CMakeFiles/CMakeOutput.log”.
make: *** No rule to make target ‘install’. Stop.

I didn’t have to install it on my latest one, however I think I did on my original one. Try running the following:

sudo apt-get update
sudo apt-get install build-essential

Then, rerun the “./setup.sh” command again (as sudo).

I tried that didn’t work for me :cry: I’m determined to get is going.

I can get the master version to compile but the developer version just will not do so without errors.

Will one of the nightly builds work?

I haven’t managed to get none of the nightly builds compiled, keep getting:-
> CMake Error at CMakeLists.txt:282 (message):
Looking for libwiringx - not found
– Configuring incomplete, errors occurred!
See also “/home/pi/pilight/build/CMakeFiles/CMakeOutput.log”.
make: *** No rule to make target ‘install’. Stop.

Not sure what else I can do to get this working.