EN-IEC 62056-21, Part 21: direct local data exchange, 2002-05 - Requires python2+ - Install deps # pacman -S python-requests python-pytz - Create script # nano /root/dsm_reader.py && chmod +x /root/dsm_reader.py - Create config # echo "auth_token='abcdefg'" > /root/dsm_reader_config.py - Start # systemctl enable dsm_reader.service && systemctl start dsm_reader - ToDo: 1. modify service file to a template unit file (name@string.service), where the serial device becomes variable 2. use this name@ to create a separate backlog file per serial device? 3. auto insert backlog to influxdb 4. implement retries, with backoff? like - solution 4 from https://izziswift.com/can-i-set-max_retries-for-requests-request/ - https://github.com/pvl7/emu-to-pvoutput/blob/2edf7fff8d1af180fa203968b2d33acb80485dec/rainforest-to-pvoutput.py#L88 5. also backlog pvoutput temp. errors, note: The date parameter must not be older than 14 days from the current date