Sign inSign up

roeldev/casa-youless-logger

By roeldev

•Updated about 7 years ago

Logger service for YouLess energy monitor

Image
1

248

roeldev/casa-youless-logger repository overview

⁠Logger service for YouLess energy monitor

Latest release Build status Layers Image size Code maintainability

A YouLess energy monitor is a handy to device to monitor your power and gas usage. It has it's downsides though, one is a limited amount of historical data that is stored. This service aims to solve that problem by storing the monitored data of each interval for a much longer period of time. And does so for multiple YouLess devices. It also provides an API compatible with YouLess' own API so the service can easily be used by any existing client.

Key features are:

  • no more limits on monitored data
  • get data from multiple devices
  • support older YouLess versions
  • only monitor the data services you want
  • configure update intervals
  • cli to instant trigger an update
  • classic api can serve older data

⁠Installation

Setting up the service is pretty easy.

services:
  youless-logger-service:
    image: roeldev/casa-youless-logger:latest
    ports:
      - 80:80
    volumes:
      - ./config:/config/
      - ./data:/app/data/
      - ./log:/app/log/
    environment:
      - PGID=100
      - PUID=1000
⁠Volumes
PathContains
/configConfig files
/app/dataDatabase (backup) files
/app/logLog files

⁠Configuration

Support for multiple YouLess devices means a little more configuration. Altough it should be pretty self explanatory, most important stuff is mentioned in this chapter. But first, have a look at the [sample config] (rootfs/etc/default-configs/config.php) for a quick overview of possibilities.

Each device should have at least an ip option set so the logger can reach the device's API. All other values are not required. However this probably results in way too much useless data being saved. Therefore it's recommended to only enable the data service(s) that are actually monitored. and disables classic API support

Note: Latest YouLess devices support data from three different counters: power, gas and s0. Older versions only support power.

Below example adds two devices:

  1. main which requires a password to access the API on 192.168.1.27 and provides data of power and gas consumption;
  2. attic which is hosted on 192.168.1.32 and only provides data of the s0 pulse counter.
'devices' => [
    'main' => [
        'ip' => 'http://192.168.1.27',
        'password' => 'secret',
        'services' => [
            'power' => true,
            'gas' => true,
            's0' => false,
        ]
    ],
    'attic' => [
        'ip' => 'http://192.168.1.32'
        'services' => [ 's0' ]
    ]
]

⁠CLI

A CLI tool is available to display info or communicate with the configured devices. Login to the Docker container and use yl list to list all available commands. It is also possible to run the tool outside of the Docker container via docker exec -it {container_name} yl {command}.

⁠Stored data

A new SQLite database is created on first run. All data values are stored in the data table whitin this database.

⁠Intervals
IdIntervalAPI equiv.LS110 history*LS120 history*Unit (power/s0)Unit (gas)
1minuteh1 hour (2x30)10 hours (20x30)wattn/a
210 minsw24 hours (3x48)10 days (30x48)wattliter
3hourd7 days (7x24)70 days (70x24)wattliter
4daym1 year (12x31)1 year (12x31)kWhm3 (cubic meter)
  • = max. history (amount of pages x data entries)
⁠Units
IdUnitAPI equiv.Service
1wattWattpower/s0
2kwhkWhpower/s0
3literlgas
4m3m3gas
⁠Build with

⁠License

GPL-3.0+⁠ © 2019 Roel Schut⁠

Tag summary

Content type

Image

Digest

Size

26.4 MB

Last updated

about 7 years ago

docker pull roeldev/casa-youless-logger:experimental