Closed rtp4jc closed 3 years ago
It's a known issue. The user agent in previous versions was hard coded but it seems that the API does not like the number of connections from the Home Assistant integration. 0.4.3 was an attempt to add variation to the user agent, however it did not solve the problem.
Any news on this issue? I was looking to implement the Home Assistant integration, but it seems this long standing issue is still preventing it from being used.
Sorry no, I haven't been able to work around the API blocking.
I'm not sure if this will help or not, but I did find this document: https://www.smartmetertexas.com/Smart_Meter_Texas_Interface_Guide.pdf
Also, in their Help Center, there is this regarding the APIs:
Their requirement for a Static IP Address and the Signed Digital Certificate issued by a CA and associated with SMT sounds like a bit of a deal breaker for most users...
Right, that's why I built this library to connect to the API that the website uses.
@grahamwetzler, thank you for building this lib!
Hopes and plans aren't action, but I plan to take a shot at fixing this in the next couple weeks.
I'm very excited about the new energy monitoring features in Home Assistant.
Thanks @adamfeldman. Let me know if I can help.
I've submitted a PR that appears to fix the issue.
Apparently the www subdomain is the cause of the timeout. Thanks to @elmigbot on the related Home Assistant issue for identifying the likely cause. https://github.com/home-assistant/core/issues/40348
Thanks to @meyerrj this is now resolved.
Description
I'm just using the example code to get my meter readings and I was able to get the readings easily before. However, when I upgraded to version 0.4.3 I got
asyncio.exceptions.TimeoutError
exceptions after this debug log:What I Did
I just ran
python get_meter_reading.py
and waited until the timeout occurred. This didn't happen in version 0.4.1 or 0.4.2. Here's the full stack trace:A minor note that I also replicated this in an environment on the Ubuntu shell of Windows Subsystem for Linux with the exact same result.