Jump to content

How to link Sonoff on inverter control center software

Recommended Posts

6 hours ago, Carel_Rossouw said:


I want to switch some devices off when the Eskom power is off. 


I know you can connect the sonoff directly to the circuit you want to switch, but I don’t know if it can be used with software. Maybe there is someone who done it.

Link to post
Share on other sites

You can but it does take a little bit of a fiddle. 

Option one would be to load Tasmota  FW on the Sonoff then you have quite a lot op options. 
I recently saw that SonOff brought a new api to its FW so it could be possible to use thier API as well but I havent played with that , yet. 
For a rules engine I would recommend something like Node Red. The options is endless and fairly easy to do once you got the hang of it. 100% of all my rules run on it and I love it. 
 Rpi is obviously the way to go then..

Link to post
Share on other sites

HI Carel,


If you are willing to do add a little bit of Python, I can share some code with you that I wrote to talk to the built-in MQTT server running inside of ICC already..It's based on the paho MQTT library, and I made it so that it gets installed on the pi automatically the first time you run it.  Once installed, you will be able to query all the values from your inverter like SOC, grid watts, grid volts, etc etc. By default the code already looks at a crapload of information coming from MQTT, so you just need to filter out the ones you don't want.

From there (and this is the code you need to add, which is already in the bottom of the program but commented out) it's simply a matter of publishing to the correct topic (you configure it on the Sonoff when you load tasmota) based on whatever condition you like (read multiple IF statements ;)) and violla, relay on or relay off.

Credit to this post for an example of how to talk to MQTT through Python.




Link to post
Share on other sites
  • 1 month later...

Hi Carel

I was in a similar situation to you when I recently installed my PV system and wanted to automate when my pool pump is running. 

ICC Software actually offers another application called Advance Power Management that is tied into their main ICC software (https://iccsoftware.co.za/product/icc-advance-power-management-application-only/). With it, you can control Sonoff's that have been flashed with Tasmota (which is really easy to do with the new Sonoff R3's).

Works like a charm for me and can highly recommend.


Link to post
Share on other sites
  • 1 year later...

Does anyone know if there is an easy way to do this with a Sunsynk inverter (I know it is possible, I would rather just not be reinventing the wheel)?

I assume that I would be connecting the Raspberry Pi to the CanBus or RS 485 ports on the Inverter using an interface of some sorts. 

I know that the ICC software is not compatible as it only seesm to work with the AXPert inverters. I am looking for a way to switch on/off certain devices on my power network when certain conditions happen on the inverter, Pool on when there is excess power, Borehole off when there is load shedding etc. 

I already have 8 Sonoff's installed so am reasonably familiar with them and happy to reflash them to Tasmota.



Link to post
Share on other sites

@wolfandy, I came across your post and I'm looking at the idea of purchasing the ICC software you mention.

Is it still working well for you?

I recently purchased a house and looking to install a solar system when I move in. The house presently has electric geysers and after looking around, I have found that it is pretty expensive to upgrade to a solar version. I would rather save some money and add a few additional PV panels on my roof for my entire system. The question then came along, pertaining to management of the geysers and how not to kill my batteries if there is no solar etc. 

Your solution seems to be perfect, as I already have several Sonoff switches that I can use for this purpose.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...