Sign inSign up

techniktueftler/intelligent_socket_datalogger

By techniktueftler

•Updated almost 3 years ago

Reads intelligent sockets in individually adjustable time intervals and stores in InluxDB

Image
0

1.7K

techniktueftler/intelligent_socket_datalogger repository overview

You can find the full documentation here: https://github.com/Technik-Tueftler/IntelligentSocketDatalogger⁠

⁠IntelligentSocketDatalogger

IntelligentSocketDatalogger is an app which reads intelligent sockets in individually adjustable time intervals and stores their return values in an InfluxDB. Each socket can be set with additional parameters. So you can have the total Wh per device written into a text file once a day (time variable).

⁠Overview

  • Supported Python 3.10
  • Shelly Plug S sockets were tested
  • Runs locally, as well as a Docker container

⁠Additional functions

Cost calculation: Writes the total work in KWh for the required period and calculates the total cost.
Power on counter: Counts how often a device switches on for the required time period.

⁠Supported sockets

Via a plugin concept, you can include any socket by writing your own handler and specifying the data that will be returned. The individual steps are explained in chapter Use your own socket. Furthermore, there are some examples in the file device_plugin.py.

  • Shelly Plug S (type name: shelly:plug-s)
  • Shelly 3EM (type name: shelly:3em)

⁠Docker Compose Example

version: "2"
services:
  influxdb:
    image: techniktueftler/intelligent_socket_datalogger
    container_name: intelligent_socket_datalogger
    volumes:
      - /srv/dev-disk-by-uuid-0815/data/socket_datalogger/:/user/app/IntelligentSocketDatalogger/files/
    environment:
      - DB_IP_ADDRESS=192.193.194.195
      - DB_USER_NAME=shellyplug
      - DB_NAME=power_consumption

Tag summary

Content type

Image

Digest

sha256:127a9664f…

Size

333.7 MB

Last updated

almost 3 years ago

docker pull techniktueftler/intelligent_socket_datalogger