Author Topic: Contribution: Monitor and visualize energy usage with emoncms.org in Vera  (Read 6040 times)

Offline jamac

  • Jr. Member
  • **
  • Posts: 59
  • Karma: +0/-1
Re: Contribution: Monitor and visualize energy usage with emoncms.org in Vera
« Reply #30 on: December 27, 2016, 01:58:26 am »
I'm struggling to get this working and am hoping for some help.  :)

I've got a Vera3 running UI7.

I followed wezzix instructions at the top of this thread, ie, created an account at emoncms, amended and loaded the EnergyMonitor.lua file and entered the startup code.
This didn't generate any inputs in emoncms so I followed RTS's instructions and added the following to the start of the EnergyMonitor.lua file

Code: [Select]
module("EnergyMonitor", package.seeall)
This to the end of the file:

Code: [Select]
_G.EnergyMonitorOnTimer = EnergyMonitorOnTimer
And, this in the Edit Startup Lua window:
Code: [Select]
emoncode = require("EnergyMonitor")
emoncode.EnergyMonitorOnTimer()

However, I get the following error in the top of the dashboard:

ERROR: error in lua for scenes and events

When i look at the log file I see the following error on multiple occasions...

LuaInterface::CallFunction_Timer-5 function EnergyMonitorOnTimer failed [string "module("EnergyMonitor",package.seeall)..."]:17: attempt to perform arithmetic on a nil value

Any helpful tips?
« Last Edit: December 27, 2016, 02:02:04 am by jamac »

Offline jamac

  • Jr. Member
  • **
  • Posts: 59
  • Karma: +0/-1
Re: Contribution: Monitor and visualize energy usage with emoncms.org in Vera
« Reply #31 on: January 03, 2017, 01:28:56 am »
I got everything working. There was a syntax error in my code.

However, I've got a weird problem. I've set up a number of dashboards, all of which are visible via a url containing the relevant API. I can see the dashboards on my ipad via Safari but they refuse to display in a webtile from within Homewave.

Is there anything unusual about the way Emoncms displays dashboards that could explain this problem???

Of course, it's possible it's a Homewave issue and not an Emomcms issue...

« Last Edit: January 05, 2017, 08:36:25 pm by jamac »

Offline VallejoIII

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Contribution: Monitor and visualize energy usage with emoncms.org in Vera
« Reply #32 on: February 27, 2017, 05:37:09 pm »
No longer working after upgrade to version 1.7.919.

Getting "ERROR : Error in lua for scenes and events"  >:(

Offline VallejoIII

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
UPDATE:

Code:
emoncode = require("EnergyMonitor")
emoncode.EnergyMonitorOnTimer()

Fixed and working. Syntax error!
« Last Edit: March 05, 2017, 04:30:43 pm by VallejoIII »