Skip to content

Technology-lab/flexy-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Flexy Reader Public

A public repository which contains the shell script and python script to collect smart metrics from the Smart Meter

Install Crontab task to send the metrics every minute

# checkout this repo
git clone https://github.com/Technology-lab/flexy-reader.git flexy-reader-public

# set global user name/email
git config --global user.name "Raspberry PI"
git config --global user.email "Raspberry@PI"

# install python dependenies
pip3 install dsmr-parser requests jsons retrying

# create log file
touch /home/pi/flexy-reader-public/dsmr.log

# export variable $FLEXY_BACKEND_HOST to the system
echo 'export FLEXY_BACKEND_HOST=<API-URL>' >> ~/.bashrc

# edit crontab and add FLEXY_BACKEND_HOST env variable to override the api url and add entry to run the dsmr_reader_cron script every minute
crontab -l | { cat; echo "FLEXY_BACKEND_HOST=<API-URL> 
*/1 * * * * sh /home/pi/flexy-reader-public/dsmr_reader_cron.sh >> /home/pi/flexy-reader-public/dsmr.log 2>&1"; } | crontab -

# check the script logs 
tail -f /home/pi/flexy-reader-public/dsmr.log

# if something goes wrong
# check syslog
tail -f /var/log/syslog
# check auth log
tail -f /var/log/auth.log

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published