Community
OpenEnergyMonitor

Community

R Library for emonCMS now ready as pre-release

Tags: #<Tag:0x00007f6e0481a208> #<Tag:0x00007f6e0481a0f0> #<Tag:0x00007f6e04819fb0>

I’ve been working on a library to allow the R language to interface with the emonCMS API. With much help from the community, this is now ready as a pre-release. Full code, install instructions, and sample use is now available at https://github.com/davidski/emoncmsr

What can you do with this library?

  • List/Create/Modify/Delete inputs
  • View/set/reset process lists on inputs
  • List/Create/Modify/Delete feeds
  • Post data to input
  • Post bulk data to inputs (post 20,000+ data points in a single call!)
  • Retrieve feed data from the API
  • Read PHPFINA binary files from a local file system

Why R?

R (R project) is a fantastic language for data analysis including statistical modelling and data visualization. As a full programing environment, you can pull in outside data sources, advanced machine learning techniques, make web-ready interactive graphs and applications, and much more. Some basic uses are laid out in the README on the GitHub repository.

Neat, but what about ____?

  • This release targets the self-hosted emonCMS API. While a few functions are written for the emoncms.org version, they are not fully tested.
  • Direct posts to the feed interface are not implemented. While not challenging, this isn’t something I use so I haven’t yet put the time into developing this. Requests will help prioritize!
  • There may be (almost certainly) other bugs that I haven’t come across. Your help in finding these less than polished areas is urgently requested! Issues on GitHub are preferred for bug reports, but I’ll try to monitor this forum as well.

Fin

I believe this is the first emoncms interface library for a full programing language. I hope that quickly changes A port to other (lesser :wink:) language like Python, Go, PowerShell, etc. should all be possible. Get to it community! :smiley:

3 Likes

Nice work @davidski! Thanks a lot for sharing