Skip to main content

Smartmeter WebThing

Project description

smart meter webthing

A webthing connector for smart meters

This project provides a smart meter webthing API. It provides the software to connect an IR USB sensor

The smart meter webthing package provides an http webthing endpoint that supports smart meter consumption values over http. e.g.

# webthing has been started on host 192.168.0.23

curl http://192.168.0.23:7122/properties 

{
   "current_power": 389,
   "produced_power_total": 3314.7,
   "consumed_power_total": 259784.2
}

To install this software, you can use the PIP package manager as shown below

sudo pip install smartmeter_webthing

After installation, you can start the webthing http endpoint in your Python code or from the command line by typing

sudo smartmeter --command listen --port 7122 --sport /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0051-if00-port0

Here the webthing API will use the local port 7122. Additionally, the device address of the IR sensor must be set. To configure the device address, see setup device.

As an alternative to the list command, you can also use the register command to register and start the webthing service as a systemd device. This way, the webthing service is started automatically at boot time. Starting the server manually with the listen command, as shown above, is no longer necessary.

sudo smartmeter --command register --port 7122 --sport /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0051-if00-port0

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

smartmeter_webthing-1.2.32.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

smartmeter_webthing-1.2.32-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file smartmeter_webthing-1.2.32.tar.gz.

File metadata

  • Download URL: smartmeter_webthing-1.2.32.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for smartmeter_webthing-1.2.32.tar.gz
Algorithm Hash digest
SHA256 22f8c431294f4410c089c385d4a7b062429da591b0364a41e248e65c1efb38e2
MD5 626a5630858512c6be8599d30c85be11
BLAKE2b-256 7de50c667ad1997bce71520ad14f7b12121f7ebddeffa25d60c8a3c0c3f00d25

See more details on using hashes here.

File details

Details for the file smartmeter_webthing-1.2.32-py3-none-any.whl.

File metadata

File hashes

Hashes for smartmeter_webthing-1.2.32-py3-none-any.whl
Algorithm Hash digest
SHA256 bf29de03f12b474b3f2602da480c4c44f964dddef4e9023f25fffdb110f4a98d
MD5 048e981ede5944e726e7300d13783f63
BLAKE2b-256 e32df7b6b1427c764e0154ee9f72b5b49e9e9ae5ec8c2c205236e5cf41dcb293

See more details on using hashes here.

Supported by

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