emonGLCD receiving data from emonBase

Hey

Just built my emonGLCD, and allthough it was a lot smaller than I thought, it's really nice :)

Has anyone tried driving the displayed data from the server (Raspberry Pi in my case) instead of the emonGLCD acting on its own? We currently only feed it time data that way, but in my case it will be very hard to get the data I want to display.

For instance:

  • kWh/day is already in emoncms, why keep track of it in the LCD also? Getting that data from the server simplifies things since the LCD only needs to display data, not calculate and keep track of days. (This way you might be able to sleep the unit during the night as well).
  • Hourly electricity prices, fetched online.

Can't think of any other examples now, but basically all kinds of funky calculations which would be very hard to make in the emonGLCD. The hardest part would be to make a flexible, configurable solution.

 

Lloyd's picture

Re: emonGLCD receiving data from emonBase

I send external temperature to display on mine. Simple bash script on my linux box grabs temperature from wview and sends to emon base, which forwards to the display.

Lloyd

mharizanov's picture

Re: emonGLCD receiving data from emonBase

Lloyd, that seems fun to explore, I see wview can run on Raspberry Pi, so might be an interesting project to try out. Do you care to share your bash script?

Thanks

Lloyd's picture

Re: emonGLCD receiving data from emonBase

Attached is one of my scripts.  To understand how it works, probably best to have some background information.

I could never get emonBase to reliably transfer to emoncms.  I spent far too long trying to track down problems in the TCP/IP handling, that I decided to turn my solution on its head.

I have emoncms hosted by one of the hosting companies (it hangs off another web site I manage). 

I have an o2 joggler, running ubuntu, that runs my weather station software (wview and apache). (I did run emoncms on here for a while, but then it was using a usb stick as the file system, and these would die after a couple of months due to the high number of writes.  I now have a hard drive attached, so in theory could move it back.)

I have two scripts on the joggler.  One of these pulls data from emonbase (192.168.98.20)  every 10 seconds, and pushes to my emoncms installation.  The second script again pulls data from emonbase, this time every 5 minutes, and posts it to pvoutput.com.  Each time I pull data from the emonbase, I send it the current external temperature, pulled and scraped from a very simple wview html page. If it has changed since the last time, it transmits this to emonGLCD.

Attached is the scipt that sends to pvoutput.com. It isprobably not the most efficient (or neatest!) of code, but it does the job.  When I pushed data from emonBase, my failure rate was probably around 30%, and I would get frequent hangs.  Now it is more like 0%.

Also attached are a couple of photos showing my two main displays - immersion one selects when power is being diverted.

Lloyd

mharizanov's picture

Re: emonGLCD receiving data from emonBase

Thanks!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.