For anyone interested in a SAJ solar power inverter plugin, I have created a plugin for this inverter.
It uses the Elfin EE11A Modbus TCP server for connecting to it. It is still a work in progress, and all comments are very welcome.
It is developed with and tested on:
- Domoticz version: 2021.1 (Ubuntu 21.04 and Raspbian GNU/Linux 10 (buster))
- Zonneplan ONE/SAJ Solar Inverter R5-4K-S2
- Elfin-EE11A (RS485 to Ethernet)
https://github.com/CloudAlchemyIO/domoticz-saj-plugin
Maybe someone else finds it useful as well.
Python Plugin: SAJ Modbus Plugin
Moderator: leecollings
- waltervl
- Posts: 5720
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Python Plugin: SAJ Modbus Plugin
Why are you using custom sensors for Energy? And why so many (today, month, year etc).
You can use just Energy (Instant and counter) device Python 243 type 29 and you have current, today, week, month, year in one device!
https://www.domoticz.com/wiki/Dummy_for ... counter.29
Also custom sensors do not store their history so you cannot see more than one year back.
You can use just Energy (Instant and counter) device Python 243 type 29 and you have current, today, week, month, year in one device!
https://www.domoticz.com/wiki/Dummy_for ... counter.29
Also custom sensors do not store their history so you cannot see more than one year back.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Re: Python Plugin: SAJ Modbus Plugin
Okay, thank you for your comments, I will definitely check on those, it's my first plugin.
I didn't know that custom sensors do not store their history for long.
Thanks again.
I didn't know that custom sensors do not store their history for long.
Thanks again.
- waltervl
- Posts: 5720
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Python Plugin: SAJ Modbus Plugin
At least you are trying so that is good!
For the working hours you can use a Counter, custom values. You just have to send the total counter and Domoticz will do the today calculation for you.
Also this device has History logging. Python device 243 type 33 ID 3 (counter). I think there is only the problem that you cannot set the Unit of measure (eg hours) with the Python plugin framework for this device.
https://www.domoticz.com/wiki/Dummy_for ... es#Counter
For the working hours you can use a Counter, custom values. You just have to send the total counter and Domoticz will do the today calculation for you.
Also this device has History logging. Python device 243 type 33 ID 3 (counter). I think there is only the problem that you cannot set the Unit of measure (eg hours) with the Python plugin framework for this device.
https://www.domoticz.com/wiki/Dummy_for ... es#Counter
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 15
- Joined: Wednesday 24 April 2019 14:01
- Target OS: Linux
- Domoticz version: beta
- Location: Italy
- Contact:
Re: Python Plugin: SAJ Modbus Plugin
Hi,CloudAlchemyIO wrote: ↑Tuesday 14 September 2021 13:42 For anyone interested in a SAJ solar power inverter plugin, I have created a plugin for this inverter.
It uses the Elfin EE11A Modbus TCP server for connecting to it. It is still a work in progress, and all comments are very welcome.
It is developed with and tested on:
- Domoticz version: 2021.1 (Ubuntu 21.04 and Raspbian GNU/Linux 10 (buster))
- Zonneplan ONE/SAJ Solar Inverter R5-4K-S2
- Elfin-EE11A (RS485 to Ethernet)
https://github.com/CloudAlchemyIO/domoticz-saj-plugin
Maybe someone else finds it useful as well.
where is possible to download again your plugin?
I'd like to test with my SAJ Inverter model HS2-5K-S2-X with wifi connection that use modbus protocol.
let me know.
thank you
- waltervl
- Posts: 5720
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Python Plugin: SAJ Modbus Plugin
It seems non available anymore.
I found a dzvents script that perhaps works for you
https://www.domoticz.com/forum/viewtopic.php?t=30953
I found a dzvents script that perhaps works for you
https://www.domoticz.com/forum/viewtopic.php?t=30953
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 15
- Joined: Wednesday 24 April 2019 14:01
- Target OS: Linux
- Domoticz version: beta
- Location: Italy
- Contact:
Re: Python Plugin: SAJ Modbus Plugin
I have got a saj HS2-5K-S2-X inverter with eSolar AIO3 module (wifi/ethernet/bluetooth )
This module or this inverter, doesn't support a status page in xml or a web login. All datas are sended to esolar portal cloud using mqtt or some other way..
I have seen that AIO3 module is a modbus adpater (502 tcp port is open ) but i don't know how to extract production datas.
That dzevents script is not working with my saj inverter series.

This module or this inverter, doesn't support a status page in xml or a web login. All datas are sended to esolar portal cloud using mqtt or some other way..
I have seen that AIO3 module is a modbus adpater (502 tcp port is open ) but i don't know how to extract production datas.
That dzevents script is not working with my saj inverter series.

- waltervl
- Posts: 5720
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Python Plugin: SAJ Modbus Plugin
You can try if this gives data: https://github.com/wimb0/saj_modbus
Install python module pymodbus==2.3.0 eg
Install python module pymodbus==2.3.0 eg
Code: Select all
sudo pip3 install pymodbus==2.3.0
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 15
- Joined: Wednesday 24 April 2019 14:01
- Target OS: Linux
- Domoticz version: beta
- Location: Italy
- Contact:
Re: Python Plugin: SAJ Modbus Plugin
Thank you very much for your suggestion.
I'm testing this plugin and it works partially.
only the invertor details, no real time data... i will try to reboot the AIO3 module.
I'm testing this plugin and it works partially.
only the invertor details, no real time data... i will try to reboot the AIO3 module.

- Attachments
-
- SajModbus.JPG (40.47 KiB) Viewed 1693 times
Who is online
Users browsing this forum: Google [Bot] and 1 guest