Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on spinning circle #56

Open
olliegg123 opened this issue Jan 13, 2023 · 6 comments
Open

Stuck on spinning circle #56

olliegg123 opened this issue Jan 13, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@olliegg123
Copy link

olliegg123 commented Jan 13, 2023

I believe I'm having a similar issue to #46 - the same symptoms anyway. I've attached a screenshot, I'm getting a 500 error it seems.

Screenshot 2023-01-12 at 4 21 34 PM

@JPHutchins
Copy link
Owner

JPHutchins commented Jan 15, 2023

Hi @olliegg123 ! Thanks for registering! It's a long shot, but I'd like you to try the registration again at your convenience. The PGE SMD servers are occasionally down for maintenance and I've failed to account for this.

If you get the same symptom again please post back here with the date, hour, and minute that you made the attempt so that I can check the logs.

Thanks again!

@JPHutchins JPHutchins added the bug Something isn't working label Jan 15, 2023
@olliegg123
Copy link
Author

I tried again just now, 2023-01-15 at 1:24pm PST. It's still hitting a 500 error, but now it says on the PGE oauth.

Screenshot attached.
Screenshot 2023-01-15 at 1 24 19 PM

@FuckInsteon
Copy link

FuckInsteon commented Jan 15, 2023 via email

@olliegg123
Copy link
Author

Just tried another browser (Safari with no extensions) and my mobile chrome with no extensions, on LTE and nothing is working still. Throwing the same errors.

@JPHutchins
Copy link
Owner

OK, I see the attempt at 13:23:19 and another at 14:11:03.

Jan 15 14:11:16 oev01 uwsgi[923]: /home/jp/open-energy-view/1673820676.7633615.xml
Jan 15 14:11:16 oev01 uwsgi[923]: Could not find interval block url

This is what is printed if we don't find the URL we expect in the PGE SMD XML response. See https://github.dev/JPHutchins/open-energy-view/blob/ba09e020e0057d659ff432fef01811f73a6f0a08/open_energy_view/utility_apis.py#L437-L470

This was sighted before so now we save that "bad XML". Here it is though I've redacted your account info.

<ns1:feed xmlns:ns1="http://www.w3.org/2005/Atom">
    <ns1:id>8c4335bc-fff3-4377-b0d9-f8aab53936a6</ns1:id>
    <ns1:title type="text">Green Button Usage Feed</ns1:title>
    <ns1:updated>2023-01-15T22:11:16.737Z</ns1:updated>
    <ns1:link href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/Subscription/REDACTED/UsagePoint/REDACTED/MeterReading" rel="self"/>
</ns1:feed>

Here is the expected response from when I re-registered myself earlier today:

<ns1:feed xmlns:ns1="http://www.w3.org/2005/Atom">
    <ns1:id>51f6fc43-5039-434d-8e95-4490f6736393</ns1:id>
    <ns1:title type="text">Green Button Usage Feed</ns1:title>
    <ns1:updated>2023-01-15T20:56:07.106Z</ns1:updated>
    <ns1:link href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/Subscription/REDACTED/UsagePoint/REDACTED/MeterReading" rel="self"/>
    <ns1:entry>
        <ns1:id xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:idType">ef28ca1e-3649-4b8d-af0e-d1f0c3abb5a5</ns1:id>
        <ns1:link xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:linkType" href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/Subscription/REDACTED/UsagePoint/REDACTED/MeterReading" rel="up"/>
        <ns1:link xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:linkType" href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/Subscription/REDACTED/UsagePoint/REDACTED/MeterReading/REDACTED" rel="self"/>
        <ns1:link xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:linkType" href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/Subscription/REDACTED/UsagePoint/REDACTED/MeterReading/REDACTED/IntervalBlock" rel="related"/>
        <ns1:link xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:linkType" href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/ReadingType/NzI6bnVsbDo5MDA6MQ==" rel="related"/>
        <ns1:link xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:linkType" href="https://api.pge.com/GreenButtonConnect/espi/1_1/resource/LocalTimeParameters/1" rel="related"/>
        <ns1:title type="text"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:textType">Green Button Data File</ns1:title>
        <ns1:published xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:dateTimeType">2023-01-15T20:56:07.101Z</ns1:published>
        <ns1:updated xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:dateTimeType">2023-01-15T20:56:07.101Z</ns1:updated>
        <ns1:content xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:contentType">
            <ns0:MeterReading xmlns:ns0="http://naesb.org/espi"/>
        </ns1:content>
    </ns1:entry>
</ns1:feed>

I have a hunch. Perhaps the PGE system hasn't generated the internal links by the time OEV makes the request for them. At any rate, unless someone else sees something obvious I'm going to reach out to the PGE SMD team, they rock! I think they've improved the APIs a lot since I implemented them so perhaps we'll get something more reliable out of this!

@FuckInsteon
Copy link

FuckInsteon commented Jan 16, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants