What's new
Carbonite

South Africa's Top Online Tech Classifieds!
Register a free account today to become a member! (No Under 18's)
Home of C.U.D.

Home Assistant integrated into Deye/Sunsynk inverter

iiznh

Senior Member
Rating - 100%
19   0   0
Joined
Feb 28, 2017
Messages
57
Reaction score
11
Points
2,685
Location
Centurion
I built a dongle with a microcontroller for my own solar system with off the shelf parts (with custom written firmware) and my one of my friends was really excited when we installed it to his inverter too. He had been playing around with NodeRed, and a USB-RS485 cable on a Pi but it was a real pain with wifi going offline and missing automations (he does not have any network cables at his inverter). That has been my experience too with earlier attempts running my Home Assistant over wifi next to the inverter.

The microcontroller was a solid integration and ticked all the boxes and even worked where the wifi signal hovered between 5 - 20%
I also asked few other friends if I could test on their systems (so I could get several different configurations), the overall feedback was great.
I named my creation the "SmartDeyeDongle"

My aim was to help people automate their solar power and use more "free" sun power and less dirty (corrupt) coal power, even if the saving is just 1 or 2 units per day (but some people could make huge gains), it would not take long before the cost of the dongle would be recouped

I decided I would build a couple extra and see if people would buy them. Placed the for sale on this forum and my thread was banned a few days after (and I was given a warning that I am not allowed to sell more than one of the same items or I would need a reseller subscription).

Not that I am complaining.
It was an experiment after all, to see if people would pay money for convenience and to automate their inverter. I was quite shocked to find out there are more home assistant "enthusiasts" out there (my wife calls it obsessed but whatever) that would pay money so they do not have to struggle with electronics and tweak low level registers and shift bits. I am still getting emails (even from people overseas that want me to ship to them as I made a youtube video too)

The code creates a native device on home assistant and all the settings can be directly modified leading to updates directly on the inverter. This means you can either use the screen or automations to modify the settings on your inverter. And you get pretty much real time updates. I also built a desktop that I opensourced (helping people that want to integrate using other plugins) that can enable you to be up and running in a few minutes.

I have been pleading with local shops but none of them were interested in restocking the items I need (they do not even answer my mails), so I resorted to order them from China. We will see how it goes and if the couriers honour their delivery promise. I am putting this thread here so that I can answer people's questions without hijacking someone else's thread. I hope I am not in breach of any forum rules. I feel bad about cluttering up other people's for sale threads please post your question/s here. @mrfrikkie
 
Last edited:
Cool to hear other people are also looking into this. I am just getting into HA and want to do some things :)

I am currently waiting for the dongle to get this going: Deye/Sunsynk | Deye/Sunsynk

Then we can start making smart use of the excess power.
 
I am currently waiting for the dongle to get this going: Deye/Sunsynk | Deye/Sunsynk

Then we can start making smart use of the excess power.

If you have a network cable at your inverter go for it!

My biggest pain is that there is no wired internet at my inverter and installing Ethernet to the location is not a trivial task (flat roof with very little space)

I started with Node-Red on a rasp pi Zero with a USB-RS485 Cable, my rasp pi would disconnect and I would lose communications and the ability to run my automations. Eg the SOC of the battery reading would not update.
Next attempt was to run home assistant on a Rasp Pi 4 with the KellerZA plugin, and put it next to the inverter. I even installed 2 additional WIFI access points hoping to solve the issue. The wifi connection on the rasp pi is not great. It is not advisable to run your home assistant server over wifi. Certainly gained some grey hairs because of this.

I started building a dongle and quickly discovered that there are a number of pitfalls and most people would give up along the way. Hence the reason I decide to build something plug and play with custom firmware.
The dongle solved the poor wifi problem and my integration is rock solid. My home assistant server was moved back to the wired section of my house and now runs without any issues.
 
If you have a network cable at your inverter go for it!

My biggest pain is that there is no wired internet at my inverter and installing Ethernet to the location is not a trivial task (flat roof with very little space)

I started with Node-Red on a rasp pi Zero with a USB-RS485 Cable, my rasp pi would disconnect and I would lose communications and the ability to run my automations. Eg the SOC of the battery reading would not update.
Next attempt was to run home assistant on a Rasp Pi 4 with the KellerZA plugin, and put it next to the inverter. I even installed 2 additional WIFI access points hoping to solve the issue. The wifi connection on the rasp pi is not great. It is not advisable to run your home assistant server over wifi. Certainly gained some grey hairs because of this.

I started building a dongle and quickly discovered that there are a number of pitfalls and most people would give up along the way. Hence the reason I decide to build something plug and play with custom firmware.
The dongle solved the poor wifi problem and my integration is rock solid. My home assistant server was moved back to the wired section of my house and now runs without any issues.
Yeah Raspberry Pi OS seems to be really shit at maintaining a wi-fi connection or reconnecting once the connection has dropped. I've resorted to hard-wiring a network point to the Pi at our inverter and all of my problems have gone away.

I use HA to turn on stuff like the pool pump and geyser when solar production is at peak levels and it's been very good with that.

Back to the original post though: The average home user is not tech savvy. They are willing to pay someone to install something like this into their homes, and will pay a monthly fee for maintenance and changes as well. Our local pharmacist wants to give me money to automate his house in the same way I've done ours, and I'm not in that line of business. A missed opportunity perhaps, but I enjoy the tinkering - Not the routine of maintaining stuff for others afterwards. My brother-in-law on the other hand is quite happy taking regular payments for looking after stuff on behalf of people, so I develop stuff for him now.

Point is, there's decent money to be made off this sort of thing.
 
Have you seen this ?


Guy has been at it for quite some time. Remember my friend had this on his Mecer back in the day to be able to control it better.
 
Last edited:
I do the same.

I have a bunch of D1 micros (ESP8266) with an external antenna and some other electronics soldered (MAX485, Vreg, etc depending on the application) and I have integrated some things into my HA installation.

I have a power meter, the alarm panel, temperature/humidity, etc all using the ESP8266 purely because of the affordability.
 
Have you seen this ?


Guy has been at it for quite some time. Remember my friend had this on his Mecer back in the day to be able to control it better.
Solar Assistant is how I get events and stats from my inverter to Home Assistant (MQQT). I don't find that it's useful for much else than that if I'm honest.

The product is okay for Joe Average, but it's severely limited in it's capability and I suspect that it will fall out of favour in the next year or two if the devs don't step up their game significantly soon like.
 
Solar Assistant is how I get events and stats from my inverter to Home Assistant (MQQT). I don't find that it's useful for much else than that if I'm honest.

The product is okay for Joe Average, but it's severely limited in it's capability and I suspect that it will fall out of favour in the next year or two if the devs don't step up their game significantly soon like.
Any open source alternatives you're aware of?
 
Solar Assistant is how I get events and stats from my inverter to Home Assistant (MQQT). I don't find that it's useful for much else than that if I'm honest.

The product is okay for Joe Average, but it's severely limited in it's capability and I suspect that it will fall out of favour in the next year or two if the devs don't step up their game significantly soon like.
I use Solar Assistant to both read and write from my inverter, had no issues save for my own wifi being flakey from time to time - It's been fantastic so far. (Running on a Pi Zero W)
 
I do the same.

I have a bunch of D1 micros (ESP8266) with an external antenna and some other electronics soldered (MAX485, Vreg, etc depending on the application) and I have integrated some things into my HA installation.

I have a power meter, the alarm panel, temperature/humidity, etc all using the ESP8266 purely because of the affordability.
So I use HA and ESP 8266 for an alarm panel but i have recently ran into some issues.

Any chance we could chat about correcting?
 
Any open source alternatives you're aware of?
You can easily read the data from most inverters and have it integrate within Home Assistant.
It gives great screens with the Energy Management plugin.
Everything you would typically want to see.

Control is also possible if your inverter supports write commands.

Screenshots of the Energy Management. And then here is the Sunsynk integration.
 
Any open source alternatives you're aware of?

