Skip to main content

Network-local (non-cloud) interface for Powersensor devices

Project description

Powersensor (local)

A small package to interface with the network-local event streams available on Powersensor devices.

Two different high-level abstractions are provided. The first is the PlugApi, which provides access to the event stream from a single Powersensor Plug. The plug may be relaying data for sensors as well, which will also be included in the said event stream. The PlugApi abstraction is ideal when used together with Zeroconf/mDNS discovery (services '_powersensor._udp.local' and '_powersensor._tcp.local'). Note that actual Zeroconf/mDNS discovery functionality is not included here.

The second abstraction is the PowersensorDevices class, which uses the legacy discovery mechanism (as opposed to mDNS) to discover the plugs, and then aggregates all the event streams into a single callback. Internally it relies on the PlugApi as well.

There are also some small utilities included,ps-plugevents and ps-rawplug showcasing the use of the first interface approach, and ps-events the latter. . The ps-events is effectively a consumer of the the PowersensorDevices event stream and dumps all events to standard out. Similary, ps-plugevents shows the event stream from a single plug (plus whatever it might be relaying for), and ps-rawplug shows the raw event stream from the plug. Note that the format of the raw events is not guaranteed to be stable; only the interface provided by PlugApi is.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

powersensor_local-2.1.2.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

powersensor_local-2.1.2-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file powersensor_local-2.1.2.tar.gz.

File metadata

  • Download URL: powersensor_local-2.1.2.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for powersensor_local-2.1.2.tar.gz
Algorithm Hash digest
SHA256 8b02a421bdcd669f9cc981a5d1df27855c7271752e7ee78c701b7b130a51ed0b
MD5 05ed9fb6dd2ae3f73c4372128c533f1d
BLAKE2b-256 2318c5a53e604fb5fd573f37a4b1d13b7324a1802e144b1248aeeecb538ba5dd

See more details on using hashes here.

File details

Details for the file powersensor_local-2.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for powersensor_local-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5aca2756200cce401e79e5ff7e8ebd20f9a957f96c32f24db2d66e2effae7565
MD5 b545469a48ca594d20a7289c5e363718
BLAKE2b-256 c7b3c23c9ef43c2edf0a5bb3d3ef92766f02629cd3ac39e206c8661b237269ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page