Custom Component: Rainforest Eagle-200 local meter reader

@gregtd
I’m so sorry I missed all of your edits. I appreciate all the thought you put into the debugging and helping me out with this!

@CitizenDik
That was it!!! Wow. Hard to believe after all the troubleshooting that it was a couple quotes that was the issue.

Thanks to everyone in the thread for the help.

@dillon No problem, I’m glad you got it resolved! I’ll look into the code and see if anything can be changed so others don’t have the same problem.

I came here for this same error:
Failed to connect during setup: Expecting value: line 1 column 1 (char 0)

But before I finished reading the entire thread I had a thought to try quoting the values (in my case I tried putting double quotes around the cloud_id and install_code values), and it solved the problem for me as well.

Perhaps the simplest solution is to just change the documentation example to indicate the value with quotes around it.

sorry in advance for the newbie question…

is there anyway to set/adjust the scan interval? On my end, it appears the device/sensors are refreshing every 60 seconds.

Thanx in advance

Same issue as above. My cloud ID was digits only. Single quotes around CloudID saved the day. Learned a bit about python as I followed thru the thread. Thanks for the effort you put into this integration.

Just got one of these devices setup as it appears it is the only one compatible with my smart meter

2 questions…

  1. it appears this device is able to provide additional data OTHER than the 4 sensors that appear to be exposed.
    anyone know if voltage is one of them?
    how would i go about polling the device to determine what else it can provide or what my utility is allowing it to provide?

  2. is it possible to change the refresh of the homeassistant sensors? currently it seems to be polling every 60 seconds - can this be changed and if so how?

thanx in advance!!

d

This integration works fine for me initially (original Eagle, not the 200), but after several hours of values it just stops responding, causing the integration to get ‘stuck’ on the last value. I tried the REST calls myself (directly to the Eagle with the local interface), and found they give a 503 error every time with a timeout message once the Eagle gets into that state.

Here’s the odd part: If I bring up the local web interface and click around to view the demand and history, it works fine. And… as soon as I do that, the integration just starts working again. Until several hours later when it stops again. I don’t know how long it works before failing or whether that is consistent, but it seems to be at least 8 hours.

Wondering if there’s some way to prevent this state it gets into, perhaps by sending requests less frequently, or even by using the same endpoints the web page uses.

Are others having this same issue? Is it specific to the older Eagle devices?

I’m using a legacy Eagle with HA and notice that the unit loses its cloud connectivity each few days or so. I reset the power and it comes back and reports data to HA… until the next cloud interruption.

It’s frustrating but not enough for me to justify buying a newer unit and re-registering with my power utility.

Contact rainforest support. I had similar issues, they pushed a firmware update and I have been fine since:)

@tsaylor @newfiemeister

I have the same issue since support upgraded my older eagle to firmware 2.3.4.8466. After some random amount of time between a few hours and a few days, the eagle just stops reporting to HA. I’ve setup a power switch to the eagle and I have HA power cycle it when this happens. Most of the time this fixes it automatically and I even have a counter running to record how many times it loses the eagle and restarts it (up to 65 right now). Sometimes the power cycle doesn’t fix it, and I have to restart home assistant. I’m probably power cycling the eagle daily, and rebooting HA every 2-3 days as a result of this very annoying issue.

If you find a solution, please post here!

Well I’m glad to know I’m not alone in this. I did contact support but didn’t get very far. Basically they told me this:

  1. The legacy device is technically unsupported (although they do still try to help)
  2. I’m on the latest firmware
  3. This problem is not known to them (although there is a known problem involving read-only files that cause [reversible] “loss” of all data)
  4. I can try a factory reset and re-provision, but if my device is unstable that could brick it

Not really the response I was hoping for. I’m doubting that a factory reset would even help (and I assume that would lose all of my history as well). This really seems like a bug in the firmware, but of course we’re beyond official support so…

I can’t say for certain, but I don’t think I had this problem prior to using HA. That makes me think that something about the periodic requests from HA are trigging this symptom. And I find it really odd, and also encouraging, that hitting the web UI makes it start working again. I’m still trying to identify which specific API command seems to kick start it, as that seems like a big clue.

I’ve been experimenting a little bit more each time the API on this legacy Eagle stops responding. I’m using postman to send various commands that are used by the web page, and I’ve identified a command that typically gets things running again in my tests:

<Command>
  <Name>get_historical_data</Name>
</Command>

However this command needs to be sent to the /cgi-bin/cgi_manager endpoint instead of the usual /cgi-bin/post_manager location normally used by this integration.

