December 31, 20223 yr 42 minutes ago, BritishRacingGreen said: @RoganDawes if i am correct i saw Rust code on one of your github instances . Is that on ESP32 or on Openwrt? You might be thinking of https://github.com/bmerry/sunsniff. That runs on my router (which happens to be AsusWRT, but I imagine it would work on OpenWrt too).
December 31, 20223 yr 8 minutes ago, bmerry said: You might be thinking of https://github.com/bmerry/sunsniff. That runs on my router (which happens to be AsusWRT, but I imagine it would work on OpenWrt too). Ah ok it was you,yes, thanks. Rust seems the be the language that may replace c/c++ in the future, especially because of its safety features which c lacks. I notice Linus Torvalds has also opened the door for Rust to enter mainstream kernel. That says a lot. I reckon it will also become a de facto standard for safety critical code on bare metal/contrained platforms.
December 31, 20223 yr 27 minutes ago, RoganDawes said: Oh sure, it's not difficult, just a simple matter of programming, right? 😉 Yes, I would like to think so. Doing it with relays will be costly and time consuming 🙂
January 9, 20233 yr On 2022/07/16 at 11:43 PM, frankie said: 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. Hi, Where do I use the scripts as mentioned above? Brand new to Home Assistant and any help with this will be appreciated. Thanks
January 9, 20233 yr 3 hours ago, Carel Kuhn said: Hi, Where do I use the scripts as mentioned above? Brand new to Home Assistant and any help with this will be appreciated. Thanks 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).
January 27, 20233 yr Been Working on this further : Converter into fewer enteties , but with a ton of attributes. Makes it easier to use in templates and dashboard Top half gathers all the info Bottom Half is all to do with automation and notification. Algorithm for forcing charge before load shedding is now getting pretty complex. Also takes into account of how much time is needed to charge up to a predefined soc level depending on how long load shedding is anticipated to last for Edited January 27, 20233 yr by Gary Waterworth
January 30, 20233 yr On 2022/07/16 at 11:43 PM, frankie said: 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. Thanks for this, please help on how I can update my sensors in Home assistant
January 30, 20233 yr 1 hour ago, russza said: Thanks for this, please help on how I can update my sensors in Home assistant You would need to write a HomeAssistant integration that would retrieve the relevant information from the Inteless website, and publish it to HA as entities. I'm not sure if anyone has done that yet. An alternative is to make use of kellerza's sunsynk plugin, and either a USB-RS232 adapter (if you don't care about keeping the remote Sunsynk web app functionality), or a USB-RS485 adapter to connect to the inverter directly.
February 2, 20233 yr On 2022/11/13 at 7:10 PM, slipx said: Have a look at the card I created for HA. I'm sure you can pull all the necessary sensor data through the API. This is what my dashboard currently looks like What editor did you use to make the card code ?
June 19, 20233 yr On 2022/11/04 at 8:32 PM, PLCguy said: I guess it's the branded one as it has "Sunsynk" printed on it, but it also does have the red and green LED's. The same one posted earlier by @valienté with the picture. Below is the UI served from it. I have also checked and it's only port 80 open on the unit, the web server is mongoose6.7 but don't know if there are any exploits to try and get root on the unit. cgi-scripts that can be executed on the unit are, and there are others: http://<device-ip>/config?command=status http://<device-ip>/config?command=devinfo but the interesting one is this: just going to keep digging... @PLCguy Did you get any of the other queries that return data from the interface. I lost thwe link from here and am not sure if you followed up on this. Would be keen to see what else can be retrived this way please.
July 2, 20233 yr On 2022/07/16 at 11:43 PM, frankie said: 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 @frankie In July last year you responded to a post related to the Sunsynk data logger where you posted information about the Sunsynk API. Thanks for a very useful post. I managed to connect the API using the info which you provided. Do you perhaps have information on all of the APIs available? Or even the documentation for the API? I would like to accesses historical data for my inverter via the API. Any information will be appreciated.
July 3, 20233 yr On 2023/07/02 at 9:01 AM, Jack17 said: @frankie In July last year you responded to a post related to the Sunsynk data logger where you posted information about the Sunsynk API. Thanks for a very useful post. I managed to connect the API using the info which you provided. Do you perhaps have information on all of the APIs available? Or even the documentation for the API? I would like to accesses historical data for my inverter via the API. Any information will be appreciated. @Jack17 Have a look at Gary Waterworth's Sunsynk integration, he speak directly to the Sunsynk API through that.
July 5, 20233 yr On 2023/07/03 at 4:13 PM, Sc00bs said: @Jack17 Have a look at Gary Waterworth's Sunsynk integration, he speak directly to the Sunsynk API through that. In the guthub repo there is a copy of teh api documentation I based a lot of my work on. It is crappy, but it is all I have been able to find/beg/borrow or steal. The rest is all from monitoring traffic between the app and the website and decoding it
July 7, 20233 yr On 2023/01/27 at 9:40 AM, Gary Waterworth said: Been Working on this further : Converter into fewer enteties , but with a ton of attributes. Makes it easier to use in templates and dashboard Top half gathers all the info Bottom Half is all to do with automation and notification. Algorithm for forcing charge before load shedding is now getting pretty complex. Also takes into account of how much time is needed to charge up to a predefined soc level depending on how long load shedding is anticipated to last for I have an ESP32 integration with the Inverter to pull the data into HA sensors, and I'm trying to update the SOC depending on what stage loadshedding is going on: this is the idea: I can manually slide these sensors in HA, which updates the Inverter settings (number.set_soc_timezone1) What I'm struggling with is to understand the configuration of the call service node. Any ideas?
July 8, 20233 yr Hi @Gooseza Great minds think alike 🙂 , I have been working on doing this exact same thing but using an automation in Home assistant rather than NodeRed. Am trying to put together a video of it as I think it will be useful to a lot of people and will have it out as soon as I work out the all the wrinkles (have lots at the moment) Would also like to switch the Load/Battery Priority based on the Solar Forecast from Solcast for the day to ensure that the battery gets charged to the required level to make it through load shedding without charging the battery from the grid. Have been thinking that is may be easier to just create an entity to switch between custom settings for different levels of load shedding (not sure, comments anyone?) .
July 9, 20233 yr On 2023/07/08 at 10:51 AM, Sc00bs said: Great minds think alike 🙂 , I have been working on doing this exact same thing but using an automation in Home assistant rather than NodeRed. Good luck, this will be awesome to have. I'm not up to speed in yaml, and would love to have this automation in node red... and by utilising as little javascript as possible.... that's why I love node red as its low-code!
July 9, 20233 yr On 2023/07/08 at 10:51 AM, Sc00bs said: Have been thinking that is may be easier to just create an entity to switch between custom settings for different levels of load shedding (not sure, comments anyone?) . I'm not sure if it's relevant to your question, but what I did in https://github.com/bmerry/socit is that when I want to set the current minimum SoC, I construct a schedule which puts about a 15-minute window around the current time and sets the target SoC for that window (computed dynamically), and for all the other program slots I set a much more conservative minimum SoC (50% for me). That way, if something goes wrong (software crashes, RPi running the software dies, RS485 connection to the inverter fails etc) it will revert to the safe value (apart from 15 minutes a day) rather than depleting the battery because the dynamic control is unable to raise the minimum SoC in response to load shedding.
July 9, 20233 yr Not sure what register the sliders are supposed to represent? I’m using the Kellerza sunsynk integration, and have the start times for each period, minimum soc and grid charge setting available. I also have the “Use Timer” and “Grid charge battery current” setting available. To adjust the sliders, I just set them to the numeric value that the slider represents. I’m using yaml, but I’m sure the same would apply using node red.
July 9, 20233 yr 1 hour ago, RoganDawes said: Not sure what register the sliders are supposed to represent? I’m using the Kellerza sunsynk integration, and have the start times for each period, minimum soc and grid charge setting available. I also have the “Use Timer” and “Grid charge battery current” setting available. To adjust the sliders, I just set them to the numeric value that the slider represents. I’m using yaml, but I’m sure the same would apply using node red. This is the Yaml code I am using type: entities entities: - number.set_soc_timezone1 - number.set_soc_timezone2 - number.set_soc_timezone3 - number.set_soc_timezone4 - number.set_soc_timezone5 - number.set_soc_timezone6 title: inverter Not sure if that helps at all?
July 9, 20233 yr 2 hours ago, Gooseza said: Good luck, this will be awesome to have. I'm not up to speed in yaml, and would love to have this automation in node red... and by utilising as little javascript as possible.... that's why I love node red as its low-code! @Gooseza I am not a YAML expert by any stretch of the imagination, I have been using ChatGPT to write the automations for me, works like a bomb and busy doing a video on it.
July 10, 20233 yr 22 hours ago, Sc00bs said: This is the Yaml code I am using type: entities entities: - number.set_soc_timezone1 - number.set_soc_timezone2 - number.set_soc_timezone3 - number.set_soc_timezone4 - number.set_soc_timezone5 - number.set_soc_timezone6 title: inverter Not sure if that helps at all? It's exactly these entity values I'm trying to change via node red, but I just don't know what settings must go in the callservice node to change them.
July 10, 20233 yr 2 hours ago, Gooseza said: It's exactly these entity values I'm trying to change via node red, but I just don't know what settings must go in the callservice node to change them. If you have an ESP32 you should already be able to do it, what code are you using on the ESP32, I am using the code from @slipx 's dash https://github.com/slipx06/Sunsynk-Home-Assistant-Dash and it works out the box.
July 10, 20233 yr 27 minutes ago, Sc00bs said: If you have an ESP32 you should already be able to do it, what code are you using on the ESP32, I am using the code from @slipx 's dash https://github.com/slipx06/Sunsynk-Home-Assistant-Dash and it works out the box. Yes, I'm using Slipx integration, but his solution does not use Node Red. Sure, I can slide the sliders in HA manually, but I want an automation via NodeRed to do that depending on the level of loadshedding.
July 10, 20233 yr 1 hour ago, Gooseza said: Yes, I'm using Slipx integration, but his solution does not use Node Red. Sure, I can slide the sliders in HA manually, but I want an automation via NodeRed to do that depending on the level of loadshedding. I am working on a Home Assistant automation to do the automatic adjustment of battery settings based on the load shedding levels as well as the solar forecast for the next day. Will post a video when I have it all worked out 🙂 Pretty sure I can get it done without having to go to Node Red.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.