Page 1 of 1

Python Plugin: SAJ Modbus Plugin

Posted: Tuesday 14 September 2021 13:42
by CloudAlchemyIO
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.

Re: Python Plugin: SAJ Modbus Plugin

Posted: Tuesday 14 September 2021 14:19
by waltervl
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.

Re: Python Plugin: SAJ Modbus Plugin

Posted: Tuesday 14 September 2021 14:43
by CloudAlchemyIO
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.

Re: Python Plugin: SAJ Modbus Plugin

Posted: Tuesday 14 September 2021 14:53
by waltervl
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

Re: Python Plugin: SAJ Modbus Plugin

Posted: Sunday 05 May 2024 23:59
by pizzulicchio
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.
Hi,
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

Re: Python Plugin: SAJ Modbus Plugin

Posted: Monday 06 May 2024 9:33
by waltervl
It seems non available anymore.

I found a dzvents script that perhaps works for you
https://www.domoticz.com/forum/viewtopic.php?t=30953

Re: Python Plugin: SAJ Modbus Plugin

Posted: Monday 06 May 2024 11:11
by pizzulicchio
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.
:cry:

Re: Python Plugin: SAJ Modbus Plugin

Posted: Monday 06 May 2024 11:49
by waltervl
You can try if this gives data: https://github.com/wimb0/saj_modbus

Install python module pymodbus==2.3.0 eg

Code: Select all

sudo pip3 install pymodbus==2.3.0

Re: Python Plugin: SAJ Modbus Plugin

Posted: Monday 06 May 2024 13:29
by pizzulicchio
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. :idea: