w1temp2mqtt

command module
v0.0.0-...-e9ae030 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

README

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

Documentation

Overview

Copyright 2020 James Grant

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL