Python Plugin: SAJ Modbus Plugin Topic is solved

Python and python framework

Moderator: leecollings

Post Reply
CloudAlchemyIO

Python Plugin: SAJ Modbus Plugin

Post 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.
User avatar
waltervl
Posts: 5721
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin: SAJ Modbus Plugin

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
CloudAlchemyIO

Re: Python Plugin: SAJ Modbus Plugin

Post 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.
User avatar
waltervl
Posts: 5721
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin: SAJ Modbus Plugin

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
pizzulicchio
Posts: 15
Joined: Wednesday 24 April 2019 14:01
Target OS: Linux
Domoticz version: beta
Location: Italy
Contact:

Re: Python Plugin: SAJ Modbus Plugin

Post 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
User avatar
waltervl
Posts: 5721
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin: SAJ Modbus Plugin

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
pizzulicchio
Posts: 15
Joined: Wednesday 24 April 2019 14:01
Target OS: Linux
Domoticz version: beta
Location: Italy
Contact:

Re: Python Plugin: SAJ Modbus Plugin

Post 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:
User avatar
waltervl
Posts: 5721
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python Plugin: SAJ Modbus Plugin

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
pizzulicchio
Posts: 15
Joined: Wednesday 24 April 2019 14:01
Target OS: Linux
Domoticz version: beta
Location: Italy
Contact:

Re: Python Plugin: SAJ Modbus Plugin

Post 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:
Attachments
SajModbus.JPG
SajModbus.JPG (40.47 KiB) Viewed 1695 times
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest