sensor

command
v0.0.0-...-27e1478 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: AGPL-3.0 Imports: 21 Imported by: 0

README

Sensor
======

This program uses temperature data taken from a sensor attached to the middle
of a heater in order to estimate the relative power.  The relative power is the
ratio of current power to the maximal power the heater would have if the flow
temperature was maximal.  Due to the heat curve (or other factors like poor
hydraulic balancing or other heaters working at the same time), this is not the
case is general.

``sensor`` reports the relative power to the PID controller via MQTT, so that
the latter can optimise its behaviour.


Environment variables
---------------------

``TOEPID_DATA_PATH``
    Directory in which ``sensor`` puts its data file for persistence.  When
    ``sensor`` is terminated, it stores its state there.  When it is restarted,
    it restores its state from this file.

    Moreover, the time series data is stored in this directory for later
    analysis.

    If you don’t set this environment variable, none of these files is created.

``TOEPID_CONF_PATH``
    Path to the configuration file.


Configuration file
------------------

Configuration example::

  name: livingroom
  mqttBroker: tcp://192.168.178.30:1883
  sensorChan:
    topic: zigbee2mqtt/sensor living
    pattern: '$JSON:{"last_seen": "rfc3339"}'
    error: 0.05
  nomPTopic: toepid/living/control-var
  offset: 0.698
  maxOverT: 20
  roomTChan:
    topic: zwave/living/temperature_sensor/49/0/Air_temperature
    pattern: '$JSON:{"time": "unixMilli", "value": "temperature"}'
    error: 0.05
  exponent: 1.1
  τUp: 370
  maxSecondsTillOn: 600
  τPlumbing: 500
  Δt: 60
  delay: 265

Please consult ``config.go`` for further information.


Protocol
--------

See ``heat-curve`` for an explanation of the limits protocol, which also the
``sensor`` program uses for messages to the PID controller.


Todos
-----

- Add new outgoing topic with:
  - current real power
  - integrated power (heat energy)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Goal of this program is to find and verify mathematical formulae for the determination of the actual heating power in PWM mode.
Goal of this program is to find and verify mathematical formulae for the determination of the actual heating power in PWM mode.

Jump to

Keyboard shortcuts

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