Code Monkey home page Code Monkey logo

mqtt433's Introduction

mqtt433

mqtt433 python service script to use rtl_433 and a SDR dongle to read Acurite temperature/humidity sensors (or other 433MHz) into JSON and publish to MQTT topic for Homeassistant sensor integration. I did not write the originals of these scripts, merely debugged for my own purposes.

PS I am NOT a coding or networking expert. Merely a hobbist so please do your own diligence on security and excuse any sloppy programming. Thanks!

mqtt433.py

this is the python script to run as a service. it requires paho-mqtt (https://pypi.python.org/pypi/paho-mqtt/1.1). Right now it only uses user authentication for the MQTT broker (so put the username and password you want this system to use to connect to the broker into this code) since it is meant to run on the hub machine connecting to the broker with the 1833 port (as opposed to the 8833 port for TLS encrypted traffic of MQTT clients outside the local network).

the line that defines "proc" specifies the rtl_433 call in the subprocess. In this example, the rtl_433 options are to output in JSON and only look for the two types of Acurite sensors I implemented. Use rtl_433 --help in the shell for more information.

It publishes to the topic "hass/rtl_433/sensor_0000" where 0000 is the sensor id number. This means you are not limited to the ABC channels on the Acurite tower sensors. They will have different id numbers so you can tell them apart. An easy way to find the id number is to either run rtl_433 in the shell to sniff their signals or use the commented line in mqtt433.py to publish any sensor output to the 'hass/rtl_433" MQTT topic and listen to that topic. Nice for debugging JSON outputs too.

listener.py and publish.py

just used to listen or publish to MQTT topics for debugging.

mqtt433's People

Contributors

packitout avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar Patrick Halley avatar Nick avatar Tom de Simone avatar Dana Gregory avatar

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.