ha-myenergi icon indicating copy to clipboard operation
ha-myenergi copied to clipboard

Myenergi server request problem - Integration down

Open Zaphod360 opened this issue 2 years ago • 41 comments

Version of the custom_component - ****

0.0.20 (latest)

Home Assistant Supervisor Version - 2022.08.3 Home Assistant Core Version - 2022.08.4

Configuration


# Loads default set of integrations. Do not remove.
default_config:

frontend:
  themes: !include_dir_merge_named themes

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include custom_sensors.yaml

lovelace:
  resources:
    - url: /local/power-wheel-card.js?v=2
      type: module

Describe the bug

The inegration is not starting, can't get any output from any sensors. I'm running in Home assistant supervisor in a debian docker. All was working previously.

Debug log

This error originated from a custom integration.

Logger: pymyenergi.connection
Source: custom_components/myenergi/__init__.py:90
Integration: myenergi (documentation, issues)
First occurred: 22:38:21 (11 occurrences)
Last logged: 22:46:31

Myenergi server request problem
Logger: homeassistant.config_entries
Source: config_entries.py:1067
First occurred: 22:42:15 (1 occurrences)
Last logged: 22:42:15

Config entry 'My Home' for myenergi integration not ready yet; Retrying in background
2022-08-12 22:36:21.211 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration kia_uvo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-08-12 22:36:21.213 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration eufy_security which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-08-12 22:36:21.214 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration luxpower which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-08-12 22:36:21.215 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration govee which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-08-12 22:36:21.216 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration myenergi which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-08-12 22:36:21.217 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration alexa_media which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-08-12 22:36:21.218 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration dwains_dashboard which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-08-12 22:36:21.219 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-08-12 22:36:21.222 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration garbage_collection which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-08-12 22:36:21.222 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration philips_ambilight_hue which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-08-12 22:36:21.717 WARNING (MainThread) [homeassistant.components.lovelace] Lovelace is running in storage mode. Define resources via user interface
2022-08-12 22:37:12.252 WARNING (MainThread) [custom_components.govee] API is back online.
2022-08-12 22:37:22.572 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: alexa_media, hive, forecast_solar
2022-08-12 22:38:21.221 ERROR (MainThread) [pymyenergi.connection] Myenergi server request problem
2022-08-12 22:38:21.225 WARNING (MainThread) [homeassistant.config_entries] Config entry 'My Home' for myenergi integration not ready yet; Retrying in background
2022-08-12 22:38:43.360 ERROR (MainThread) [pymyenergi.connection] Myenergi server request problem
2022-08-12 22:39:13.901 ERROR (MainThread) [pymyenergi.connection] Myenergi server request problem
2022-08-12 22:39:54.266 ERROR (MainThread) [pymyenergi.connection] Myenergi server request problem
2022-08-12 22:40:54.330 ERROR (MainThread) [pymyenergi.connection] Myenergi server request problem
2022-08-12 22:42:15.801 ERROR (MainThread) [pymyenergi.connection] Myenergi server request problem
2022-08-12 22:42:15.810 WARNING (MainThread) [homeassistant.config_entries] Config entry 'My Home' for myenergi integration not ready yet; Retrying in background
2022-08-12 22:42:40.872 ERROR (MainThread) [pymyenergi.connection] Myenergi server request problem

Zaphod360 avatar Aug 12 '22 22:08 Zaphod360

I believe from other forums the link to myenergi (director.myenergi.net) is down and s18.myenergi.net has to be used but I can't find the config to do this

newbuilder22 avatar Aug 12 '22 22:08 newbuilder22

I have the same issue

axlback avatar Aug 13 '22 06:08 axlback

Same issue after update to Core update 2022.08.4

olesj33 avatar Aug 13 '22 06:08 olesj33

Down for me also, on Core 2022.08.4.

And I cannot find any config file to either update the server (as above) or to change the API if that was ever required.

Deleting the integration and re-adding gives users an "unknown error" at the Add Integration stage.

HypeLaser avatar Aug 13 '22 08:08 HypeLaser

Same here :-(

Cybersloth avatar Aug 13 '22 08:08 Cybersloth

Same issue for me too.

allanmcnair avatar Aug 13 '22 08:08 allanmcnair

Same issue

MikeShipp avatar Aug 13 '22 08:08 MikeShipp

Me too.

think I also had a power trip switch as when I put it back on the myenergi app not connecting. Sounds like a server issue.

newbuilder22 avatar Aug 13 '22 08:08 newbuilder22

Same problem :) image

piet1951 avatar Aug 13 '22 09:08 piet1951

Me too.

think I also had a power trip switch as when I put it back on the myenergi app not connecting. Sounds like a server issue.

Just to note, my app is functioning correctly.

Zaphod360 avatar Aug 13 '22 09:08 Zaphod360

What makes you think it’s an integration error especially with a log reporting as above?

G6EJD avatar Aug 13 '22 10:08 G6EJD

This is happening over a few forums.

  1. so apps are working fine
  2. The authentication if reinstalled in HA does not happen between the serial no and the api
  3. I received a 500 error

newbuilder22 avatar Aug 13 '22 10:08 newbuilder22

I think its an integration error because the log specifies "this error originated from a custom integration", and "server request problem". It may be semantics, but that's what it says.

Screenshot 2022-08-13 at 11 03 36

The add-on cannot be re-installed due to some sort of communication error between the integration and the MyEnergi servers.

HypeLaser avatar Aug 13 '22 10:08 HypeLaser

In PyMyEnergi python script, which is a requirement for this to work, there is a reference to:

https://director.myenergi.net

Some folks have suggested changing the server to s18.myenergi.net in the connection.py file for pymyenergi python script.

Does pymyenergi require a change to this file?

HypeLaser avatar Aug 13 '22 10:08 HypeLaser

Are you using the API key

G6EJD avatar Aug 13 '22 10:08 G6EJD

I was using an API key, the integration was working fine up until the core update yesterday.

I have since removed the integration, because I thought a new API key may be required. And the only way to update the API currently is to re-install.

However, the integration now cannot be re-installed as it cannot communicate with the MyEnergi servers.

On 13 Aug 2022, at 11:14, G6EJD @.***> wrote:

Are you using the API key

— Reply to this email directly, view it on GitHub https://github.com/CJNE/ha-myenergi/issues/208#issuecomment-1214132401, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2OM3NG357WFUISGYPEB7TDVY5YPBANCNFSM56M7KDTQ. You are receiving this because you commented.

HypeLaser avatar Aug 13 '22 10:08 HypeLaser

I’m on the updated core 2022.8.4 (applied yesterday) and mine continues to function as does the ME App and Webportal. It seems more likely that some customers are on different servers hence the director prefix in the ME address, so not every instance is the same.

G6EJD avatar Aug 13 '22 10:08 G6EJD

This would be temporary as I think by doing this on the actual program in HA we would overload one server

On 13 Aug 2022, at 11:10, alexmercerscott @.***> wrote:

 In PyMyEnergi, which is a requirement for this to work, there is a reference to:

https://director.myenergi.net

Some folks have suggested changing the server to

s18.myenergi.net

Does pymyenergi require a change to this file?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

newbuilder22 avatar Aug 13 '22 10:08 newbuilder22

In PyMyEnergi, which is a requirement for this to work, there is a reference to:

https://director.myenergi.net

Some folks have suggested changing the server to

s18.myenergi.net

Does pymyenergi require a change to this file?

Where is this file, I can't find it anywhere?

Zaphod360 avatar Aug 13 '22 10:08 Zaphod360

In the readme for “ha-myenergi" it states “Talking to the MyEnergi API using the PYMYENERGI python library”.

This is added when the integration is installed during the HACS installation (I assume?!).

The server which may need changed is in the file called “connection.py” at the GitHub for pymyenergi, which is located here: https://github.com/CJNE/pymyenergi/tree/main/pymyenergi

Note: I'm talking about pymyenergi and NOT ha-myenergi. The former is required for the latter to work, according to the readme.

On 13 Aug 2022, at 11:46, Zaphod360 @.***> wrote:

In PyMyEnergi, which is a requirement for this to work, there is a reference to:

https://director.myenergi.net https://director.myenergi.net/ Some folks have suggested changing the server to

s18.myenergi.net

Does pymyenergi require a change to this file?

Where is this file, I can't find it anywhere?

