Git Product home page Git Product logo

rtl_433_discoverandsubmit's Introduction

rtl_433_discoverandsubmit

A command-line utility to connect to an MQTT server, listen to rtl_433 events, and allow users to generate auto-discovery configurations for Home Assistant for the devices they choose.

Link to GitHub project

Features

  • Connects to an MQTT server.
  • Listens to rtl_433 events in real-time.
  • Provides an interactive CLI to let users choose devices.
  • Generates Home Assistant auto-discovery configurations for chosen devices.

Upload Python Package

Screenshot of devices listed

img_1.png

Detailed device view and opportunity to add to Home Assistant img.png

Device added to Home Assistant img_2.png

Installation

You can install rtl_433_discoverandsubmit directly from PyPI:

pip install rtl_433_discoverandsubmit

##Usage

After installation, you can run the tool using:

rtl_433_discoverandsubmit

##Command Line Arguments

You can specify the MQTT server, username, and password (if applicable) as well as the topic via command-line arguments. More details can be found in the help documentation:

rtl_433_discoverandsubmit --help

##Contributing

Feedback, bug reports, and pull requests are super welcome on this project. If you face any issues, please raise them in the issue tracker.

##License

This project is licensed under the MIT License. See the LICENSE file for more details.

rtl_433_discoverandsubmit's People

Contributors

dewgenenny avatar mrrebot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mrrebot tds04

rtl_433_discoverandsubmit's Issues

KeyError: 'id'

Trying to get this working. My rtl_433 doesn't sense my device so I'm trying to add it as a custom decode using
analyze_pulses true
then the recommended custom decoder
decoder n=oplinkremote,m=OOK_PWM,s=288,l=936,r=1040,g=0,t=259,y=0,bits=37

Trying to connect rtl_433_discoverandsubmit shows an empty screen:
image

Then when I press q to quit I can see this output on the console:

PS C:\Users\rlowe> rtl_433_discoverandsubmit --mqtt_server homeassistant.local --mqtt_port 1883 --mqtt_username mqtt --mqtt_password REDACTED
Expecting pdcurses at: C:\Users\rlowe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\unicurses/64 bit binaries/pdcdllu/pdcurses.dll
At start of load devices from file
Exception in thread Thread-1 (_thread_main):
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\rlowe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\paho\mqtt\client.py", line 3591, in _thread_main
self.loop_forever(retry_first_connection=True)
File "C:\Users\rlowe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\paho\mqtt\client.py", line 1756, in loop_forever
rc = self._loop(timeout)
File "C:\Users\rlowe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\paho\mqtt\client.py", line 1164, in _loop
rc = self.loop_read()
File "C:\Users\rlowe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\paho\mqtt\client.py", line 1556, in loop_read
rc = self._packet_read()
File "C:\Users\rlowe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\paho\mqtt\client.py", line 2439, in _packet_read
rc = self._packet_handle()
File "C:\Users\rlowe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\paho\mqtt\client.py", line 3033, in _packet_handle
return self._handle_publish()
File "C:\Users\rlowe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\paho\mqtt\client.py", line 3327, in _handle_publish
self._handle_on_message(message)
File "C:\Users\rlowe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\paho\mqtt\client.py", line 3570, in _handle_on_message
on_message(self, self.userdata, message)
File "C:\Users\rlowe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\rtl_433_discoverandsubmit\modules\mqtt_client.py", line 32, in on_message
device_id = f"{payload['model']}
{payload['id']}"
KeyError: 'id'

Using MQTT Explorer shows this for the device:
image

So, my custom decoder doesn't provide an "id" (and I don't know how to set it up to provide one, or how to have it decode payloads to button names but I'm working on understanding rtl_433 still).

Unable to add SCMplus gas meter

Details for SCMplus:

first_detected_time: 2024-06-03 19:23:38
last_detected_time: 2024-06-04 05:39:38
message_count: 22
time: 2024-06-04T05:39:33.770921-0600
protocol: 154
model: SCMplus
id: SCMplus_76410004
ProtocolID: 0x1E
EndpointType: 0x9C
EndpointID: 76410004
Consumption: 421910
Tamper: 0x0D08
PacketCRC: 0x8A87
MeterType: Gas
mic: CRC
topicprefix: rtl_433/9b13b3f4-rtl433
original_id: 76410004

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.