Skip to content

3.12.0

Choose a tag to compare

@jboulton jboulton released this 10 Nov 08:44
· 11 commits to master since this release

Device certificates

A device can log in to the Dash server with its own certificate on port 8885, rather than your username and password. Your password isn't kept on the device, and you can cut one device off by revoking it in the Dash app. See Device certificates.

certificates = dashio.DeviceCertificates("certs", state_callback=certificate_state)
device = dashio.Device("Greenhouse", "gh-7f3a", "Greenhouse", certificates=certificates)
  • Getting a certificate: logged in with your password, the device gets a certificate from the Dash server. It then logs in with the certificate and erases the password. The Dash app can also read the device's certificate status and provision it, over any connection.
  • Renewal: certificates are renewed in their last year.
  • Fallback: a new certificate the server refuses falls back to the password.
  • Recovery: setting the device's Dash login again from the app gives it a new key.
  • Encrypted key: key_passphrase keeps the private key encrypted. On Linux, the passphrase can come from a systemd credential (Encrypting the key).
  • One device per connection: a DashConnection with certificates has one device.

Store and forward

For devices with store_and_forward on:

  • SAF END: the Dash server sends SAF END after the messages it kept for the device. device.set_saf_end_callback() is called when it arrives, or after saf_end_timeout seconds without it. A device that connects now and then can therefore disconnect as soon as it has its messages (storage.md).
  • Stored layouts: the device sends its layout when the Dash server asks for it, so the app can show the device while it's offline.
  • disconnect(): it publishes what the device has already sent before going offline.

History upload

  • Data Updater spec: the upload to the Dash server now follows the Data Updater spec.
  • delete_history(): new on TimeGraph, EventLog and Map. It deletes a line's, log's or track's history on the device straight away, and on the Dash server at the next upload.
  • Current position marker: MapTrack(replace=True), added with Map.add_track(), is a marker for a current position. The server keeps only its latest location.

BLE

BLEConnection was rewritten on dbus-fast (the ble extra, Linux with BlueZ), and it looks to the app like DashIO firmware:

  • Each phone gets its own notify socket and MTU.
  • Messages are split to fit what BlueZ delivers.
  • It works with iPhones and Android phones.

Breaking: BLEControl and the ble_uuid parameter have been removed. See BLEConnection.

Other changes

  • Older layouts: layouts exported from older Dash apps load, with defaults for the keys the app added later.
  • Long control IDs: add_cfg64 names every control ID over 7 characters in one error.
  • Charts: a Chart's control type is CHRT, and ControlName.GRPH is kept as another name for it.
  • Fix: adding a device to a connection straight after creating it no longer fails.
  • Event logs: an EventData keeps at most 25 lines.
  • Docs: the docs are now in docs/. There's also a Claude Code skill for library users in skills/python-dashio.
  • New dependency: cryptography.

Full changes: 3.11.0...3.12.0