— Reply to this email directly, view it on GitHub https://github.com/CJNE/ha-myenergi/issues/208#issuecomment-1214136516, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2OM3NB6BKOQ5DUWIBUWVRDVY54HDANCNFSM56M7KDTQ. You are receiving this because you commented.

HypeLaser avatar Aug 13 '22 10:08 HypeLaser

In the readme for “ha-myenergi" it states “Talking to the MyEnergi API using the PYMYENERGI python library”. This is added when the integration is installed during the HACS installation (I assume?!). The server which may need changed is in the file called “connection.py” at the GitHub for pymyenergi, which is located here: https://github.com/CJNE/pymyenergi/tree/main/pymyenergi Note: I'm talking about pymyenergi and NOT ha-myenergi. The former is required for the latter to work, according to the readme. On 13 Aug 2022, at 11:46, Zaphod360 @.***> wrote: In PyMyEnergi, which is a requirement for this to work, there is a reference to: https://director.myenergi.net https://director.myenergi.net/ Some folks have suggested changing the server to s18.myenergi.net Does pymyenergi require a change to this file? Where is this file, I can't find it anywhere? — Reply to this email directly, view it on GitHub <#208 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2OM3NB6BKOQ5DUWIBUWVRDVY54HDANCNFSM56M7KDTQ. You are receiving this because you commented.

Thanks, I thought it was something I could have a play with, doesn't look like it though.

Zaphod360 avatar Aug 13 '22 11:08 Zaphod360

At the end of the day this is not a guaranteed MyEnergi service, it’s more of a grace and favour, so if they have changed anything, it will take some time for changes to be implemented.

G6EJD avatar Aug 13 '22 12:08 G6EJD

I'm no expert, but here what i've tested and my conclusions.

If I poll s18.myenergi.net/cgi-status-* using json and supply the hub SN and Key I get a full response as we would expect. I don't think anything has changed at the Myenergi end. I have always used s18.myenergi.net BTW director.myenergi.net does not (and never has) allowed me to access it, although it dow through a login dialogue.

If I remove the automation (which does not work since the HA update) and try to re-configure it, I get 'Unknown Error occured" when i submit the credential dialogue, this message does not look like a response from the server, nor does it look like someones (a coders) interpretation of a server message. Therfor I don't think the requests are being sent to s18 myenergi.net anymore

As above, i'm no expert

Cybersloth avatar Aug 13 '22 13:08 Cybersloth

Using REST i've been able to retieve data from s18.myenergi.net but the errors in the intergration seem to suggest that it's trying to access https://s111.myenergi.net and that's failing.

the core 2022.8.4 update yesterday included a change to "anyio" or "aiohttp", I think. Could that bw related?

Error log message: 2022-08-13 15:35:53.594 INFO (MainThread) [pymyenergi.connection] Updated myenergi active server to https://s111.myenergi.net 2022-08-13 15:35:53.667 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 186, in connect_tcp addr_obj = ip_address(remote_host) File "/usr/local/lib/python3.10/ipaddress.py", line 54, in ip_address raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address') ValueError: 's111.myenergi.net' does not appear to be an IPv4 or IPv6 address

godfreym29 avatar Aug 13 '22 15:08 godfreym29

The integration is using director.myenergi.net which is being redirected to s111.myenergi.net and indeed that address has no server monitoring any connection requests. Not sure what is going on with ME systems today. Maybe they don’t want to support users who make incessant API requests every second, who knows.

G6EJD avatar Aug 13 '22 15:08 G6EJD

My HA now accessing myenergi data again (under 2022.08.3)

pickeringar avatar Aug 13 '22 15:08 pickeringar

Same here, just invoked the backup restore and working again. Now checking the 8.4 release notes I'm using s18.

G6EJD avatar Aug 13 '22 15:08 G6EJD

Restoring has not worked for me unfortuneatly

Cybersloth avatar Aug 13 '22 16:08 Cybersloth

Same here, just invoked the backup restore and working again. Now checking the 8.4 release notes I'm using s18.

Is the server configuarable somewhere ?

Cybersloth avatar Aug 13 '22 16:08 Cybersloth

Not sure how the HA link to myenergi works, but I know the app uses different servers based on the last digit of the hub. My hub ends in 4.

pickeringar avatar Aug 13 '22 16:08 pickeringar