Skip to content

3.8.0

Choose a tag to compare

@jboulton jboulton released this 12 Oct 05:10
· 49 commits to master since this release

Breaking changes

  • Control IDs can be at most 7 characters, as the Dash app requires. Creating a control with a longer control_id now raises ValueError. Layouts exported from the Dash app already use short IDs.

New

  • Menu and ButtonGroup updates. When the user taps a Menu or ButtonGroup, the Dash app asks for the values of its controls. The device now replies with the state of each control in it.
  • Smaller replies with PKG messages. The device packages several messages into one PKG message, which matters most over the Dash server.
    • Menu and ButtonGroup updates are sent as PKG.
    • STATUS replies, sent when the app connects, are sent as PKG. Controls that are only inside Menus or ButtonGroups are left out, as their values are sent when the Menu or ButtonGroup is tapped. A control on a DeviceView in any layout is always included.
    • dashio.package.make_packages() builds PKG messages.
  • Device reset: device.set_reset_callback() tells the Dash app the device can be reset. When the app asks, the device replies first, as the protocol requires, then calls the callback.
  • Name requests: the device answers the Dash app's request for its current name, with or without a name callback.

Fixes

  • The announce includes cfgRev. Before, the device announced itself without it, which the Dash app takes as cfgRev 0, so the app could load an out of date layout.
  • TCPConnection(use_zero_conf=False): add_device() no longer crashes.
  • A message with only a device ID no longer stops the device.

Documentation and examples

  • README: improved, with an example of connecting through the Dash server.
  • generate_cfg64(): documented, with examples.
  • The greenhouse example: its lights times are Date/Time text boxes.
  • Control IDs: all the examples use short IDs.

See Documentation.md.