Btw I am redoing this project to use Hassio, dispensing of all python code and only using HA components and automations. The only limitation at the moment is that raspberry pi camera is not supported in Hassio, so I make use of a USB webcam instead.
Re sniffing the signals, I think you have to try to find out. For example, I bought an rf control on amazon that couldn’t be sniffed, as apparently the (Chinese) manufacturer was using a proprietary RF protocol.
If you buy a software defined radio (RTL-SDR) and use this software, I expect it will work. That software handles most formats already and has nice diagnostic modes for helping to decode new formats.
you could use a dedicated ESP8266 (arduino, e.g. Wemos D1) equipped with a 433 mHz receiver to listen for the specific codes and then generate an MQTT message via WiFi to send to your HA server. ESP8266s are real cheap to buy and very easy to program. I use them for lots of things.
Yes. It will work on a Pi (or any other computer). I think it’s a better option than the ESP because the library does the decoding for you. If you use an arduino or ESP, you have to write the code to decode the data (or find a library that already does it).
Yes you can use the Pi (I am assuming you run your HA instance on another Pi but you could probably use that one too). I am using my HA Pi to transmit 433 MHz codes using Python programs and these are easily integrated to HA. I haven’t tried the receiving side of things on the Pi but I expect it would be easy enough. I have also not triggered MQTT messages from the Pi so far using Python. Having said all that, I would still recommend the ESP8266. It has a number of advantages:
Very cheap
You won’t have to keep updating it like the Pi
Once you have programmed and tested it, you can put it in a box, arrange a power supply (e.g. a typical Android phone charger) install it anywhere suitable and pretty much forget about it.
Plenty of libraries available for 433MHz, MQTT, WiFi etc.
You can even program it to update the software over the air (OTA)
Yes its a other Pi3, i also have a Pi zero laying around.
If you want to transmit 433MHz you first need to know the device code right? So ill need to use te receiver to listen to the frequencies? Or do you have a alternative way?
Im new to Python (only followed some tutorials), any tips for programs?
Ill order a couple of ESP8266 when i get it to work!
@robmarkcole
Really stupid question, i followd your guide but i cant find the folder…
Navigate into the Rpi-rf folder and you will see there are two scripts where we want to use rpi-rf_receive. Navigate (using cd in the Terminal) to the folder rpi-rf/scripts folder containing rpi-rf_receive.py and run the script using python3 rpi-rf_receive.py. This will produce an output like the following (several lines ommited):
The problem is i cant find the folder on my Rpi… I used find, i manually cd to the folder, no succes.
Reinstalling Raspbian stretch lite now.
Nope…
pi@raspberrypi:~ $ ls
pi@raspberrypi:~ $ cd rpi-rf/scripts
-bash: cd: rpi-rf/scripts: No such file or directory
pi@raspberrypi:~ $ cd rpi-rf
-bash: cd: rpi-rf: No such file or directory
pi@raspberrypi:~ $ cd rpi-rf/scripts/
-bash: cd: rpi-rf/scripts/: No such file or directory
pi@raspberrypi:~ $ cd /usr/bin/env python3
-bash: cd: too many arguments
pi@raspberrypi:~ $ cd /usr/bin/env
-bash: cd: /usr/bin/env: Not a directory
Create a folder and clone the repo. I suggest that the desktop version is preferable until you are comfortable with the terminal etc. I used desktop in my write up.
Cheers