For now I’m experimenting with local modifications to the integration, to automatically send that request whenever the normal request returns a 503 error (which accompanies the timeout error I normally see after a day or two of operation). It is yet to be seen whether this can automatically recover the communications, but I thought I’d mention what I’ve found so far in case anyone else wants to run their own experiments.

Even if this approach is successful, I suspect it is not the only problem we face with this device. I’m tempted to upgrade to the Eagle-200, as it sounds like they’ve made firmware improvements (and of course because that device is actually supported). But I don’t like to give up so easily when I see signs of progress…

I’m not sure how many others are experiencing this problem with the Legacy Eagle not responding, but I wanted to mention that I’m having good success with my workaround logic (sending the alternate command with a pause, after a failed response with error code 503). After adding that code I’ve been running successfully for about 3 weeks. Prior to the change I never got more than 2 days before it would hang. My workaround logic is currently firing about 2-3 times a day, and recovering the communications each time.

I’ve created a pull request for the author of this module (GitHub - jcalbert/uEagle: Micropython Rainforest EAGLE client, which is actually a dependency used by this Rainforest Eagle integration).

@bsp9493, Did you ever get an answer on how to up the polling interval ? I don’t want to clobber my Eagle 200, since the firmware seems a little temperamental. Once per minute doesn’t sound like much, but I finally got my Eagle 200 working - the Rainforest mothership had to update, because it was dropping data left and right just connected to Rainforest Cloud.

I haven’t tested it out but I think you can

I added the scan_interval to the platform sensor in my development environment and I’m able to control the polling of my Eagle-200. The value is in seconds.

sensor:
  - platform: rainforest_eagle
    ip_address: !secret eagle200_ip_addr
    cloud_id: !secret eagle_cloud_id
    install_code: !secret eagle_install_code
    scan_interval: 120

Yep, I’m doing the same for my Legacy Eagle (although in my case I chose 30 seconds). The underlying code already throttles it to 30 seconds, so the fastest it will call the API is every 30 seconds anyway, but you will get warnings in the HA log if the work takes longer than the scan_interval time (and the default scan interval is 10 seconds).

For some reason I thought the default polling period for the Eagle sensor was 60secs, but now when I run it I see that on my Eagle-200 the API polls the device every 30secs, if I remove the scan_interval from my configuration.yaml

I’m tapping out on this buggy POS legacy eagle. I bought the Emporia Vue Utility Connect for $40. The Vue not only doesn’t crash every few hours, but it also offers 1 second resolution, sends data to hass in both kwh (1d or 1mo) and watts (1s, 1min). I’ve been running the Vue now for a few weeks with zero crashes.

The (legacy) eagle never really worked right, then they updated the firmware to force the cloud connection, and it became unstable. They offered a 10% discount on the eagle 200 after essentially breaking the device I paid $100 for. Even after the discount a new (buggy?) eagle would cost twice what the Vue costs. And the Vue works.

Thanks - turns out all that my major issue was just old Eagle 200 firmware. Not user serviceable though - had to create a ticket and get updated through their support team at Rainforest. I’m now collecting net usage form my meter and comparing against data from a Sense energy monitor. Sense is infinitely more useful in my solar household vs. the Eagle, but it’s also nice to confirm correlation with my net meter (in green). Solar is in blue, and Total House consumption is orange. You can see the big Tesla charging spike on the left. Notice how the Total Usage and Net Usage overlay one another at nighttime (no solar).

1 Like

question

I have an eagle 200… on it’s own, it seems to be stable and work fairly well.

I am also using the utility meter implementation to give me daily, weekly, monthly energy usage. I am using “sensor.eagle_200_net_meter_energy_delivered_minus_received” as my source in “utility meter”.

For some unknown reason (at least to me) every once in a while, my utility meter’s spike to the actual total accumulated value of the sensor above (ie, I would expect 30kwh for an hour, but it will spike to 130000kwh for that time period)

doing some reading, I may be able to solve this with a “filter sensor” https://www.home-assistant.io/integrations/filter/, and then use the filter sensor as my source in utility meter.

has anyone done this? or is there something else I should be looking at? If this is the best way to do it, how do I even implement the filter sensor?

  • platform: filter
    name: “filtered net energy”
    entity_id: sensor.eagle_200_net_meter_energy_delivered_minus_received
    filters:
    - filter: outlier
    window_size: 4
    radius: 2.0

I am guessing I would use “outlier” similar to above, but are the other parameters trial and error?

your help is appreciated!

1 Like