HentschelT / openhab2-addons

The next-generation open Home Automation Bus (openHAB)
Eclipse Public License 1.0
9 stars 3 forks source link

[EnphaseEnvoy] Log floods about digest authentication #16

Closed lsiepel closed 3 years ago

lsiepel commented 5 years ago

Since i installed this binding, the log is flooded with messages. What is happening? and what can i do about it? All channels seem to be updated correctly.

2018-10-15 23:30:18.479 [WARN ] [okhttp3.OkHttpClient                ] - previous digest authentication with same nonce failed, returning null
2018-10-15 23:32:18.925 [WARN ] [okhttp3.OkHttpClient                ] - previous digest authentication with same nonce failed, returning null
2018-10-15 23:34:21.741 [WARN ] [okhttp3.OkHttpClient                ] - previous digest authentication with same nonce failed, returning null
2018-10-15 23:36:22.195 [WARN ] [okhttp3.OkHttpClient                ] - previous digest authentication with same nonce failed, returning null
2018-10-15 23:38:22.609 [WARN ] [okhttp3.OkHttpClient                ] - previous digest authentication with same nonce failed, returning null
lsiepel commented 5 years ago

Any chance to look into this?

HentschelT commented 5 years ago

Sorry for the tardy reply. This is the Envoy binding, correct? It doesn't do this for me, and nothing obvious sticks out, so it'll need a bit more investigative work to figure what causes this. I won't get around to it in the next couple weeks, but should have some time towards the end of the month, and I'll take a look.

As a temporary measure, you could try setting the log setting for the binding to the 'Error' level (via Karaff), it should suppress this.

-Th

lsiepel commented 5 years ago

Anything i can do to get this bug fixxed? You need som additional logging ? or if you have some verbose version that i can use, im happy to try it. Besides this bug, im happy to test any other change you might want to test before you commit it to the openhab2-addons repo?

jswim788 commented 5 years ago

I have the same issue with the same error. I'd be happy to help with logs or test versions if needed.

brusan commented 5 years ago

I think this error is due to the binding not being able to log on to the API simply due to the fact that usernames and passwords are not the same for different versions of the firmware on different versions of the Envoy hardware. Firmware versions are kept up to date by Enphase for a given version of the hardware by pushing new versions without user intervention. So if you are using the famous app to generate a password for the user "installer" you will get useful data from the API call on the R-model in a browser but the binding is not using that combo to access the API. I am also eagerly waiting for a fix to his problem ;)

jswim788 commented 5 years ago

If that's true, what are we getting by trying to log on to the API? My binding appears to be fully functional - I don't believe anything is missing. So is there any need to try to log on? Are am I missing something but I don't know about it?

brusan commented 5 years ago

I think you might be one of the lucky ones having a version with the same credentials as is hardcoded in the binding. The part of the API that is crucial to the full functionality is the listing of the devices (the individual solar panels) - if you have them listed in the items, you are good to go. If, on the other hand the only data you are seeing are the total numbers (current power, today's production, this weeks production and total production since start up), i.e. not the individual solar panels, then you are out of luck. The total data is available without any credentials (try http://your-envoys-ip/api/v1/production) whereas the individual data requires this (sometimes) unknown credentials. So if you try http://your-envoys-ip/api/v1/production/inverters and the credentials used in the binding does not give you the list - you're smoked.

jswim788 commented 5 years ago

I do see individual panels. But I don't really need them - they are nice to have. I'd trade them away to get rid of the constant warning messages.

brusan commented 5 years ago

So, to summarize the findings om this side of things: If the author creates a possibility to assign a username to the setup (not only a password) we will be good. As far as I have found, the username can be "admin", "envoy" or "installer" depending on model and revision of the controller. Another nice thing would be to get the option to not scan the inverters for data if settling for the summed up data from the controller is enough for ones purpose.

brusan commented 5 years ago

I now realize that gtdiehl pushed this addition on Jan 9. Hopefully the author can do the PR soon.

lsiepel commented 3 years ago

Issue has been fixed with a new binding https://github.com/Hilbrand/openhab-addons/tree/enphase/bundles/org.openhab.binding.enphase Discussion here: https://community.openhab.org/t/new-binding-enphase-envoy-solar-system-gateway/44449