sensor-dht11 (2.4.1) stable; urgency=medium

  * The driver reaches the GPIO pin through the Linux GPIO character device,
    not libgpiod. libgpiod 2 removed every call the driver made, and
    Raspberry Pi OS trixie ships only libgpiod 2, so the package could not be
    built there. The published package also required libgpiod2t64, the name
    that only Ubuntu 24.04 uses, so it could not be installed on Raspberry Pi
    OS bookworm. With no GPIO library, one build installs on Ubuntu 24.04,
    bookworm and trixie. Version 2 of the interface requires Linux 5.10 or
    later
  * The start signal releases the line by switching it to input in a single
    call. The line was driven high, released and requested again, which
    could take longer than the 20 to 40 microseconds before the sensor starts
    to answer
  * A pin that cannot be used gives the reason: in use by another driver,
    access denied, or no such pin on the chip. Every such failure said "GPIO
    access denied - try running with sudo", including a pin held by w1-gpio
  * A read releases the pin in one place, whatever its outcome. When the pin
    could not be requested as an output, the chip was freed while the signal
    handlers still pointed at it, so a signal at that moment could crash the
    driver
  * The signal and watchdog handlers make only calls that are safe in a signal
    handler. They called libgpiod and syslog; their messages now go to
    standard error
  * The source package no longer contains the git repository.
    debian/source/options replaced dpkg-source's default exclusions instead of
    adding to them, so .git was packed into the tarball

 -- Ed Baker <ed@ebaker.me.uk>  Mon, 14 Sep 2026 14:03:59 +0100

sensor-dht11 (2.4.0) stable; urgency=medium

  * The example configuration is a plain JSON file, examples/dht11.json,
    installed under /usr/share/doc/sensor-dht11/examples/ as the other drivers'
    are, and usable as it stands. It replaces a prose document with snippets
    that could not be copied into place; the option-by-option explanation is
    in the man page
  * A reading's timestamp is taken when the value is obtained, not when the
    attempt begins. A read that retried for several seconds was stamped up to
    8 s early, and sensor-w1therm stamped at output time, so the field meant
    different things in different drivers; every driver now stamps after its
    read
  * Documentation: the man page and README describe setup, enable and mock,
    the location field, and every field of a reading; the examples file no
    longer claims sensor_name changes the "sensor" field, which it never did,
    and shows location. Man page header brought up to this version
  * Packaging: depend on libcap2-bin, so the cap_sys_nice capability the
    postinst sets and the man page promises is actually set rather than
    skipped where setcap is absent; move from Section contrib/misc, the area
    for packages needing non-free software, to misc; Standards-Version 4.6.1;
    the lintian override for our "stable" distribution, as libwildlifesystems
    already had
  * The shipped /etc/ws/sensors/dht11.json says "internal": false, as the man
    page, README and examples all say the default is; it said true
  * "make install" defaults to PREFIX=/usr rather than /usr/local, since sr
    finds drivers in /usr/bin only and a hand install elsewhere was invisible
  * The default configuration, used when there is no config file, is built
    by load_config on the heap like a parsed one, so there is one free path
    rather than a stack special case; the measurement id and the location
    filter test come from the library, which sensor-bme680 shared copies of;
    and the config path is spelt with WS_CONFIG_PATH
  * Two config entries without a sensor_id no longer get the same one. Both
    used to be "<serial>_dht11", so two DHT11s on different pins were merged
    downstream into one series without a word. A lone entry keeps that id, so
    no existing node's datastreams move; where more than one entry omits it,
    each is "<serial>_dht11_pin<N>". Assigned by the library, which also
    warns about any two entries that still share an id
  * Mock readings declare location "{{node}}", as sensor-onboard's mock
    declares its physical sensors, so every driver's mock has one shape.
    They used to emit location null, which is what an unconfigured sensor
    reports, and so disagreed with the shell driver's mock
  * Retries are bounded by a budget of 8 seconds per invocation, shared between
    the sensors being read, so the driver always finishes inside the 10 seconds
    sr allows. The retry schedule alone slept for 9.4 seconds per failing
    sensor, so one failing sensor was borderline and two always overran: sr
    killed the driver before it printed anything, and the sensor, along with
    the error explaining its failure, simply vanished from the output. The
    error message now states the attempts made and the budget they had
  * The Makefile honours EXTRA_CFLAGS and EXTRA_LDFLAGS, as sensor-bme680 and
    sensor-w1therm already did. Without them a build from the suite's root
    Makefile linked this driver against the installed libwildlifesystems rather
    than the one it had just built, which, the library being static, silently
    baked the old behaviour into a binary carrying the new version number
  * Fail with nothing printed, exit 20, when sc-prototype is unavailable. The
    template was checked per reading, after the sensor had been read, and the
    unbuilt reading was appended anyway: the output was "[,]" with exit 0,
    which is not JSON. The check now happens once, before the sensor is
    touched, via the library's ws_require_prototype()
  * Out of memory while building the array is also exit 20 with no output,
    rather than exit 0 with no output, which read as success to sr
  * sensor_id is no longer escaped here before use: libwildlifesystems 1.3.0
    escapes every string it places in a reading, and doing it here as well
    would escape twice. sensor_name, which was never escaped, is now
  * A reading whose sensor_id cannot be determined is emitted with
    "sensor_id":null rather than with a fabricated "_temperature", which looked
    like a real identifier and would have collided between nodes
  * The measurement filters and the usage line are both taken from the list of
    measurements, so the three cannot drift apart
  * "mock" is a table of values passed to the library rather than hand-built
    JSON, so it cannot drift from the real output format. This fixes the mock
    temperature sensor_id, which was "<serial>_dht11_mock" where a real read
    emits "<serial>_dht11_mock_temperature"; anything calibrated against mock
    was matching an id shape the driver never actually produces
  * Correct a stale comment claiming a device-tree overlay is needed. The
    readings are bit-banged over libgpiod, so there is nothing to enable and
    "enable" doing nothing is correct, which the comment implied was an omission
  * Build the output array with the library's JSON array builder instead of
    realloc and strcat. The old code kept the previous pointer when a realloc
    failed and then appended regardless, overrunning the buffer; it also
    re-measured the whole array per reading. The two measurement blocks, which
    differed only in their arguments, are now one call each
  * Use the library's WS_UNIT_* constants rather than unit string literals
  * Config parsing moves to the library's ws_config_iter_* and the common
    fields to an embedded ws_sensor_config_base_t, so pin is all this driver
    now declares and parses for itself
  * "mock" no longer prints "(null)_humidity" where the host has no Pi serial;
    it falls back to a fixed id, mock being the command meant to work without
    the hardware
  * Rebuild against libwildlifesystems 1.3.0, so "{{node}}" in a sensor's
    location resolves to the node's own coordinates from /etc/geolocation
    instead of being emitted as an unresolved token
  * Require libwildlifesystems-dev (>= 1.3.0). The library is static, so the
    behaviour above is fixed at build time: a binary built against 1.2.0 would
    satisfy the old pin and silently emit unresolved tokens under the same
    package version

 -- Ed Baker <ed@ebaker.me.uk>  Sat, 12 Sep 2026 14:00:00 +0100

