mverleun / RTL433-to-mqtt

Publish info from RTL433 receiver to MQTT broker
GNU General Public License v3.0
93 stars 20 forks source link

Can't get it to run #13

Open rowanbradley opened 2 years ago

rowanbradley commented 2 years ago

I have installed on my WIndows-10 computer a copy of rtl_433. I believe that this is working correctly, because it will correctly log data to a JSON file from the command: .\rtl_433_64bit_static.exe -R 43 -F json:"D:\XPS_8700 Extended Files\Users\RowanB\Documents\Energy\Oil\Apollo Oil Level\Readings\oillevel$((Get-Date).ToString("yyMMdd")).json" I also have installed Mosquitto (Windows version). I also believe that this is working, but I don't really know how to test this. Now I want to use rtl2mqtt to get rtl_433 to send its data to Mosquitto. I have changed the config.py file to this:

Config section

Fill in the next 2 lines if your MQTT server expected authentication

MQTT_USER="rowan.bradley" MQTT_PASS="my_password"

MQTT_HOST="mqtt.example.com"

MQTT_HOST = "localhost" MQTT_PORT=1883 MQTT_TOPIC="sensors/rtl_433" MQTT_QOS=0 DEBUG=False # Change to True to log all MQTT messages

End config section

When I try to run rtl2mqtt using the command: PS D:\XPS_8700 Extended Files\Users\RowanB\Downloads\RTL433-to-mqtt-master\src> .\rtl2mqtt

I get this:

Connecting with authentication Starting RTL433 MQTT: Connected Traceback (most recent call last): File "D:\XPS_8700 Extended Files\Users\RowanB\Downloads\RTL433-to-mqtt-master\src\rtl2mqtt.py", line 72, in rtl433_proc = subprocess.Popen(rtl_433_cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True) File "C:\Program Files\Python310\lib\subprocess.py", line 966, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Program Files\Python310\lib\subprocess.py", line 1435, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified PS D:\XPS_8700 Extended Files\Users\RowanB\Downloads\RTL433-to-mqtt-master\src>

Why is it giving me a file not found error? Which file is it that it can't find? How do I get this to run successfully?

Thank you - Rowan

mverleun commented 2 years ago

Quite likely it has trouble finding the rtl_433 executable which is named rtl_433_64bit_static.exe on your windows system.

The Python script is trying to execute an external command which is called rtf_433 on *nix systems. On your system it seems to have a different name. You can edit the python script and modify the name of the executable.

Op 6 mrt. 2022, om 18:17 heeft rowanbradley @.***> het volgende geschreven:

rtl_433_64bit_static.exe