Sorry for the late reply. I am now on version 0.118.3, and I am still getting the same error in the logs. I triple and quadruple checked the install code and cloud ID.
However, I did try running the python code through the command line. That returned proper values. I’m at a loss for what the issue might be.
That’s the same version I’m running. I can only think of some network configuration or wrong IP address of the Eagle. A wrong IP address would result in a different error message. I can’t think of anything else.
I think to debug it I’ll have to add logging to the sensor. Something I’ve been meaning to do.
EDIT: Even trying to debug this, I can’t just add logging to the Home Assistant sensor. The error is coming from the uEagle API library, which really should only give this cryptic error when the authentication fails (wrong cloud_id/install_code). Hmm…let me think about this some more
EDIT: Can you run tcpflow on the host that is running Home Assistant? Looking at the uEagle API code it appears the function is expecting the Eagle to return data in a JSON format. Either the format is messed up or it is returning HTML rather than JSON. From the host that is running Home Assistant stop Home Assistant and start this command:
sudo tcpflow -p -c -i en0 host x.x.x.x
Replace the above en0 with your ethernet device probably eth0 and replace x.x.x.x with the IP address of your Eagle, in your config above it was 192.168.1.99
The command will wait for some communication between the host and the Eagle, so now start Home Assistant and you should see some output.
EDIT: Another command you can try is wget from the host running Home Assistant
Replacing 00abcd with your cloud_id and x.x.x.x with your Eagle IP address. The above command will prompt you for a password which is the install_code. Either it will download a file called post_manager or return an error. The post_manager file will contain the results from the command.
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.
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…
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?
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?
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.
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.
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:
The legacy device is technically unsupported (although they do still try to help)
I’m on the latest firmware
This problem is not known to them (although there is a known problem involving read-only files that cause [reversible] “loss” of all data)
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:
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.
@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.