sensor-dht11 (2.3.0) stable; urgency=medium

  * Migrate the config from /etc/ws/dht11.json to /etc/ws/sensors/dht11.json.
    The path changed in 2.0.0 with the C rewrite, but nothing moved existing
    files, so any node upgraded from 1.x has been running on the shipped
    defaults since while its real configuration sat unread at the old path.
    A custom pin, sensor_id or internal flag would have stopped taking effect
    silently at that upgrade
  * Zero-initialise default_config. It sets every field explicitly except
    location, which was left reading uninitialised stack memory on nodes with
    no config file; a garbage source of WS_LOC_EXPLICIT would have emitted a
    GeoJSON Point built from uninitialised coordinates

 -- Ed Baker <ed@ebaker.me.uk>  Sat, 12 Sep 2026 10:00:00 +0100

sensor-dht11 (2.2.0) stable; urgency=medium

  * Report device "dht11" and the sensor's configured location
  * Support "location" in /etc/ws/sensors/dht11.json
  * Use libwildlifesystems for config parsing instead of a local copy. Fixes
    sensor_name values being truncated at an escaped quote, and config files
    being misread when any value contains a brace
  * Use ws_json_object_end for config object bounds, so a config entry may
    contain nested objects
  * Rebuild against libwildlifesystems 1.2.0
  * Require libwildlifesystems-dev (>= 1.2.0) and sensor-control (>= 1.3.0):
    an older sc-prototype has no device or location field, and the new
    values would be dropped silently rather than failing

 -- Ed Baker <ed@ebaker.me.uk>  Fri, 11 Sep 2026 16:00:00 +0100

sensor-dht11 (2.1.0) stable; urgency=medium

  * Use SCHED_FIFO real-time scheduling for reliable GPIO reads
  * Set cap_sys_nice capability on binary at install time

 -- Ed Baker <ed@ebaker.me.uk>  Wed, 18 Feb 2026 12:00:00 +0000

sensor-dht11 (2.0.4) stable; urgency=medium

  * Implement enable, setup, mock commands for consistent CLI

 -- Ed Baker <ed@ebaker.me.uk>  Tue, 27 Jan 2026 15:00:00 +0000

sensor-dht11 (2.0.2) stable; urgency=medium

  * Rebuild against libwildlifesystems 1.1.1

 -- Ed Baker <ed@ebaker.me.uk>  Tue, 27 Jan 2026 14:00:00 +0000

sensor-dht11 (2.0.1) stable; urgency=medium

  * Refactor to use libwildlifesystems shared library
  * Add setup, enable, mock commands for consistent CLI
  * Update man page with all commands

 -- Ed Baker <ed@ebaker.me.uk>  Tue, 27 Jan 2026 12:00:00 +0000

sensor-dht11 (2.0.0) stable; urgency=medium

  * Rewritten in C for reduced dependencies and faster startup
  * Removed Python runtime dependency
  * Native GPIO access via /dev/gpiomem
  * Same JSON output format as Python version
  * Added internal/external location filter arguments
  * Added bash completions

 -- Ed Baker <ed@ebaker.me.uk>  Fri, 23 Jan 2026 12:00:00 +0000
