JPHutchins / open-energy-view

View resource consumption trends, history, analysis, and insights.
https://www.openenergyview.com
Other
70 stars 11 forks source link

Stuck on spinning circle #56

Open olliegg123 opened 1 year ago

olliegg123 commented 1 year ago

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 commented 1 year ago

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!

olliegg123 commented 1 year ago

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 commented 1 year ago

It could be a browser extension or ad blocker not allowing the page to load. Try another browser or disable extensions.

On Sun, Jan 15, 2023, 1:25 PM olliegg123 @.***> wrote:

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. [image: Screenshot 2023-01-15 at 1 24 19 PM] https://user-images.githubusercontent.com/12632906/212568071-15e34658-4819-423b-847b-4e3275f7c56f.png

— Reply to this email directly, view it on GitHub https://github.com/JPHutchins/open-energy-view/issues/56#issuecomment-1383256715, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZDH2MT6D6NGWLRJV3WC6ILWSRTLVANCNFSM6AAAAAATZ2VNJA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

olliegg123 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Awesome work man! We really appreciate all you're doing for us on this. Thank you.

On Sun, Jan 15, 2023, 4:26 PM J.P. Hutchins @.***> wrote:

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.

8c4335bc-fff3-4377-b0d9-f8aab53936a6 Green Button Usage Feed 2023-01-15T22:11:16.737Z Here is the expected response from when I re-registered myself earlier today: 51f6fc43-5039-434d-8e95-4490f6736393 Green Button Usage Feed 2023-01-15T20:56:07.106Z ef28ca1e-3649-4b8d-af0e-d1f0c3abb5a5 Green Button Data File 2023-01-15T20:56:07.101Z 2023-01-15T20:56:07.101Z 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! — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you commented.Message ID: ***@***.***>