-
Notifications
You must be signed in to change notification settings - Fork 1
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
SP9 power monitoring API? #2
Comments
Only :
|
How did you figure the list out? Is that definitely the complete list for SP9? Previous versions of the socket don't have the power monitoring functionality afaik. |
In Android app code with : I have an SP9 and I'm also looking |
I see. Thank you for your response. Please let me know if you find it out :) I'm trying to make the plug working with Home Assistant. I've made it turn on and off already, it's a pity I can't access the power monitoring data. |
There are two operating modes:
Can you post the full exchange with my dump :
|
Did you ever figure out how to get the energy usage on API? |
Nope. Even tried contacting the support, they weren't of much help either. |
I am also looking for a solution to get data from the plug. I tried to decompile the official application and look for a way to get this kind of data. If there is a possibility to get data using GET or POST request, then it is not used in the official application. Instead, the power data are collected by the provisioning server where the plug sends data in regular periods. How to setup the plug to own provisioning server is very nicely described in the article metioned by tvaira. The plug connects to the ntp server and synchronizes the time. In an hour interval - every hour on the hour - plug sends the overall consumption data to the provisioning server. Actual power consumption and partial consumption (last hour) is provided on request. Actual power consumption is provided on every single request, partial consuption data are availible each circa 5 minutes and more frequent request are rejected. response for Actual powerconsuption I haven't completely decoded these energy data frames yet because they are slightly different from time to time but i believe:
I extended the code from lui_gough by adding reading and requesting of energy data ability (POC only), to capture data for afterward "decoding". Download from here I am familiarizing myself with the development of integration for Home Assistant which is my main aim. |
Hello,
how did you figure out the "getSta" and "setSta" parameters? I have SP9 which also has power monitoring functionality and I'm trying to figure out what rest endpoint is used to get that data.
I tried doing a tcpdump in my router, but I couldn't get to make the app communicate with the plug directly and the cloud server seems to be using a slightly different protocol. I've found this response:
but I wasn't able to find out how to ask for the data locally.
The text was updated successfully, but these errors were encountered: