You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to give this a shot. I've provided credentials with TOTP. Based on the output screenshots it looks like we're able to login however when making the API request to opower it doesn't appear to pass the credentials through. The final screenshot I get is meter3-2.png resulting with "Error: details: Customer is not logged in." I'll see if I can figure out how pyppeteer is supposed to handle this and see if I can get it working.
# Access the API using your newly acquired authentication cookies!api_page=awaitbrowser.newPage()
api_url='https://'+self.data_site+'.opower.com/ei/edge/apis/cws-real-time-ami-v1/cws/'+self.data_site+'/accounts/'+self.account_uuid+'/meters/'+self.meter_number+'/usage'awaitapi_page.goto(api_url)
awaitapi_page.screenshot({'path': 'meter3-2.png'})
EDIT:
Dumping the cookies on the opower.com page in the python request it looks like it does not contain the JSESSIONID cookie (seen in network inspection in chrome). I'm not sure where this session cookie is set, possibly in javascript somewhere?
Editing the request and randomizing the JSESSIONID results in the same not logged in error I am seeing in the screenshot so it is highly likely this is the problematic portion.
EDIT EDIT:
After logging it I think we need to make a request to the dashboard to get a valid session with opower. By adding the following lines I'm able to get usage data, however the script still fails with a Navigation Timeout Exceeded on page.py.
Hello,
Trying to give this a shot. I've provided credentials with TOTP. Based on the output screenshots it looks like we're able to login however when making the API request to opower it doesn't appear to pass the credentials through. The final screenshot I get is meter3-2.png resulting with "Error: details: Customer is not logged in." I'll see if I can figure out how pyppeteer is supposed to handle this and see if I can get it working.
EDIT:
Dumping the cookies on the opower.com page in the python request it looks like it does not contain the JSESSIONID cookie (seen in network inspection in chrome). I'm not sure where this session cookie is set, possibly in javascript somewhere?
Editing the request and randomizing the JSESSIONID results in the same not logged in error I am seeing in the screenshot so it is highly likely this is the problematic portion.
EDIT EDIT:
After logging it I think we need to make a request to the dashboard to get a valid session with opower. By adding the following lines I'm able to get usage data, however the script still fails with a Navigation Timeout Exceeded on page.py.
The text was updated successfully, but these errors were encountered: