Plugin: Rainforest Eagle Model 100 and 200 Smart Meter

I’ve just published an updated Rainforest Eagle Plugin that works with both the model 100 and 200 to read your whole house power consumption or generation when paired with a smart meter. This is based on robertmm’s original plugin. It’s been extensively rewritten to handle the Model 200 and switches from using the undocumented XML port to the partially documented web port on the Model 100.

You’ll find it in the Mios app store here. Current version is 0.74: MiOS Apps

It’s also available in the AltAppStore. The model 100 has been tested on openLuup and UI5 Vera Lite. The model 200 has been tested on openLuup and UI5 Vera Lite and UI7.

Installation

  1. install from the marketplace
  2. go to the advanced tab and fill in the IP address of the Eagle as the EagleIP device variable. This is not the IP attribute in Vera. This must be a static IP that you set up in your router.
  3. fill in the Mac Address, the Install Code, and the Cloud ID from the bottom of your Eagle (see picture) also in the advanced tab - see 2nd picture (remove any spaces when filling in these codes)
  4. fill in the EagleModel variable that you have in the advanced tab (this is not “Model” in the advanced tab)
  5. reload

If you have any issues, post here and include a log file if possible.

Notes
There is one more variable that you can modify: MeteringType. The default is 0 which means the grid only delivers energy to you. 1 means the grid only receives energy from you, and 2 means energy goes both ways (for example you have solar panels and the grid receives from you during the day and the delivers to you at night).

‘From Grid’ is the absolute number on the meter in kWh for energy delivered to you. ‘To Grid’ is the energy received by the grid (e.g., with solar). ‘Current’ is the net kWh, positive if the grid has delivered more to you, negative if the grid has received more from you. ‘Reset’ is used to reset the ‘Current’ value to zero whenever you would like. I run it from a scene once per month. Then ‘Current’ shows the net kWh I have received or delivered in the current month - or you could reset it on your billing date.

On UI5 the model 100 requires dkjson which you can get from here: dkjson - dkjson
On openLuup the model 200 requires lxp which you can get: sudo apt-get install lua-expat
UI7 shouldn’t need anything else: it already has dkjson and lxp

0.74 Release: New device variable is used for the Eagle IP address instead of the Vera attribute which is disappearing for some. You must set the ‘EagleIP’ device variable to the fixed IP of your Eagle device.

I deleted by Eagle device I originally created from the 0.4 version, went to the app store and loaded the 0.74 version. Followed the instructions below to the letter. Eagle 100 on UI7/VeraSecure.

HW 3.2.3 FW 2.3.4.8466 ZB 1.4

“Eagle communication failure.Can’t Detect Device”

02 03/12/19 14:49:42.139 e[33;1mluup_log:255: SmartMeterHAN1(0.74): Error connecting to Rainforest Eagle server port: 401e[0m <0x72753520> 06 03/12/19 14:49:42.140 Device_Variable::m_szValue_set device: 255 service: urn:micasaverde-com:serviceId:HaDevice1 variable: e[35;1mCommFailureTimee[0m was: 0 now: 1552420182 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x72753520> 06 03/12/19 14:49:42.143 Device_Variable::m_szValue_set device: 255 service: urn:micasaverde-com:serviceId:HaDevice1 variable: e[35;1mCommFailuree[0m was: 0 now: 1 #hooks: 0 upnp: 0 skip: 0 v:0xee7780/NONE duplicate:0 <0x72753520> 06 03/12/19 14:49:42.165 Device_Variable::m_szValue_set device: 255 service: urn:micasaverde-com:serviceId:HaDevice1 variable: e[35;1mCommFailureTimee[0m was: 1552420182 now: 1552420182 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x72753520> 02 03/12/19 14:49:42.166 e[33;1mluup_log:255: SmartMeterHAN1(0.74): Unable to retrieve data from Eagle 100e[0m <0x72753520>

Can you set the “Debug” variable to TRUE and restart and get the logs? I’m interested in the log as it starts up.

401 means unauthorized, so I suspect something went wrong with the authentication. Did you turn on authentication in your unit? It should work. The CloudId and DeviceIN must be correct for this to work. No “0x” in front, right? Just 6 digits for the CloudId, and 16 hex digits for the DeviceIN. And don’t mix up the MAC with the IN.

[quote=“jswim788, post:3, topic:198997”]Can you set the “Debug” variable to TRUE and restart and get the logs? I’m interested in the log as it starts up.

401 means unauthorized, so I suspect something went wrong with the authentication. Did you turn on authentication in your unit? It should work. The CloudId and DeviceIN must be correct for this to work. No “0x” in front, right? Just 6 digits for the CloudId, and 16 hex digits for the DeviceIN.[/quote]

Sorry, I figured it out - was about to delete my post. I entered everything exactly like on the bottom of my Eagle. Which wasn’t the right thing to do - my Cloud ID printed on the bottom is actually in caps/upper case. Once I tested with my browser what I had entered into the device variable, I remembered I needed to change to lower case on that one…

BTW, the reason I upgraded was the old 0.4 code always left a banner at the top of UI7 showing “Eagle(#) Running LUA Startup”. I suspect some ending to a command block was missing that UI5 didn’t really care about. It worked, was just annoying. Your code starts up clean and I don’t get the banner hanging around. Thanks!

Interesting, your Cloud ID is hex, not integers? All the examples I’ve seen so far are not hex. I could add a function to force it to lower case when used if need be.

Yes, my Cloud ID is hex. It is old, from June of 2013, likely they stopped using hex at some point.

Should you wish to be an alpha tester, you can pick up a Lua file from GitHub - jswim788/rainforest-eagle-vera at development that has a line to automatically convert to lower case. Let me know if you try it. Thanks.

If you’re still developing this plugin, the newest 0.74 version doesn’t seem to work for an older Eagle 100. It works fine with 0.72, but once I upgrade I get no connection.

Oh is there a way to use the old 0.72 version ? I also am finding that the latest version does not work
I had a look on github - and that confused me but after looking through the code I realized there was a debug variable - so I set that to 1 and the thing started working - i cleared debug to 0 - restarted the Vera and it still seems to be working

image

although the top screen wont display my currently negative value - Datamine2 is reading the correct value -

So I can report that for a very old Eagle 100 - and Vera-Plus with UI7 and the latest plugin download - it works