Can Home Assistant Listen to 433MHz Remotes?

If you are not compiling it it will listen to all anyway. When compiling you get options of which devices/protocols you want to listen for.

The latest version pilight 8 should just install.

Whether you can see the smoke detectors depends on the protocol as well as being sent at 433mhz, if for instance they are manchester encoded the normal python scripts can’t pick them up as they don’t do manchester decoding, pilight does however so it sees most things :slight_smile:

Well it did install initially, but when i tried to uninstall it for a development branch, that’s when things went wrong. I’m sure i will find a way to reinstall it though.

However, back to where i got before i tried to uninstall, i ran the commands service pilight start followed by pilight-receive. The terminal just jumped to the next line and i pushed the doorbell button multiple times, long presses and close to the receiver etc. Nothing showed up in the terminal. Maybe i have to define the GPIO pin for the rx module somewhere? Only thought about that now. But i don’t know where to look if that’s not the place to look for input.

You have to setup the config.json as per the pilight docs…

Here’s an example of mine…

{
	"devices": {
		"pibedroompir": {
			"protocol": [ "kaku_switch_old" ],
			"id": [{
				"id": 31,
				"unit": 1
			}],
			"state": "on"
		},
		"pilivingroompir": {
			"protocol": [ "kaku_switch_old" ],
			"id": [{
				"id": 30,
				"unit": 15
			}],
			"state": "on"
		},
		"pihallpir": {
			"protocol": [ "kaku_switch_old" ],
			"id": [{
				"id": 23,
				"unit": 5
			}],
			"state": "on"
		},
		"pikitchenpir": {
			"protocol": [ "kaku_switch_old" ],
			"id": [{
				"id": 31,
				"unit": 0
			}],
			"state": "on"
		}
	},
	"rules": {},
	"gui": {
		"pibedroompir": {
			"name": "bedroompir",
			"group": [ "bedroom" ],
			"media": [ "web" ],
			"readonly": 0
		},
		"pilivingroompir": {
			"name": "livingroompir",
			"group": [ "livingroom" ],
			"media": [ "web" ],
			"readonly": 0
		},
		"pihallpir": {
			"name": "hallpir",
			"group": [ "hall" ],
			"media": [ "web" ],
			"readonly": 0
		},
		"pikitchenpir": {
			"name": "kitchenpir",
			"group": [ "kitchen" ],
			"media": [ "web" ],
			"readonly": 0
                 }
	}'
	"settings": {
		"log-level": 6,
		"pid-file": "/var/run/pilight.pid",
		"log-file": "/var/log/pilight.log",
		"port": 5000,
		"webserver-enable": 1,
		"webserver-http-port": 5001,
		"webserver-cache": 1,
		"webserver-root": "/usr/local/share/pilight/webgui",
		"standalone": 1,
		"gpio-platform": "raspberrypi3"
	},
	"hardware": {
		"433gpio": {
			"sender": 0,
			"receiver": 1
		}
	},
	"registry": {
		"pilight": {
			"firmware": {
				"version": 20976,
				"lpf": 556850,
				"hpf": 219750
			},
			"version": {
				"current": "8.0.3"
			}
		},
		"webgui": {
			"tabs": 3
		},
		"webserver": {
			"ssl": {
				"certificate": {
					"secure": 0,
					"location": "/etc/pilight/pilight.pem"
				}
			}
		}
	}
}

Couple of things with this file :-

  1. You can’t edit it while the daemon is running as it will overwrite it when you save it
  2. it’s located in /etc/pilight

The hardware section has to be setup, however this is correct for the the pins as per the docs for plugging the hardware pilight suggests, so if you have done the same it should be OK, but do check it.
The webgui needs setting up to if you are using it.

1 Like

Yes, i found that file, but there wasn’t much in there, just some basic settings, maybe 5-6 lines. Should the devices i triggered be generated and listed in there? They weren’t. I have no idea which protocol i should use for my devices if i tried to set it up manually.

Yeps just the place holder, you need to add your devices and web gui bits and the hardware.

When you get pilight-receive working it will tell you what it finds, I suggest you pipe the output to a file.

OK, just to be clear, pilight-receive should display input in the terminal as they are triggered?

EDIT: Do i need to configure GPIO or something like that first?

Yep provided the pilight daemon is running…

ps -aux to find out

Well like I said the config.json has to be setup (without the daemon running), then run the daemon and finally run pilight-receive.

You can can check if the pilight is working by checking the log or by running pilight via the command line …

pilight log

/var/log/pilight.log

pilight-daemon -D in the terminal to spot config issues

Have finally got around to adding my doorbell to HA using an old 433 remote control which I stripped down, shorted a switch to send a specific code and then wired it to the ring circuit of my bell. Thanks to @jeremyowens for his code above and @1technophile for his excellent 433 to mqtt code that I have running in a NodeMCU.

Some pictures of the final build

3 Likes

Out of curiosity it seems this RF to wifi hub is capable of doing it without any workarounds. Have folks used it? Where does it fall short compared with what home assistant has for RF support. https://www.amazon.com/dp/B076H8648D/ref=cm_sw_r_cp_apa_c6opAbTPF2CG8

This looks more like a standard transmitter like the Broadlink. I can’t find any information about receiving signals on the page.

If you want off the shelf solution you have the sonoff rf bridge also
https://m.banggood.com/fr/SONOFF-RF-Bridge-WiFi-433-MHz-Replacement-Smart-Home-Automation-Universal-Switch-p-1179900.html

for less than 15euros it does the job for basics 433mhz protocols like the ones listed here :

Openmqttgateway can be flashed into it as espurna as tasmota.
With Openmqttgateway it listen constantly signals and send on demand. With the others I don’t know.

1 Like

I’ve received my sonoff rf bridge, I need to remove the plastic casing but haven’t yet found any specific advice on how to remove it. Looks like I need to get something sharp underneath the top cover and prise if off. Any advice?
Cheers

Yes, with a plate screw driver or a knife you should be able by passing on the different side to make the top plate upper and remove it

OK getting the top plate off was a mission, whilst the bottom plate came off no problem.
Cheers

It looks like you finaly got it :wink:
Thanks for the picture, what I see is that they changed the circuit from the study I made:

@1technophile have setup the board as per this thread and am attempting to upload OpenMQTTgateway.ino but receive the following erroe:

warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

My IDE is setup for “Generic ESP8285 Module” with baud 115200, any advice?
Cheers

yes, here is the instructions from Tinkerman that I advise you to follow:

2 Likes

Thanks again, I am up to the step add a new flash layout but I cannot locate boards.txt. Could it be because I am not using the portable Arduino IDE, but rather whatever I installed on my Mac from the Arudino website?
Cheers

Hello,

Just skip this step it is not compulsory in my point of view

Hi again, I’ve successfully flashed the firmware as the image below.

I then set the switch from OFF to ON or S2 (should be ON?), and restart the board. On the serial monitor I do not see any messages (baud 19200) but I do see the board firing off several MQTT messages on startup, as below. I also see the red LED come on when I use an RF remote, but not any messages over MQTT (I’m subscribed on home/#).

Any idea why I’m not seeing anything on the serial monitor or over MQTT after RF press?

Btw appears your wiki doesn’t have an entry for the RF bridge (appears the page is greyed out), perhaps we add to this once I’ve go this working?
Cheers!

image