frankie
Members
-
Joined
-
Last visited
Reputation Activity
-
frankie reacted to RoganDawes in SunSynk WiFi Dongle Hacking.The quoted information is not "plug and play", or ready to go, they are examples of how a programmer can make requests of the inteless.com website to retrieve the information pertaining to their inverter. What you do with the information retrieved is still entirely up to you.
You may have more luck with the kellerza/sunsynk addon, which has an integration with Home Asssistant to export the values read from the inverter via MQTT to the HA instance. You can either connect an RS485 dongle to the appropriate socket inside the inverter (check other threads for the details, or https://github.com/kellerza/sunsynk), or you can connect an RS232 dongle to the external monitoring port that the Sunsynk WiFI dongle is connected to currently, as detailed a bit further up by myself. That assumes that you don't care about the Inteless portal receiving data for your inverter (and your installer as well).
-
frankie got a reaction from 949BFN in SunSynk WiFi Dongle Hacking.To confirm do you want to pull the firmware from the nodemcu, or just utilise their API?
It might be easier to just write some HA integration which directly talks to the SunSynk cloud APIs to pull the data.
For the SynSynk API see below.
Login and obtain bearer token
https://pv.inteless.com/oauth/token
POST /oauth/token HTTP/2 Host: pv.inteless.com Content-Length: 103 Accept: application/json Content-Type: application/json;charset=UTF-8 Sec-Ch-Ua-Mobile: ?0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Origin: https://sunsynk.net Referer: https://sunsynk.net/ Accept-Encoding: gzip, deflate Accept-Language: en-GB,en-US;q=0.9,en;q=0.8 {"username":"XXXXXX","password":"XXXXXX","grant_type":"password","client_id":"csp-web"} Some endpoints
api/v1/plants
api/v1/plant/energy/XXXX/flow
api/v1/inverters
api/v1/inverter/XXXX/realtime/output
api/v1/inverter/XXXX/realtime/input
api/v1/inverter/battery/XXXXX/realtime
Then you can utilise the bearer token to extract data from the APIs.
Use the below to obtain your PlantID. Change the XXXXX with your bearer token.
GET /api/v1/plants?page=1&limit=10&name=&status= HTTP/2 Host: pv.inteless.com Accept: application/json Authorization: Bearer XXXXXXX User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Origin: https://sunsynk.net Referer: https://sunsynk.net/ Accept-Encoding: gzip, deflate Accept-Language: en-GB,en-US;q=0.9,en;q=0.8 The below will give you general FLOW data for a given date e.g. battPower, load etc.
Change the XXXXX with your bearer token and your plantID.
GET /api/v1/plant/energy/XXXXX/flow?date=2022-07-16 HTTP/2 Host: pv.inteless.com Accept: application/json Authorization: Bearer XXXXXX Sec-Ch-Ua-Mobile: ?0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Origin: https://sunsynk.net Referer: https://sunsynk.net/ Accept-Encoding: gzip, deflate Accept-Language: en-GB,en-US;q=0.9,en;q=0.8 If you want to directly query raw output from your inverter, then you have to obtain the InverterID first.
Change XXXX with your bearer token.
GET /api/v1/inverters?page=1&limit=10&total=0&status=-1&sn=&plantId=&type=-2&softVer=&hmiVer=&agentCompanyId=-1&gsn= HTTP/2 Host: pv.inteless.com Accept: application/json Authorization: Bearer XXXXXX User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Origin: https://sunsynk.net Referer: https://sunsynk.net/ Accept-Encoding: gzip, deflate Accept-Language: en-GB,en-US;q=0.9,en;q=0.8 Then you can plugin it at several spots in the API.
Change XXXXX with your inverter ID and your bearer token.
GET /api/v1/inverter/XXXXXX/realtime/output HTTP/2 Host: pv.inteless.com Accept: application/json Authorization: Bearer XXXX User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Origin: https://sunsynk.net Referer: https://sunsynk.net/ Accept-Encoding: gzip, deflate Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Welcome to msg me if you want to know more. If you do ever do some integration in HACS please share. I've not gone so far as to actually write something, but should be easy.
-
frankie got a reaction from Sc00bs in SunSynk WiFi Dongle Hacking.To confirm do you want to pull the firmware from the nodemcu, or just utilise their API?
It might be easier to just write some HA integration which directly talks to the SunSynk cloud APIs to pull the data.
For the SynSynk API see below.
Login and obtain bearer token
https://pv.inteless.com/oauth/token
POST /oauth/token HTTP/2 Host: pv.inteless.com Content-Length: 103 Accept: application/json Content-Type: application/json;charset=UTF-8 Sec-Ch-Ua-Mobile: ?0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Origin: https://sunsynk.net Referer: https://sunsynk.net/ Accept-Encoding: gzip, deflate Accept-Language: en-GB,en-US;q=0.9,en;q=0.8 {"username":"XXXXXX","password":"XXXXXX","grant_type":"password","client_id":"csp-web"} Some endpoints
api/v1/plants
api/v1/plant/energy/XXXX/flow
api/v1/inverters
api/v1/inverter/XXXX/realtime/output
api/v1/inverter/XXXX/realtime/input
api/v1/inverter/battery/XXXXX/realtime
Then you can utilise the bearer token to extract data from the APIs.
Use the below to obtain your PlantID. Change the XXXXX with your bearer token.
GET /api/v1/plants?page=1&limit=10&name=&status= HTTP/2 Host: pv.inteless.com Accept: application/json Authorization: Bearer XXXXXXX User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Origin: https://sunsynk.net Referer: https://sunsynk.net/ Accept-Encoding: gzip, deflate Accept-Language: en-GB,en-US;q=0.9,en;q=0.8 The below will give you general FLOW data for a given date e.g. battPower, load etc.
Change the XXXXX with your bearer token and your plantID.
GET /api/v1/plant/energy/XXXXX/flow?date=2022-07-16 HTTP/2 Host: pv.inteless.com Accept: application/json Authorization: Bearer XXXXXX Sec-Ch-Ua-Mobile: ?0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Origin: https://sunsynk.net Referer: https://sunsynk.net/ Accept-Encoding: gzip, deflate Accept-Language: en-GB,en-US;q=0.9,en;q=0.8 If you want to directly query raw output from your inverter, then you have to obtain the InverterID first.
Change XXXX with your bearer token.
GET /api/v1/inverters?page=1&limit=10&total=0&status=-1&sn=&plantId=&type=-2&softVer=&hmiVer=&agentCompanyId=-1&gsn= HTTP/2 Host: pv.inteless.com Accept: application/json Authorization: Bearer XXXXXX User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Origin: https://sunsynk.net Referer: https://sunsynk.net/ Accept-Encoding: gzip, deflate Accept-Language: en-GB,en-US;q=0.9,en;q=0.8 Then you can plugin it at several spots in the API.
Change XXXXX with your inverter ID and your bearer token.
GET /api/v1/inverter/XXXXXX/realtime/output HTTP/2 Host: pv.inteless.com Accept: application/json Authorization: Bearer XXXX User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36 Origin: https://sunsynk.net Referer: https://sunsynk.net/ Accept-Encoding: gzip, deflate Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Welcome to msg me if you want to know more. If you do ever do some integration in HACS please share. I've not gone so far as to actually write something, but should be easy.