# Need API Control Node for Solis Inverter controls a Shelly switch via Node-RED

**URL:** https://discourse.nodered.org/t/need-api-control-node-for-solis-inverter-controls-a-shelly-switch-via-node-red/80431
**Category:** Dashboard
**Tags:** http-request, database, function-node
**Created:** [9 August 2023 09:33 UTC](https://discourse.nodered.org/t/need-api-control-node-for-solis-inverter-controls-a-shelly-switch-via-node-red/80431 "2023-08-09T09:33:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![klhof](https://avatars.discourse-cdn.com/v4/letter/k/cdc98d/32.png) [@klhof](https://discourse.nodered.org/u/klhof)
#### Post date: [9 August 2023 09:33 UTC](https://discourse.nodered.org/t/need-api-control-node-for-solis-inverter-controls-a-shelly-switch-via-node-red/80431/1 "2023-08-09T09:33:01Z")

</div>

Hello community,

I am new here and probably also looking for a simple solution. Unfortunately, I am not capable of performing or even writing complex programming.

Currently, I have a Victron PC system with Node Red installed. Here, I wanted to use a Shelly switch when the battery is full. That was easy and works.

However, I also have a PV system with a Solis inverter. I have now unlocked the API for this inverter. Can someone help me with the setup?

Solis API \>\>\> Excess power feed-in \>\>\> Shelly switch activation

Thank you,

Klaus

 ![Screenshot 2023-08-09 at 13-19-30 Node-RED 174083-nodered.proxyrelay1.victronenergy.com](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/4/545ad5bde8b58f156fff3fe9aeeec180e9a01685.png)  
 ![Screenshot 2023-08-10 at 07-45-35 External SolisCloud Monitoring API.doc - SolisCloud API 1.2.pdf](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/c/5ca0141da09deefcf77ba938ffbd2f4433f7b2ac.png)

KeyID：

1300386381676#####

KeySecret：

cbcecf8fdd7b44e898741359c51#####

API URL：

[https://www.soliscloud.com:1##33/](https://www.soliscloud.com:1##33/)

---

<div class="post-metadata">

### Author: ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)
#### Post date: [9 August 2023 20:12 UTC](https://discourse.nodered.org/t/need-api-control-node-for-solis-inverter-controls-a-shelly-switch-via-node-red/80431/2 "2023-08-09T20:12:34Z")

</div>

Hi!

Versuch bitte (zb per Google Übersetzer) das ganze auf englisch zu schreiben. Dann können sicher 70 % mehr Leute helfen.  
Ansonsten wäre es hilfreich, wenn du einen link zur Solis API nennen könntest.  
Kannst du den solis von der victron aus anpingen?  
Kann der solis Inverter evtl auch MQTT?

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [9 August 2023 23:26 UTC](https://discourse.nodered.org/t/need-api-control-node-for-solis-inverter-controls-a-shelly-switch-via-node-red/80431/3 "2023-08-09T23:26:35Z")

</div>

Any chance of english so we can try and help ?

Craig

---

<div class="post-metadata">

### Author: ![klhof](https://avatars.discourse-cdn.com/v4/letter/k/cdc98d/32.png) [@klhof](https://discourse.nodered.org/u/klhof)
#### Post date: [10 August 2023 09:08 UTC](https://discourse.nodered.org/t/need-api-control-node-for-solis-inverter-controls-a-shelly-switch-via-node-red/80431/4 "2023-08-10T09:08:46Z")

</div>

OK Thanks  
Done!

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [11 August 2023 03:43 UTC](https://discourse.nodered.org/t/need-api-control-node-for-solis-inverter-controls-a-shelly-switch-via-node-red/80431/5 "2023-08-11T03:43:20Z")

</div>

OK so i assume you are trying to find out when you have excess PV so you can activate other devices to use that PV ?

A couple of points - excess PV implies that you have a consumption meter - the inverter knows how much power it is producing - but unless you have a consumption meter it has no way of knowing how much power the house is using and hence calculating Excess PV.

Secondly if you are talking to the Solis portal (cloud) then you need to realise that the WIFI dongle on your inverter only sends information up to the cloud every 6 minutes - is that granular and timely enough for your needs ?

Depending on which Solis inverter and WIFI dongle you have there are a number of projects available that will talk to directly to the inverter and get the information in realtime - in my case my wifi dongle did not support realtime queries so i had to resort to talking Modbus to the inverter

Let us know the answers to the above and then we can go from there

Craig

---

<div class="post-metadata">

### Author: ![klhof](https://avatars.discourse-cdn.com/v4/letter/k/cdc98d/32.png) [@klhof](https://discourse.nodered.org/u/klhof)
#### Post date: [11 August 2023 08:41 UTC](https://discourse.nodered.org/t/need-api-control-node-for-solis-inverter-controls-a-shelly-switch-via-node-red/80431/6 "2023-08-11T08:41:27Z")

</div>

I installed a complete system with mains feed and battery.  
I would like to put the excess into the water tank using the heating element.  
I just can't program a NODE in such a way that it understands the API.

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [12 August 2023 02:40 UTC](https://discourse.nodered.org/t/need-api-control-node-for-solis-inverter-controls-a-shelly-switch-via-node-red/80431/7 "2023-08-12T02:40:44Z")

</div>

OK the stuff coming from the API on their Website the last time i looked was in JSON format.

Basically there is a sequence to go through

1. You have to request your site ID - using the authentication details - assume you have got this far ?
2. Once you have a site ID you then craft a new request for the plant details within the Site ID

This is usually presented back to you as a JSON sequence - the easiest way to handle this is to use the JSON conversion node and feed this in to a Javascript object where you can then drill down to find the excess solar etc.

So first step is to do a request and get your site ID and plant ID - show us a debug ouf that output

Then move on to parsing the data.

Note that i have not done this on the new cloud infrastructure they have rolled out - but have read that it is the same as the old system

You may also want to read through this thread on Github that talks about updating for the latest Solis Cloud etc

> **[BETA: SolisCloud support · hultenvp/solis-sensor · Discussion #71](https://github.com/hultenvp/solis-sensor/discussions/71)**
>
> Soliscloud support goes beta With the help of @LucidityCrash and @hawkeye100 Soliscloud support has been added! It will be released soon. Ginlong is planning to deprecate the m.ginlong.com portal f...

Craig
