Note: This version supports both v0 and v1 endpoints. The package automatically detects the endpoint version supported by the device. Features requiring authentication (login, state control, etc.) are only available on v1 endpoints.
Added
- CRC validation: New
coap_crcmodule for CRC-32 validation of CoAP messages. Payloads are now verified for data integrity on receipt. Note for non-Python integrations: All v1 CoAP responses now include a trailing 4-byte CRC that must be stripped before parsing. PUT request payloads must also include a CRC suffix. Seecoap_crc.pyfor the algorithm. - Authentication: New
login(),logout(), andget_login_token()methods for device authentication. Required for write operations (state changes, configuration, factory reset). - Device state control: New
set_state()method to transition the device between Enabled and Disabled states. - Device errors: New
get_device_errors()method andDeviceErrorsclass for retrieving and parsing device error information. - Reboot: New
reboot()method for remote device reboot. - Observer management: New
delete_observers()method to clear all active CoAP observers on the device. - Device tag:
NetworkConfignow supports adevice_tagfield for identifying individual sensors. - Sync configuration:
NetworkConfignow supportssync_enabledandsync_server_enabledflags for multi-device synchronization.
Changed
- CoAP resource versions: All resources upgraded from v0 to v1. The Python package automatically detects the endpoint version and uses the correct resource paths. v0 resource constants are still exported for backwards compatibility with external scripts.
- NetworkConfig: Fixed encoding to produce the correct 212-byte format expected by all shipped firmware. The previous encoding was undersized and would be rejected by the device.
- DeviceErrors: Maximum error string length increased from 64 to 256 bytes, and maximum number of errors increased from 6 to 8. The wire format is unchanged (length-prefixed strings), but integrations with fixed-size buffers may need to be updated.
- set_state(): No longer raises
ValueErrorfor invalid states. Validation is now performed by the device, which returnsCoapErrorExceptionon rejection. - factory_reset(): Changed from PUT to POST to match the device's expected method.
- pointcloud-to-foxglove: Clean up on exit after subscribing to pointcloud data.
- README: Updated installation instructions and corrected resource version references.
Removed
- Statistics: Removed
Statisticsclass,Durationclass, andget_statistics()method. The/statistics/v0endpoint is no longer available on v1 devices.