Skip to content

Raspberry Pi MQTT JSON Multisensor for Home Assistant. Supported sensors include the AM312 PIR, DHT11/22 temperature/humidity sensors.

License

Notifications You must be signed in to change notification settings

edwork/RPI-MQTT-JSON-Multisensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RPI-MQTT-JSON-Multisensor

Raspberry Pi MQTT JSON Multisensor for Home Assistant. Supported sensors include the AM312 PIR, DHT11/22 temperature/humidity sensors.

Requirements

  • paho-mqtt (install using pip)
  • Adafruit_DHT (install via their git repo)
  • gpiozero (installed by default on Raspi - link to docs)

Configuring

Under the 'Configuration' section of the script replace the appropriate variables. If you don't use authentication with a private MQTT server just leave it with null information. Using a DHT11 instead of a DHT22? Just change line 43.

Running

You can simply run the file with ./multisensor.py (after configuring) in a terminal and go on your merry way or run it as a service.

Running as a service

Systemd

  • Copy rpi-sensor.service to /etc/systemd/system/
  • Run (as root) systemctl enable rpi-sensor.service
  • Run (as root) systemctl start rpi-sensor.service

About

Raspberry Pi MQTT JSON Multisensor for Home Assistant. Supported sensors include the AM312 PIR, DHT11/22 temperature/humidity sensors.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages