CurrentCost EnviR energy monitor

Hi weissertigerxl,

The CurrentCost monitor I have struggles to send the power usage from the transmitter to receiver at about 20 m, though several walls (one of them brick). I think that most houses will have dead spots, forcing you to put the receiver closer to the meter box where the transmitters are.

I don’t have the Aeon Labs Z-wave monitor—it wasn’t available here when I bought my CurrentCost EnviR—but I think that I would still choose the EnviR, given some of the talk on this forum from other users who have the Aeon Labs unit.

As far as monitoring individual phases, I know that the EnviR can be fitted with additional clamps so that it tells you the usage on each of the one, two or three phases that you have clamps for. Probably the Aeon Labs one does the same. While you’re supposed to monitor different phases when you use multiple clamps, it’s possible to monitor separate circuits on the same phase too. See earlier in this topic for the matching feature request from @Ap15e. Or you buy additional transmitters. You can have up to ten.

Neither the CurrentCost nor the Aeon Labs monitors measure line voltage, only current. This makes them somewhat inaccurate because they can’t measure fluctuations in the grid voltage, nor can they measure power factor. There are other monitors (TED5000 is one) that do measure voltage and power factor, but I don’t know if they are available in the EU.

UI4 and UI5 collect the same energy usage data. The only difference is in how they aggregate it and display it.

I found a typo that was there all along (so I’m not sure how it ever worked for you). Version 17 (on apps.mios.com and on code.mios.com) fixes it. The apps.mios.com version needs to be approved by MCV, so it may not turn up right away.

I must have been using the plugin file that I modified a while back.
I just tried to uninstall and install version 17 from the mios app page and get the following error.

Luup : Failed to download all plugins. Will retry in 10 minutes.
CurrentCost Transmitter[151] : Startup Lua Failed

Hi jpitts,

I get an error too:

01	01/08/12 10:08:23.366	FileUtils::ReadURL 0/resp:404 size 243 http://apps.mios.com/plugins/1128/2828/L_CurrentCostEnviR1.lua.lzo <0x402>
01	01/08/12 10:08:23.976	FileUtils::ReadURL 0/resp:404 size 243 http://apps.mios.com/plugins/1128/2828/L_CurrentCostEnviR1.lua.lzo __LEAK__ this:397312 start:397312 to 0xa1b000 <0x402>
01	01/08/12 10:08:23.978	JobHandler_LuaUPnP::DownloadFile iSlot: 10 buffer: (null) <0x402>
01	01/08/12 10:08:23.979	JobHandler_LuaUPnP::DownloadFiles L_CurrentCostEnviR1.lua returned 0 <0x402>
01	01/08/12 10:08:23.982	JobHandler_LuaUPnP::DownloadFiles can't get file L_CurrentCostEnviR1.lua <0x402>

There seems to be an issue with uncompressed files (which L_CurrentCostEnviR1.lua is). I will try to find a workaround, but I suspect that I need the help of the MCV gods.

(Meanwhile, I know that the code.mios.com version works just fine, so if you need this plugin back now, you’ll have to skip the apps.mios.com version for the moment.)

I’ve coded a workaround, using MCV’s incompatible-with-UI4 method of using compressed *.lua files. I consider this only temporary because it means I have to maintain two code bases. But at least it should get you going.

Please forgive me as I’m pretty new to MiOS/Vera and this is the first app I’ve installed. I’m having a complete failure of the CurrentCost plugin to initialize, from what I can tell. I get a Lua startup failure and no communication with the device. I am able to see the device after installing the plugin and I’m also able to add/edit the USB serial device appropriately.

I see the following in /var/log/cmh/LuaUPnP.log:

01 01/20/12 0:40:44.125 LuaInterface::CallFunction_Startup-1 device 6 function initialize failed [string "..."]:7: module 'L_CurrentCostEnviR1' not found: no field package.preload['L_CurrentCostEnviR1'] no file './L_CurrentCostEnviR1.lua' no file '/usr/share/lua/L_CurrentCostEnviR1.lua' no file '/usr/share/lua/L_CurrentCostEnviR1/init.lua' no file '/usr/lib/lua/L_CurrentCostEnviR1.lua' no file '/usr/lib/lua/L_CurrentCostEnviR1/init.lua' no file '/etc/cmh-ludl/L_CurrentCostEnviR1.lua' no file '/etc/cmh-lu/L_CurrentCostEnviR1.lua' no file './L_CurrentCostEnviR1.so' no file '/usr/lib/lua/L_CurrentCostEnviR1.so' no file '/usr/lib/lua/loadall.so' <0x2b667680> 01 01/20/12 0:40:44.125 LuImplementation::StartLua running startup code for 6 I_CurrentCostEnviR1.xml failed <0x2b667680>

I also saw the following messages earlier that may be related:

03 01/20/12 0:40:24.670 LuaUPNP: starting bLogUPnP 0 <0x2ba50000> 02 01/20/12 0:40:24.679 JobHandler_LuaUPnP::Run: pid 9754 didn't exit <0x2ba50000> 02 01/20/12 0:40:24.695 UserData::LoadUserData previous: 0 from *1.5.254* <0x2ba50000> 03 01/20/12 0:40:24.700 UserData::LoadUserData BuildVersion: *1.5.254* SvnVersion: *5503* Model: 31 Sercomm NA900 flush: 0 changed: 0 resync: 10079 syncdevice:1 <0x2ba50000> 02 01/20/12 0:40:24.714 JobHandler_LuaUPnP::FetchMissingFiles need to download D_CurrentCostEnviR1.json <0x2ba50000> 02 01/20/12 0:40:24.714 JobHandler_LuaUPnP::m_sMissingFile_set D_CurrentCostEnviR1.json <0x2ba50000> 01 01/20/12 0:40:24.735 Device_LuaUPnP::LoadDeviceDoc can't load /etc/cmh-lu//D_CurrentCostEnviR1.xml <0x2ba50000> 02 01/20/12 0:40:24.735 JobHandler_LuaUPnP::m_sMissingFile_set /etc/cmh-lu//D_CurrentCostEnviR1.xml <0x2ba50000> 01 01/20/12 0:40:24.736 JobHandler_LuaUPnP::CreateDevice_LuaUPnP failed to load 6/D_CurrentCostEnviR1.xml so device 6 is offline <0x2ba50000> 01 01/20/12 0:40:24.852 Device_LuaUPnP::CreateServices Aborting device 6 because the topmost device has no interface <0x2ba50000> 01 01/20/12 0:40:24.853 JobHandler_LuaUPnP::CreateAllServices failed to create 6 <0x2ba50000> 02 01/20/12 0:40:24.873 Device_Service::MatchupUpnpServices no upnp service for urn:micasaverde-com:serviceId:ZWaveDevice1 <0x2ba50000> 01 01/20/12 0:40:24.874 Device_LuaUPnP::CreateImplementations Aborting 6 because it failed to load <0x2ba50000> 01 01/20/12 0:40:24.874 JobHandler_LuaUPnP::CreateAllImplementations failed to create 6 <0x2ba50000>

Could anyone point me in the right direction? It looks to me like the App install does not complete successfully as I’m missing several files. I tried downloading the files manually from the repository, but I see no explanation of where I should put them. Of course, it seems like the process should work without a manual install of the files… BTW- I can do a ‘wget’ to retrieve files from the repository URL which may or may not rule out a network issue.

divide, can you please tell me what version of MiOS (UI) you are running (1.5.255, for example) and whether you are installing from apps.mios.com (the UI5 marketplace) or from code.mios.com (individual files)? If from apps.mios.com, what version of the plugin does it say it is?

Edit: I see that you are on 1.5.254 from the logs you posted. I have a theory that there might be no version of the plugin posted for your release. I submitted an older version (17.3) that I know works on that firmware. It needs to be approved by MCV staff so check back later and tell me if the error goes away. Sorry to mess you around; I’m new at this marketplace stuff.

Further edit: 1.5.264 will fix this too, but it isn’t released yet.

I tried installing several different ways:

  1. Directly from apps.mios.com (also through the UI, I believe both result in the same action) of the latest version I saw (22.0)
  2. From code.mios.com, using the individual file upload and steps suggested there for the device and USB setup
  3. Directly from apps.mios.com with the older version I saw in the list (17.3)
  4. Did a “Factory Reset” on the Vera and attempted #1 again (though I believe only with 22.0)
  5. Attempted an apps.mios.com install with a manual copy of the .lua file in /etc/cmh-ludl/ folder

Is there a way to update to 1.5.264 currently? The check through the UI indicates that I have the latest release, I haven’t yet seen where MCV posts their beta images. I’ve worked with OpenWRT before so I’m not terribly concerned about trying a pre-release version. This is also a primary reason for my Vera purchase (this is a Vera3 by the way) so I’m happy to perform any reset that might help.

This Beta Testing (Public) board is, presumably, where MCV will continue to post public beta announcements.

@futzle I tried another factory reset followed by an install of the 17.4 version (is this identical enough to the 17.3 you mentioned?) from apps.mios.com. This still didn’t work. I did not understand how to configure the serial connection (I saw nothing in the config screen) but I did edit the serial port directly and associate it with the ENVI. Still no dice.

@oTi@ Yes, that would be the logical place huh :slight_smile: However, I didn’t see anything that looked like a newer beta release than the Vera2 1.5.255/Vera3 1.5.254 versions which I’m on. I sure may be missing something, though.

Hi divide,

If you are comfortable messing with OpenWrt then I would recommend going straight to version 22 from code.mios.com. Uninstall any apps.mios.com version and delete any files in /etc/cmh-ludl/ matching ?_CurrentCost* first. Stay away from the factory resets; they are overkill.

Installing on 1.5.260 or earlier is a little tricky because you have to install two different ways. All but the L_* files you do through the Apps > Develop Apps > Luup files > Upload files interface to ensure they get compressed. The L_* file you need to transfer to /etc/cmh-ludl using scp so that it isn’t compressed. Restart Luup AND clear your browser cache.

Firmware 1.5.265 makes this much simpler but it isn’t required.

All the 17.x versions are the same codebase but vary in terms of how they have asked to be compressed. apps.mios.com was highly experimental at the time so it took a few repackagings before I got one that worked. 17.3 works on 1.5.255; 17.4 does not. (You shouldn’t have even been allowed to install 22.0 on 1.5.255, so clearly the MiOS Version field actually has no effect. Good to know; I’ll put my own test into the Lua from now on.)

Edit: spelling

Well, I continue to have no luck. I’m not sure what I’m doing wrong here. I followed your instructions, manually created the device, and associated the Serial port with the device. I’m no longer seeing errors in the LuaUPnP.log, however I see no wattage output or more detailed information. Also, when I click the Communication tab I see “Opening Serial Port” with an activity bar and it sits indefinitely.

Any other troubleshooting suggestions? I’ve used the CurrentCost web bridge successfully with my ENVIr but I haven’t tried to listen to the serial port directly. I will try that tomorrow to verify that your plugin should be seeing something, at least.

Thanks again for all the help!
Peter

Hi divide,

I notice that I haven’t listed J_SerialPort.js in the list of files to install. Totally my fault; It’s a new file and I never updated the instructions. I’ll fix that now. Just transfer this file too and you should get that tab to work.

Normal startup will put this in the Luup log:

50 01/23/12 21:54:11.872 luup_log:172: Initializing CurrentCost EnviR <0x2c021680> 50 01/23/12 21:54:11.872 luup_log:172: Opening socket to 10.159.21.40 port 49402 <0x2c021680> 50 01/23/12 21:54:11.974 luup_log:172: Power formula: +0-1+9 <0x2c021680>
(You won’t get the socket message if you have a direct serial connection.)

If you want to help to debug this, you can edit L_CurrentCostEnviR1.lua and turn on debugging to the Luup log:

-- Print lots of useless debugging information to the Luup log. DEBUG = true
You’ll then get a log line every time there’s serial traffic. If it’s still silent then the problem is outside the plugin.

Double-check the serial parameters (mine is 57600/8/N/1) too.

I approved the 17.3 version. Sorry it took so long, I had a day off Friday.

Thanks @mcvflorin. Interestingly that has caused the copy of the plugin on my Vera to revert from version 22.0 to 17.3, automatically.

I’m not going to argue the merits of automatic updating (for now) but I will ask this: Why did this version install when its compatible firmware range is outside my currently-installed firmware version?

Thanks for the help @futzle, I am up and running now. I’m not sure why I had so many issues. I added the Serial JS file you talked about but things didn’t automagically work until ultimately switching to Network and switching back to Serial. I also tested the adapter on my PC in the meantime, but I doubt that has any relevance.

Looks good so far! Waiting for the ENVIr to eventually give me historical statistics so I can see what that looks like, but I’m pretty stoked. Thanks for adding the logic to track phases separately! Hoping to see how this integrates with the Vera energy monitoring logic, I’m not seeing separate devices yet… but perhaps that’s related to the historical data not loading. I will be patient :slight_smile:

Thanks again for the help!

p.s. - I’m sticking with the manual install for now, I’m concerned about the manual downgrade (?) to an unsupported device along with the compression of a file that can’t be read compressed. The UI for installing/uninstalling software is pretty uncommunicative also, but I figure that’s new with UI5 so perhaps it will be more smooth in UI6. Functionality and shinyness is great, but not at the expense of communicating well what’s going on.

p.p.s - HOLY COW that CAPTCHA is obnoxious. Double that. Took me ~10 tries!

Good to hear you’re up and running. Please do report issues, or anything which doesn’t match your expectations. There aren’t many users of this plugin yet so I don’t get a huge amount of feedback.

History should start to transfer from console to Vera starting at the top of an odd-numbered hour (say, 7 pm). It trickles through so it can take 60 minutes if you have a lot of history. Any Luup restart during that period will invalidate partly-downloaded history data, so the plugin is happiest when you leave it alone. Also, there are slight variations in the history XML format, so if you don’t ever get history then you may be seeing a format I haven’t seen yet. Sample XML is welcome.

Hi Futzle, is Hi Futzle, is there a way for the individual childs to come up separately in ERGY so each device can be tracked, just like the z-wave devices?their a way for the individual child to come up sepersley

Hi rweisback,

You’ll have to forgive my ignorance; I know only of ERGY by name and don’t use it.

What’s happening, and how does this differ from what you expected to happen? Screen captures would be really helpful.

There’s not actually any “support” for ERGY anywhere in the CurrentCost plugin and I’m not aware of any way that I can control what ERGY does.

This might be a more generic issue, true of all the energy monitoring plugins. Perhaps someone from MCV can chime in?

You might want to look for dataMine. It enables you to select what devices you want to record history for any device variable.

Ergy enable the user to select which devices that want to record historic usage and provides simple graphing capabilities.

Datamine thread http://forum.micasaverde.com/index.php/topic,7750.0.html