Skip to content

Send sensor data from DS18B20 to MQTT (works with home-assistant)

Notifications You must be signed in to change notification settings

engonzal/DS18B20-mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DS18B20-mqtt

Send sensor data from DS18B20 to MQTT (works with home-assistant).

Config

Edit sensors.yml with your home-assistant info.

home-assistant

Update your home-assistant sensors.yml or sensors section in configuration.yml with the new mqtt topics, for example:

- platform: mqtt
  state_topic: "home-assistant/balcony/temperature"
  name: "Balcony Temperature"
  unit_of_measurement: "°C"
- platform: mqtt
  state_topic: "home-assistant/livingroom/temperature"
  name: "Living Room Temperature"
  unit_of_measurement: "°C"

Setup

On your Pi or device that has the sensors attached, we'll get things going.

Ubuntu:

sudo apt-get install python3 python3-virtualenv
virtualenv -p /usr/bin/python3 temp-mqtt
cd temp-mqtt
source bin/activate
git clone https://github.com/ngonzal/DS18B20-mqtt.git
cd DS18B20-mqtt
pip install -r requirements.txt
python temp-mqtt.py -c sensors.yml

About

Send sensor data from DS18B20 to MQTT (works with home-assistant)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages