Temperature sharing service for DS18B20
serviceSciencePhysicsapt install thermoserviceThermoservice is a lightweight Flask-based web service designed for Raspberry Pi and similar devices equipped with DS18B20 temperature sensors. It reads temperature data from the 1-Wire interface and provides both a command-line tool and a web interface for monitoring temperature readings.
pool/main/t/thermoservice/thermoservice_0.1~bookworm~6_all.deb
thermoservice| Filename | pool/main/t/thermoservice/thermoservice_0.1~bookworm~6_all.deb |
| Version | 0.1~bookworm~6 |
| Age in days | 287 |
| Release date | 2025 12. 29. |
| Size | 76.11 KB |
| id | 3070 |
| Name | thermoservice |
| Package | |
| Appname | |
| Essential | |
| Vendor | |
| License | |
| Distribution | bookworm |
| Suite | main |
| Source | |
| Architecture | binary-arm64 |
| MultiArch | |
| Maintainer | VÃtÄ›zslav Dvořák |
| InstalledSize | 155 |
| Depends | python3-flask , gunicorn |
| PreDepends | |
| Breaks | |
| Enhances | |
| Section | web |
| Priority | optional |
| Description | Temperature sharing service for DS18B20 |
| LongDescription | Show current temerature on 0.0.0.0:5000 |
| AutoBuiltPackage | |
| Filename | pool/main/t/thermoservice/thermoservice_0.1~bookworm~6_all.deb |
| MD5sum | 9a142c2e768d2a3c7d2376a31c48652c |
| SHA1 | 8b6c04c576012fe87ad6b53176fe3fae95a576e5 |
| SHA256 | 209791d09959495a83221d525a07d38ee64b4d6e17ff0ba8ca53bfe8e73ec707 |
| SHA512 | c980ed16a715a5ea851d792d764727fb3461cc992d8cf11e9b88edfcec1b6e05d63f4100bf8c174e1c12720eeca1b28260e26da58228bf950c85d956bca84b13 |
| Size | 77936 |
| Auto-Built-Package | |
| Homepage | https://github.com/VitexSoftware/thermoservice |
| Provides | |
| Existing | |
| fileMtime | 2025-12-29 01:46:56 |
| created | 2024-11-28 12:48:32 |
| updated | 2025-12-29 01:46:56 |
| ./ | |
| ./etc/ | |
| ./etc/modules-load.d/ | |
| ./etc/modules-load.d/thermo.conf | 17 |
| ./lib/ | |
| ./lib/systemd/ | |
| ./lib/systemd/system/ | |
| ./lib/systemd/system/thermoservice.service | 342 |
| ./usr/ | |
| ./usr/share/ | |
| ./usr/share/doc/ | |
| ./usr/share/doc/thermoservice/ | |
| ./usr/share/doc/thermoservice/changelog.gz | 241 |
| ./usr/share/thermoservice/ | |
| ./usr/share/thermoservice/app/ | |
| ./usr/share/thermoservice/app/__init__.py | 71 |
| ./usr/share/thermoservice/app/routes.py | 1200 |
| ./usr/share/thermoservice/app/thermo.py | 996 |
| ./usr/share/thermoservice/static/ | |
| ./usr/share/thermoservice/static/favicon.ico | 73156 |
| ./usr/share/thermoservice/static/favicon.svg | 56674 |
| ./usr/share/thermoservice/thermoservice.py | 83 |
| ./ | |
| ./etc/ | |
| ./etc/modules-load.d/ | |
| ./etc/modules-load.d/thermo.conf | 17 |
| ./lib/ | |
| ./lib/systemd/ | |
| ./lib/systemd/system/ | |
| ./lib/systemd/system/thermoservice.service | 342 |
| ./usr/ | |
| ./usr/share/ | |
| ./usr/share/doc/ | |
| ./usr/share/doc/thermoservice/ | |
| ./usr/share/doc/thermoservice/changelog.gz | 240 |
| ./usr/share/thermoservice/ | |
| ./usr/share/thermoservice/app/ | |
| ./usr/share/thermoservice/app/__init__.py | 71 |
| ./usr/share/thermoservice/app/routes.py | 1200 |
| ./usr/share/thermoservice/app/thermo.py | 996 |
| ./usr/share/thermoservice/static/ | |
| ./usr/share/thermoservice/static/favicon.ico | 73156 |
| ./usr/share/thermoservice/static/favicon.svg | 56674 |
| ./usr/share/thermoservice/thermoservice.py | 83 |
| ./ | |
| ./etc/ | |
| ./etc/modules-load.d/ | |
| ./etc/modules-load.d/thermo.conf | 17 |
| ./lib/ | |
| ./lib/systemd/ | |
| ./lib/systemd/system/ | |
| ./lib/systemd/system/thermoservice.service | 342 |
| ./usr/ | |
| ./usr/share/ | |
| ./usr/share/doc/ | |
| ./usr/share/doc/thermoservice/ | |
| ./usr/share/doc/thermoservice/changelog.gz | 240 |
| ./usr/share/thermoservice/ | |
| ./usr/share/thermoservice/app/ | |
| ./usr/share/thermoservice/app/__init__.py | 71 |
| ./usr/share/thermoservice/app/routes.py | 1200 |
| ./usr/share/thermoservice/app/thermo.py | 996 |
| ./usr/share/thermoservice/static/ | |
| ./usr/share/thermoservice/static/favicon.ico | 73156 |
| ./usr/share/thermoservice/static/favicon.svg | 56674 |
| ./usr/share/thermoservice/thermoservice.py | 83 |
| ./ | |
| ./etc/ | |
| ./etc/modules-load.d/ | |
| ./etc/modules-load.d/thermo.conf | 17 |
| ./lib/ | |
| ./lib/systemd/ | |
| ./lib/systemd/system/ | |
| ./lib/systemd/system/thermoservice.service | 342 |
| ./usr/ | |
| ./usr/share/ | |
| ./usr/share/doc/ | |
| ./usr/share/doc/thermoservice/ | |
| ./usr/share/doc/thermoservice/changelog.gz | 240 |
| ./usr/share/thermoservice/ | |
| ./usr/share/thermoservice/app/ | |
| ./usr/share/thermoservice/app/__init__.py | 71 |
| ./usr/share/thermoservice/app/routes.py | 1200 |
| ./usr/share/thermoservice/app/thermo.py | 996 |
| ./usr/share/thermoservice/static/ | |
| ./usr/share/thermoservice/static/favicon.ico | 73156 |
| ./usr/share/thermoservice/static/favicon.svg | 56674 |
| ./usr/share/thermoservice/thermoservice.py | 83 |
Temperature sharing service for DS18B20
sudo curl -fsSL http://repo.vitexsoftware.com/KEY.gpg -o /usr/share/keyrings/vitexsoftware-archive-keyring.gpg && \
echo "Types: deb
URIs: http://repo.vitexsoftware.com/
Suites: $(lsb_release -sc)
Components: main
Signed-By: /usr/share/keyrings/vitexsoftware-archive-keyring.gpg" | sudo tee /etc/apt/sources.list.d/vitexsoftware.sources
sudo apt update
sudo apt install thermoservice
To enable Zabbix monitoring of temperature sensors:
sudo apt install thermometer-zabbix
This installs Zabbix Agent configuration that provides the following user parameters:
sensor.temp.value - Current temperature in Celsiussensor.temp.celsius - Current temperature in CelsiusThe Zabbix agent will automatically restart after installation to load the new configuration.
Zabbix Template:
A pre-configured Zabbix 7.4 template is available in the repository at zabbix_template_thermoservice.yaml. Import this template into your Zabbix server to automatically configure:
To use the template:
zabbix_template_thermoservice.yaml into ZabbixRun command thermo to print current temperature to stdout:
$ thermo
23.125
The service automatically starts and exposes a web interface on port 5000, displaying the current temperature from the DS18B20 sensor.
Thermoservice is a lightweight Flask-based web service designed for Raspberry Pi and similar devices equipped with DS18B20 temperature sensors. It reads temperature data from the 1-Wire interface and provides both a command-line tool and a web interface for monitoring temperature readings.
Features:
thermo commandRequirements:
AppStream / Icon:
The SVG icon (static/favicon.svg) is installed as
/usr/share/icons/hicolor/scalable/apps/com.vitexsoftware.thermoservice.svg
and referenced by the AppStream metainfo file
com.vitexsoftware.thermoservice.metainfo.xml.
After installation the following manual pages are available:
man 1 thermo – CLI command referenceman 8 thermoservice – Service / HTTP API referenceman 8 ha_push – Home Assistant push script referenceUnit tests use pytest and require python3-flask and python3-requests.
No real sensor hardware is needed — the tests mock all 1-Wire filesystem access.
python3 -m pytest tests/ -v
An example Ansible playbook is provided in ansible/ for automated deployment.
ansible/
playbooks/
thermometer.yml # Main playbook (two plays: sensor device + HA host)
templates/
thermoservice-homeassistant.default.j2 # /etc/default config template
ha-restful-sensor.j2 # HA RESTful sensor block (reference)
homeassistant-proxy.conf.j2 # Apache reverse proxy for HA
The playbook expects two inventory groups:
[thermoservice_devices]
thermoservice-pi.local
[homeassistant_hosts]
homeassistant.local
| Variable | Description | Example |
|---|---|---|
hass_url |
HA base URL | http://homeassistant.local:8123 |
hass_token |
HA long-lived access token (vault) | — |
ha_config_file |
Path to configuration.yaml on HA host |
/config/configuration.yaml |
thermoservice_url |
Thermoservice base URL | http://thermometer.local:5000 |
zabbix_server |
Zabbix server host (optional) | zabbix.local |
For Docker-based HA the ha_config_file path is typically:
/var/lib/docker/volumes/homeassistant_config/_data/configuration.yaml
Store hass_token in an Ansible vault file, e.g. vars/vault.yml:
hass_token: eyJ...
# Install thermoservice + push timer on sensor device, configure HA RESTful sensor
ansible-playbook -i inventory ansible/playbooks/thermometer.yml
# Sensor device only
ansible-playbook -i inventory ansible/playbooks/thermometer.yml --limit thermoservice_devices
# HA config only
ansible-playbook -i inventory ansible/playbooks/thermometer.yml --limit homeassistant_hosts
Play 1 — sensor device:
thermoservice, thermometer-zabbix, thermoservice-homeassistant/etc/default/thermoservice-homeassistant with HASS_URL and HASS_TOKENthermoservice-homeassistant.timer (pushes temperature every 60 s)zabbix_server is set)Play 2 — HA host:
configuration.yaml using blockinfile
(idempotent — re-running the playbook is safe)sensor.thermoservice_temperature appears in HA entity registry
and can be assigned to an area via Settings → AreasTwo approaches are supported:
Add the following to your Home Assistant configuration.yaml to have HA poll the thermoservice endpoint every 60 seconds.
Requires HA 2024+ — uses the modern rest: integration format which registers the entity in the entity registry (required for area assignment):
rest:
- resource: http://thermometer.local:5000/celsius
scan_interval: 60
sensor:
- name: "Thermoservice Temperature"
unique_id: thermoservice_thermometer_temperature
value_template: "{{ value_json.temperature }}"
unit_of_measurement: "°C"
device_class: temperature
state_class: measurement
json_attributes:
- rom
- sensor
- time
Replace thermometer.local with your thermoservice host.
The unique_id ensures the entity is registered and can be assigned to an area via Settings → Areas.
thermoservice-homeassistant package)Install the push package on the thermoservice device:
sudo apt install thermoservice-homeassistant
Configure your HA instance in /etc/default/thermoservice-homeassistant:
HASS_URL=http://homeassistant.local:8123
HASS_TOKEN=your-long-lived-access-token
Generate a long-lived access token in HA under Profile → Security → Long-Lived Access Tokens.
Enable and start the systemd timer:
sudo systemctl enable --now thermoservice-homeassistant.timer
The timer runs ha_push.py every 60 seconds, creating/updating the entity sensor.thermoservice_temperature in Home Assistant.
| Version | Download/Install count | Last hit |
|---|