Solar Assistant was written by a fellow South African and I think that we should celebrate any local talent trying to build something that improve people's lives. I do not use it, simply because I feel that I can do much more in Home Assistant and would like to have my own graphs of the data that I can customise. My automations change the inverter settings according to the weather and amount of sunshine. I send telegram texts when loadshedding starts/end and power outages that are not loadshedding can be noted before you end up with a flat battery. Home Assistant gives me so much more. Paired with my SmartDeyeDongle you can change most of the inverter settings.

I personally think home assistant is the future simply because it has such a big following and many people working on it (github project with the most activity overall). It also runs on most computers, old laptops, old desktops, rasp pi, nuc, proxmox, VM, docker etc. I even got it running on an old netbook with 2GB ram & Atom processor and a spinning HDD dating back to 2010(and it outperforms my rasp pi 4, 4GB)

Solar assistant has some shortcomings when it comes to hardware. They require you to either buy a Rasp Pi or Orange pi. That is easily an additional R 1.5K - R2.8K if you are lucky enough to find a rasp pi in stock(alternative is the orange pi that is quite pricey). Next you need to buy a USB-RS485 cable, and then you need to buy the software licence. If you total that together then that is quite a bit of money to spend (close to R4K, bit steep for inverter monitoring)

I am a big fan of re-use/re-purpose. Just grabbing the old laptop in the bottom drawer that is too slow for anything useful, and use it to run your smart home. I even added some documentation on it since I discovered you can get HA booting without UEFI DeyeSolarDesktop/InstallHomeAssistant.md at main · tomatensaus/DeyeSolarDesktop

The desktop that I built for monitoring solar I opensourced, all the yaml is there for the desktop so you can modify it to suit your needs. Even if you decide to use another method for collecting the data from your Deye/Sunsynk/Sol-Ark) or use a different inverter the desktop could still help you to get a nice view of the data for 0 cost.
Here is a link to the desktop
I also made some youtube videos to help people get going on this (I'm not a youtuber and this is my second video, tried my best to transfer knowledge without putting people to sleep. If you fell asleep I apologise in advance)
 
Last edited:
I use Solar Assistant to both read and write from my inverter, had no issues save for my own wifi being flakey from time to time - It's been fantastic so far. (Running on a Pi Zero W)
As I said, the product is cool for the average guy. I want more out of something like that.
 
As I said, the product is cool for the average guy. I want more out of something like that.
Genuinely curious, what needs (or wants) do you have that Solar Assistant can't fill? I've been able to do everything I'd want to do through Home Assistant through the integration, and the fact that it runs on a Pi Zero means that I can have a tiny little powerbank as my "backup" power for it in case the worst happens to maintain connectivity

Some ideas would be great because then I'd be able to use them in my own setup :)
 
Any open source alternatives you're aware of?
As a direct replacement for Solar Assistant, no. You just really need something that can read the data from the inverter and can commit some commands back up to the device. Considering just how lazy I am, and given the distance between where my Home Assistant host machine is located from the inverter, I went with Solar Assistant to bridge the gap because someone else has already done the work for me.

I run a Pi Zero W with one of those adapter boards to convert it into a pseudo Pi 3 so that I could get an ethernet port and break away from using USB hubs.

If you want to roll your own solution, here's a starting point:

Programmatically read data from your Solar Inverter (Voltronic, Axpert, Mppsolar PIP, Voltacon, Effekta etc) and interface with Home Assistant via MQTT - Works with RS232 & USB!
 
Genuinely curious, what needs (or wants) do you have that Solar Assistant can't fill? I've been able to do everything I'd want to do through Home Assistant through the integration, and the fact that it runs on a Pi Zero means that I can have a tiny little powerbank as my "backup" power for it in case the worst happens to maintain connectivity

Some ideas would be great because then I'd be able to use them in my own setup :)
I cannot create custom schedules for switching between Solar/Utility/Battery, for example. There is the basic thing, but it's insufficient for what I want. Another is to automatically switch to Grid if the load exceeds solar capacity when the mode is currently set to Solar/Battery/Utility - The only available option is to switch modes based on battery capacity. Those sorts of things.

We've submitted several feature requests to the SA developers and they are getting looked at, so eventually the product will scale up and become better.

That being said, I've achieved all I need by way of Home Assistant by now. The level of home automation I've achieved has been tremendous and as I get better at building the rulesets and understanding the multitudes of inputs, things are just getting smoother as we go.
 
Dunno where some.guys get there info...
Solar assistant works on a pi zero also. The software and hardware cost that i incurred are as follows
350 pi
30 charger to power pi
50 case for pi
899 solar assistant software

I have a pretty basic invertor.
I can change all the settings through solar assistant. And now since i have a windows nas server i also installed home assistant which interfaces with solar assistant and i can automate any task like changing profiles from solar to util and change charger settings etc.


So 1330 for solar assistant
Maybe another 350 if you want to run home assistant on another pi zero.

Under 2k for a decent home automation setup is ok i guess.
 
As a direct replacement for Solar Assistant, no. You just really need something that can read the data from the inverter and can commit some commands back up to the device. Considering just how lazy I am, and given the distance between where my Home Assistant host machine is located from the inverter, I went with Solar Assistant to bridge the gap because someone else has already done the work for me.

I run a Pi Zero W with one of those adapter boards to convert it into a pseudo Pi 3 so that I could get an ethernet port and break away from using USB hubs.

If you want to roll your own solution, here's a starting point:

Programmatically read data from your Solar Inverter (Voltronic, Axpert, Mppsolar PIP, Voltacon, Effekta etc) and interface with Home Assistant via MQTT - Works with RS232 & USB!

Running my own Python app on a Pi Zero connected to my inverter which communicates via MQTT to HomeAssistant, works great. Apart from monitoring, notifications etc I can also set settings and automate them to change based on load, time of day, battery discharge, basically anything.

Here is my Python code, super simple:


Also, don't judge, I'm not a Python Dev by trade :LOL:
 
Running my own Python app on a Pi Zero connected to my inverter which communicates via MQTT to HomeAssistant, works great. Apart from monitoring, notifications etc I can also set settings and automate them to change based on load, time of day, battery discharge, basically anything.

Here is my Python code, super simple:


Also, don't judge, I'm not a Python Dev by trade :LOL:
This is some good work
 
Been following this thread closely as I'm planning to have HA setup with the next few days after moving as I definitely want to be able to have more control over our solar.
 
If you have a network cable at your inverter go for it!

My biggest pain is that there is no wired internet at my inverter and installing Ethernet to the location is not a trivial task (flat roof with very little space)

I started with Node-Red on a rasp pi Zero with a USB-RS485 Cable, my rasp pi would disconnect and I would lose communications and the ability to run my automations. Eg the SOC of the battery reading would not update.
Next attempt was to run home assistant on a Rasp Pi 4 with the KellerZA plugin, and put it next to the inverter. I even installed 2 additional WIFI access points hoping to solve the issue. The wifi connection on the rasp pi is not great. It is not advisable to run your home assistant server over wifi. Certainly gained some grey hairs because of this.

I started building a dongle and quickly discovered that there are a number of pitfalls and most people would give up along the way. Hence the reason I decide to build something plug and play with custom firmware.
The dongle solved the poor wifi problem and my integration is rock solid. My home assistant server was moved back to the wired section of my house and now runs without any issues.
Not sure if you've already thought about this or if it is possible in your case, but have you tried one of those wifi power line adapters? This would give you an ethernet connection near your Inverter/Pi.
 
350 pi
30 charger to power pi
50 case for pi
899 solar assistant software
You left out the USB-RS485 or RS232 Cable (depending on the inverter). I also bought a couple of them along the way.

Pi Zero's were sold out for more than 2 years.
Only recently they are back in stock (I see Pishop has over 600 in stock so things are starting to improve).

I found the PiZero wifi disconnecting frequently so it was a real pain in the butt. I still monitor my battery cell voltages via the bluetooth, I will be replacing this with am ESP32 Solution too

The ESP32 Microcontroller solved all my connectivity issues so now I can focus on actual automations. With a bit of luck I will have some available for sale so that other people can achieve the same without wasting days of their lives.
 
Not sure if you've already thought about this or if it is possible in your case, but have you tried one of those wifi power line adapters? This would give you an ethernet connection near your Inverter/Pi.
Thanks for the suggestion, I did consider it but reading stories about people struggling and needing to unplug/replug their adaptors made me decide to avoid them. I like solutions that you setup once, and forget about it. Also replacing my wifi cameras with POE cameras for the same reason.
 
I don't know where you got your costing, but it should be:
ESP8266 ESP1 - R39 from microrobitics
MAX485 - R14 from microroboits
some veroboard/resistiors/soldering/time - free/couple of cents

And then I used an on Dell Wyse D90 client I picked up as a PIF. Much faster than a Pi, uses only a few Watts more and takes a 2.5" HDD for logging.

Total cost for a Home Assistant install plus hooking up a 485-based device: R53
 
You left out the USB-RS485 or RS232 Cable (depending on the inverter). I also bought a couple of them along the way.

Pi Zero's were sold out for more than 2 years.
Only recently they are back in stock (I see Pishop has over 600 in stock so things are starting to improve).

I found the PiZero wifi disconnecting frequently so it was a real pain in the butt. I still monitor my battery cell voltages via the bluetooth, I will be replacing this with am ESP32 Solution too

The ESP32 Microcontroller solved all my connectivity issues so now I can focus on actual automations. With a bit of luck I will have some available for sale so that other people can achieve the same without wasting days of their lives.
I used the usb interface
 
I did this exercise yesterday: Hyper V Home Assistant, and added HACs to install SolarMan to work with my Magneto (Deye clone) inverter. It updates every minute to the dash, and has more info than the Solarman native app that also only updates every 5-6 mins. If I added the rest of the smart home stuff in, one can then create some pretty sick automations based on batt % or PV production...
 
Quick update. I setup an online store that was suppose to take me an afternoon (but really took closer to 2 weeks since I was going mad working off a spreadsheet) at smarthomeintegrations (co.za) Who would have thought there are so many things to know. Already regretting my choice of using a php platform. But here we are, one click deployment and now I need to learn php too.

I also released the new version V4 of the SmartDeyeDongle which is now a manufactured PCB (pictures on my website)
I currently have some stock(12) of the SmartDeyeDongle if anyone is interested. Another 30 will be ready hopefully by the end of the month

I also built a "Smart"solisDongle for 2 friends running ginlong solis inverters (the older model 5G, not the latest 6G model )... I will add this option to the store at some stage. One friend runs this inverter on the generator port of his 8kW Deye, he has both a SmartDeyeDongle and the "Smart"solisDongle so now he is able to combine the data in one desktop and set of graphs. Where else do you get the ability to DIY such a dashboard? HomeAssistant is the future imho.

I also added the code to the https://github.com/tomatensaus/DeyeSolarDesktop to support 2 inverters running master/slave where there is a combined desktop that totals the values of both inverters and gives you a unified view & graphs. I still need to make youtube videos explaining all the new things.

I have been very busy coding a firmware upgrade feature that allows the SmartDeyeDongle to re-flash itself with the latest updates when I publish them via my website. User can click a button on the SmartDeyeDongle settings to check for updates, and click another to upgrade and 30seconds later you are up and running again. If I discover any new inverter settings/features I will add them to the firmware.

In the end I just wanted to say that I have some stock... ended up typing way too much
 
Last edited:
Another batch arrived in time for payday so plenty of stock available

The new dongles are performing well, had zero complaints. My effort is going towards getting the 3phase ready. If anyone is keen to help me test a 3Phase (either 12Kw L/V or 50kW H/V) installation please get in touch. I will help you optimise your power usage too.
 
Did you perhaps build something that works with single phase Sunsynk inverters?
Yes it works well on Sunsynk Single phase. (And other rebrands like Magneto / Sol Ark)

The single phase was the first firmware I built since I own a 8kW myself.
 

Users who are viewing this thread

Back
Top Bottom