GithubHelp home page GithubHelp logo

danbates2 / sbfspot_to_emoncms Goto Github PK

View Code? Open in Web Editor NEW
4.0 6.0 0.0 60 KB

python script to interface SBFspot and emonCMS, by reading sbfspot database and then make GET request to emonCMS

License: GNU General Public License v3.0

Python 100.00%
emoncms sbfspot energy-monitor solar-energy

sbfspot_to_emoncms's Introduction

SBFspot to emonCMS

Python script to interface SBFspot and emonCMS, by reading the most recent sbfspot database entry and then making a HTTP request to emonCMS.

https://github.com/SBFspot/SBFspot/

https://emoncms.org/

. Works only by sending the most recent datapoint.

. To get this working (with SBFspot already installed) place this script in /home/pi/scripts . make it exacutable $ sudo chown 755 sbfspot_to_emonCMS.py . and then type $ crontab -e and add a new line:

*/5 * * * * python /home/pi/scripts/sbfspot_to_emonCMS.py > /dev/null

. The */5 is the interval in minutes, matching the SBFspotUploadDaemon default recommendation.

. User must modify the script to include their emonCMS API Write key.

. With emonCMS already installed on a rPi, SBFspot will run fine. Tested using the default SQLite.

. With emonCMS Oct2017.img, the default SBFspot folder locations need changing during install from /home/pi/smadata to /home/pi/data/smadata, for write permissions to not throw errors. This will need changing in both SBFspot conf, and SBFspotUploadDaemon conf. Future versions of emonCMS (emonSD) should not suffer this added requirement as the write lock is being removed.

. Included in the script folder is an example database and my python learning steps to complete this.

Possible Improvement : Another one-time script could be made to upload the whole database to emonCMS using the bulk-upload API. Possible Improvement (minor) : To use the timestamp information to more accurately place the datapoints in time.

Big thanks to these guys: https://community.openenergymonitor.org/t/sbfspot/8245

Thank you developer(s) of SBFspot, and to their Raspberry Pi install guide, which have given me greater understanding of how my rPi worked under the hood.

*SBFspot is a tool for accessing the data stored in SMA solar inverters via bluetooth or ethernet.

sbfspot_to_emoncms's People

Contributors

danbates2 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.