core: Smart Meter Texas Integration Failed to Connect
The problem
I am attempting to setup the Smart Meter Texas integration, but upon trying to login I get “Failed To Connect”
Environment
- Home Assistant Core release with the issue: 0.115.2
- Last working Home Assistant Core release (if known):
- Operating environment (OS/Container/Supervised/Core): Supervised
- Integration causing this issue: Smart Meter Texas
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/smart_meter_texas/
Problem-relevant configuration.yaml
Traceback/Error logs
Additional information
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 45 (22 by maintainers)
Commits related to this issue
- Update version for smart-meter-texas to 0.4.4 Potential fix for https://github.com/home-assistant/core/issues/40348 — committed to meyerrj/core by meyerrj 3 years ago
Unfortunately the library needs some work in order to get it working again. If anyone is able to fix it I will approve the PR.
https://github.com/grahamwetzler/smart-meter-texas
To enhance Smart Meter Texas to show in the Energy tab grid consumption dropdown, I have an open PR #55665 – it’s in-progress on being reviewed and tested for a future HA release.
I tried to add it for the first time thought the integrations UI and I’m still getting “Failed to connect.” Is there something I should be doing manually?
Edit: I should add that I changed my logs setting look like below and I am not seeing anything when I get the error.
logger: default: info logs: custom_components.hacs: debug hacs: debug queueman: debug AIOGitHubAPI: debug
I have submitted a PR for the library. 🤞
Just tried now and it’s not working in core-2021.8.0. Could this be related to the addition of a Security question which has to be answered when logging in from a new browser/user agent?
I had some (possibly) related issues with the user agent on a different project I worked on with the SmartMeterTexas API. The only way I could get it working consistently in the end was to use a browser user agent. Please take a look at cmulk/python_smartmetertx and see if that helps you any.
I ended up getting it to work in the energy dashboard, the utility_meter integration was not needed as that resets monthly and the energy integration wants a total value for statistics, all I had to do was add a customize to the smart Texas integration.
That got it to work in the dashboard but I am also seeing the large spike at midnight and was trying to figure out why. What you said makes sense it must be catching up after being limited.
I was able to add our account with no issue but the entity is not showing up in any of the energy dropdown selectors
@elmigbot I just tested it locally and removed the
www.
from theBASE_URL
constant… and sure enough, it worked. 😮I was looking at my developer traces in the browser, and those calls had the www in the API calls without any issues… Weird, but it works!
I tried a node-red implementation that is working. I noticed the base URL doesn’t include the www subdomain, while this one does. I tried adding the www to node-red and it breaks (no response). Could that be the issue?