Get SEMS/GoodWe data with Powershell

Get SEMS/GoodWe data with Powershell: GoodWe has transferred everything over to the SEMS Portal, which finally comes with an API! In this article we’ll see how to grab data directly from SEMS’ API.

This is basically an update to Get GoodWe data with Powershell which is no longer working for some users (mainly people with a brand new Inverter that was never registered with the old portal).

Let me start by saying that even though there’s finally an API, with some documentation (in Chinese as far as I could find it), it’s still a bit messy, I noticed that this works with different URLs, but I tried to stick to what I normally use to login to the portal (https://www.semsportal.com).

The API works based on tokens, which means it requires two web requests, one to authenticate and grab the token data and another one to grab the actual output we’re after. It’s fairly simple and I’ll go through what I think it’s most important.

At the time of testing (20190613) the Inverter was pushing data to the SEMS Portal every 2.5 minutes circa, which it’s better than the old version of the script that could only see data every 5 minutes. It takes about 30 seconds to see the data: what I mean is, if it’s 9:00:00AM next refresh will occur at around 9:02:30AM, but the portal will have this data processed by around 9:03:00AM (sometimes earlier). An example for the last 4 entries I tried:

  • 06/13/2019 14:08:58
  • 06/13/2019 14:11:28
  • 06/13/2019 14:13:59
  • 06/13/2019 14:16:29

This is a basic script, please implement some error handling! (more…)

Read More