Python plugin: Eastron SDM630-Modbus V2

Python and python framework

Moderator: leecollings

Post Reply
MFxMF
Posts: 7
Joined: Monday 02 April 2018 13:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Python plugin: Eastron SDM630-Modbus V2

Post by MFxMF »

Hello.

Maybe will be useful for somebody.

https://github.com/MFxMF/SDM630-Modbus

In total are 88 parameters mapped.
Attachments
screen1.png
screen1.png (390.54 KiB) Viewed 11517 times
miroslavpetrov
Posts: 33
Joined: Wednesday 03 February 2016 13:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by miroslavpetrov »

Great work! Thank you!
Automation Hardware:
Domoticz on Raspberry Pi 3 with HomeBridge.
Zigbee2MQTT + Xiaomi sensors
Fibaro HomeCenter 2 + Fibaro Dimmer2 & Double Switch2 + Aeon Multisensor 6 + Remotec ZXT-120
Eastron SDM230
rvdgaag
Posts: 2
Joined: Saturday 16 June 2018 11:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by rvdgaag »

Thank you excellent info, just what I need.

But i Have a mayor question: I need to connect the SM630 with RS485 to my raspberry so I bought a TCP232-204 rs485-etehrnet gateway. But what steps do I need to do to get domoticz to connect to the SDM630 ?

I have been reading on this forum for hours but can't find the answer :-)
miroslavpetrov
Posts: 33
Joined: Wednesday 03 February 2016 13:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by miroslavpetrov »

rvdgaag wrote: Saturday 16 June 2018 11:26 Thank you excellent info, just what I need.

But i Have a mayor question: I need to connect the SM630 with RS485 to my raspberry so I bought a TCP232-204 rs485-etehrnet gateway. But what steps do I need to do to get domoticz to connect to the SDM630 ?

I have been reading on this forum for hours but can't find the answer :-)
I am also working on this problem right now. There are two options:

Option 1: Use tool like socat that allows you to make a virtual serial port (ex.:/dev/ttyVir0) and bind it to the ethernet gateway. I couldn't make it work...

Option 2: Since the library used in the plugin is minimalmodbus it doesn't support modbus tcp, a new plugin should be written. I am currently trying to write one however, my python experience is not fantastic but I am slowly getting there.
Automation Hardware:
Domoticz on Raspberry Pi 3 with HomeBridge.
Zigbee2MQTT + Xiaomi sensors
Fibaro HomeCenter 2 + Fibaro Dimmer2 & Double Switch2 + Aeon Multisensor 6 + Remotec ZXT-120
Eastron SDM230
User avatar
neptunus
Posts: 8
Joined: Sunday 22 April 2018 14:10
Target OS: Linux
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by neptunus »

Hello MFxMF,

I would like to discus about you're very nice plugin. How could we get in contact?

Neptunus
MFxMF
Posts: 7
Joined: Monday 02 April 2018 13:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by MFxMF »

neptunus wrote: Thursday 20 December 2018 16:07 Hello MFxMF,

I would like to discus about you're very nice plugin. How could we get in contact?

Neptunus
Hello, How can I help you?
Send me priv message via forum.
User avatar
neptunus
Posts: 8
Joined: Sunday 22 April 2018 14:10
Target OS: Linux
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by neptunus »

MFxMF wrote: Saturday 22 December 2018 22:45
neptunus wrote: Thursday 20 December 2018 16:07 Hello MFxMF,

I would like to discus about you're very nice plugin. How could we get in contact?

Neptunus
Hello, How can I help you?
Send me priv message via forum.
Hello MFxMF,

I get the information message below.

Code: Select all

We are sorry, but you are not authorised to use this feature. You may have just registered here and may need to participate more in discussions to be able to use this feature. 
Spoiler: show
Please send me an e-mail at [email protected] Then I can explane myself. THANKS
jendrush
Posts: 10
Joined: Wednesday 21 May 2014 20:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by jendrush »

It is possible to connect to SDM630 wirelessly? Maybe ESP8266? Probably some kind of solution would be RPi Zero W, and second Domoticz.

UPDATE I see there is solution with ESP8266.
Farmer
Posts: 1
Joined: Wednesday 16 October 2019 12:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by Farmer »

Hi, thank you for sharing your code.
Can i use the SDM630 in Domoticz in combinatin with solar energy. So the kWh meter counts back or minus in the Domoticz logs?
Odouch
Posts: 3
Joined: Thursday 28 November 2019 20:50
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by Odouch »

Could you use HF2211 in conjunction with SDM630?
Odouch
Posts: 3
Joined: Thursday 28 November 2019 20:50
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by Odouch »

Has anyone tried ESP32 + SDM630 + DomotiCZ?
Odouch
Posts: 3
Joined: Thursday 28 November 2019 20:50
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by Odouch »

jendrush wrote: Monday 18 March 2019 19:51 It is possible to connect to SDM630 wirelessly? Maybe ESP8266? Probably some kind of solution would be RPi Zero W, and second Domoticz.

UPDATE I see there is solution with ESP8266.
Have you found a solution for ESP8266 and SDM?
jendrush
Posts: 10
Joined: Wednesday 21 May 2014 20:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by jendrush »

I tried ESPEasy with test plugin, and it didn't work very well. It offers possibility to read only 4 registers, and i do not see option to send them to different IDXs. Tried also Tasmota, and it reads a lot more, but again i don't know how to send those readed values to specific IDXs. Currently i am working on code to send values choosen by me to specific IDXs just by HTTP GET request to Domoticz. My SDM630 is not connected to main wires, so i am testing this with only 1 phase connected. You can look at the Reaper7 SDM library on Github. This library is also used in ESPEasy, and Tasmota.
Jojik1
Posts: 16
Joined: Monday 06 January 2020 23:57
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by Jojik1 »

Good day,
I'm a complete beginner.
Can't use this solution?

Code: Select all

https://diytechandrepairs.nu/esp8266-to-monitor-electricity-with-sdm-devices-and-send-to-mqtt/
I can't use myself
hobbyklussy
Posts: 1
Joined: Tuesday 28 April 2020 8:06
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by hobbyklussy »

It took me a while but I found out that the cheap Chinese RS485 to USB converter (as shown on the pictures of the writer of this script) seems to work with the SDM630 and raspberry Pi (Domoticz), but in fact it doesn't. It is totally not stable and causes GUI freezes every week.
Since I replaced this adapter with a FTDI based one it really works perfectly without any hangups at all!

I just wanted to share that with you.
kaziormirek
Posts: 5
Joined: Tuesday 28 May 2019 9:06
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Polska, Lubliniec
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by kaziormirek »

hi
I have DOMOTICZ2021.1 (build 13360) and SDM 630 modbus V2
I have a problem with starting the plugin
I have no choice of COM port

i installed: pyserial, minimalmodbus
Attachments
sdm.png
sdm.png (91.54 KiB) Viewed 5951 times
kaziormirek
Posts: 5
Joined: Tuesday 28 May 2019 9:06
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Polska, Lubliniec
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by kaziormirek »

:D
i solved my problem
in /boot/config.txt
add in last line enable_uart=1


[all]
#dtoverlay=vc4-fkms-v3d
enable_uart=1
dusicka82
Posts: 2
Joined: Tuesday 16 August 2016 16:47
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by dusicka82 »

Hi,

The plugin is perfect, but since the update of stable version 2021.1, the power consumption from power is not working properly. Does anyone know how to fix this ?

The Total Power Meter type shows correct power but negative or zero power consumption values.

For example the device from this line:

if 88 not in Devices:
Domoticz.Device(Name="Total Power Meter", Unit=88,TypeName="General",Subtype=0x1D,Used=0).Create()

Does anyone have experience with this ?
jfery
Posts: 1
Joined: Wednesday 13 April 2022 11:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: Eastron SDM630-Modbus V2

Post by jfery »

Hello,
Thanks for your code, but I have a problem.
I have 2 Eastron SDM630-Modbus V2 and I would like to daisy chain them and be able to loop over them in order to retrieve MQTT data via node-red.
Can you tell me if this is feasible and if so, do you have any code that allows to do it?
I thank you in advance.
John
Ps: sorry for my English, but I go through a translator.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest