Skip to content

Noddy76/w1temp2mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

w1temp2mqtt

GitHub license Go

A simple daemon to report a 1wire DS18B20 temperature probe to MQTT.

Usage

./w1temp2mqtt -broker tcp://mqtt.home:1883 -topic sensor/temperature -device 28-000000000000
Option Default Description
device 1wire device ID to report on
interval 10s How often to read the device
broker tcp://localhost:1883 MQTT Broker connext string
clientid w1temp2mqtt MQTT client ID
topic w1temp2mqtt MQTT topic to publish lines on

Example SystemD service file

[Unit]
Description=Report Outside Temperature to MQTT

[Service]
User=pi
ExecStart=/usr/local/bin/w1temp2mqtt -broker tcp://localhost:1883 -topic sensor/outside-temperature -device 28-000000000000
Restart=always

[Install]
WantedBy=multi-user.target

Releases

No releases published

Packages

No packages published

Languages