Eastron SDM 630 Energy meter ESPeasy
Moderator: leecollings
-
- Posts: 18
- Joined: Sunday 31 January 2016 21:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Eastron SDM 630 Energy meter ESPeasy
Can some one help me with this. I am a rookie with scripts not with Domoticz.
I have an SDM 630 energy meter working with ESP easy to get the data to domoticz. But the information gets to Domoticz per IDX in a batch of four values or in a batch of all values on one IDX. To work with the in values in domoticz the have to be split in singel values. Is it possible to do this with a script? And how should a script look like?
This is how the data looks: 0, 0.00;0.00;0.00;1.00. The first zero is not a value behind the , are the values.
I have an SDM 630 energy meter working with ESP easy to get the data to domoticz. But the information gets to Domoticz per IDX in a batch of four values or in a batch of all values on one IDX. To work with the in values in domoticz the have to be split in singel values. Is it possible to do this with a script? And how should a script look like?
This is how the data looks: 0, 0.00;0.00;0.00;1.00. The first zero is not a value behind the , are the values.
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Eastron SDM 630 Energy meter ESPeasy
Perhaps it should be connected to a P1 smart meter device that needs multiple inputs. https://www.domoticz.com/wiki/Domoticz_ ... mart_meter
Is there more documentation about your setup with espeasy?
Is there more documentation about your setup with espeasy?
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: 18
- Joined: Sunday 31 January 2016 21:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Eastron SDM 630 Energy meter ESPeasy
I don't know wich info you want. This sight tells a lot about the hardware.
https://www.letscontrolit.com/forum/vie ... 2ed58d9f25
This is the wiki for ESPeasy
https://www.letscontrolit.com/wiki/index.php/Main_Page
https://www.letscontrolit.com/forum/vie ... 2ed58d9f25
This is the wiki for ESPeasy
https://www.letscontrolit.com/wiki/index.php/Main_Page
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Eastron SDM 630 Energy meter ESPeasy
Yes it looks like scripting in Domoticz or using rules in espeasy to send the correct data.
There are also python plugins for this Eastron meter but then you have to connect your Domoticz server directly to your Pi.
There are also python plugins for this Eastron meter but then you have to connect your Domoticz server directly to your Pi.
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: 18
- Joined: Sunday 31 January 2016 21:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Eastron SDM 630 Energy meter ESPeasy
That was my thoughs to. But i have no idea ho to do that
-
- Posts: 843
- Joined: Sunday 23 February 2014 17:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: mixed
- Location: Hengelo(Ov)/NL
- Contact:
Re: Eastron SDM 630 Energy meter ESPeasy
Reading the textstring in Domoticz as in your first message it looks like the output from ESPEasy is going into an svalue of Domoticz, related to a virtual device of type 'Custom Sensor'. Correct?
IMHO then the simplest approach is a dissecting of the svalue-string with a script written in Python or in Lua/dzVents.
Data-extraction for such svalue-string with 4 fields is in Lua-script similar to
Conversion for sValue1 from string to number is
Obviously for sValuex and for VirtualDevice you fill-in the applicable names for your SDM' virtual device.
After that extraction you have per segment the numeric data available for your own applications.
IMHO then the simplest approach is a dissecting of the svalue-string with a script written in Python or in Lua/dzVents.
Data-extraction for such svalue-string with 4 fields is in Lua-script similar to
Code: Select all
sValue1, sValue2, sValue3, sValue4 = otherdevices_svalues[VirtualDevice]:match("([^;]+);([^;]+);([^;]+);([^;]+)")
Code: Select all
Value1 = tonumber(sValue1)
After that extraction you have per segment the numeric data available for your own applications.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
-
- Posts: 195
- Joined: Wednesday 31 May 2017 16:06
- Target OS: NAS (Synology & others)
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Eastron SDM 630 Energy meter ESPeasy
Your problem is not really clear to me. What is your question, or purpose?Can some one help me with this. I am a rookie with scripts not with Domoticz.
I have an SDM 630 energy meter working with ESP easy to get the data to domoticz. But the information gets to Domoticz per IDX in a batch of four values or in a batch of all values on one IDX. To work with the in values in domoticz the have to be split in singel values. Is it possible to do this with a script? And how should a script look like?
This is how the data looks: 0, 0.00;0.00;0.00;1.00. The first zero is not a value behind the , are the values.
I own the same meter and send the data with seperate messages to seperate sensors in Domoticz. This is done by a rule in the ESP-software.
In ESPeasy I created for every fase a single task with Voltage, Current, Power and the fourth value is different for each task. (Active Power, Total Amps, Total Power)
In Domoticz I created new virtual sensors for every value that is created in ESPeasy. You need the IDX in the rules.
Code: Select all
On SDM630_L1#All Do // Receives 4 arguments, 1st one is already sent to the controller, so can be ignored
Publish,domoticz/in,'{"command":"udevice","idx":2282,"nvalue":0,"svalue":"%eventvalue2%"}' // Current L1
Let,1,abs(%eventvalue3%)
Let,5,abs(%eventvalue4%)
Publish,domoticz/in,'{"command":"udevice","idx":2286,"nvalue":0,"svalue":"[var#1]"}' //Power L1
Publish,domoticz/in,'{"command":"udevice","idx":2289,"nvalue":0,"svalue":"[var#5]"}' //Total Active Power
Endon
On SDM630_L2#All Do // Receives 4 arguments, 1st one is already sent to the controller, so can be ignored
Publish,domoticz/in,'{"command":"udevice","idx":2283,"nvalue":0,"svalue":"%eventvalue2%"}' // Current L2
Let,2,abs(%eventvalue3%)
Publish,domoticz/in,'{"command":"udevice","idx":2287,"nvalue":0,"svalue":"[var#2]"}' //Power L2
Publish,domoticz/in,'{"command":"udevice","idx":2285,"nvalue":0,"svalue":"%eventvalue4%"}' //Total Amps van 3 fases
Endon
On SDM630_L3#All Do // Receives 4 arguments, 1st one is already sent to the controller, so can be ignored
Publish,domoticz/in,'{"command":"udevice","idx":2284,"nvalue":0,"svalue":"%eventvalue2%"}' // Current L3
Let,3,abs(%eventvalue3%)
Publish,domoticz/in,'{"command":"udevice","idx":2288,"nvalue":0,"svalue":"[var#3]"}' //Power L3
Let,4,abs([SDM630_L1#W])
Let,5,([SDM630_L3#kWh]*1000)
Publish,domoticz/in,'{"command":"udevice","idx":2294,"nvalue":0,"svalue":"[var#5]"}' //Total Power;Total kW
Publish,domoticz/in,'{"command":"udevice","idx":2290,"nvalue":0,"svalue":"[var#4];[var#5]"}' //Total Power;Total kW
Publish,domoticz/in,'{"command":"udevice","idx":2292,"nvalue":0,"svalue":"[SDM630_L3#kWh]"}' //Total Power;Total kW
Endon
Or have a look at this link: https://www.letscontrolit.com/forum/vie ... 773#p66773
Last edited by PieterS on Monday 06 November 2023 18:56, edited 2 times in total.
Synology with Domoticz build (V2024.7) in Docker
-
- Posts: 18
- Joined: Sunday 31 January 2016 21:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Eastron SDM 630 Energy meter ESPeasy
I think this is wat i am looking for. One quistion. I see that u use "domoticz/in". Do you use mqtt in domoticz for this?
-
- Posts: 195
- Joined: Wednesday 31 May 2017 16:06
- Target OS: NAS (Synology & others)
- Domoticz version: 2024.7
- Location: NL
- Contact:
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Eastron SDM 630 Energy meter ESPeasy
If you do not use mqtt you can change the rule so it would send Domoticz Http API calls, they are very similar to the mqtt payload messages.
Would be
Code: Select all
{"command":"udevice","idx":2282,"nvalue":0,"svalue":"%eventvalue2%"}'
Code: Select all
/json.htm?type=command¶m=udevice&idx=2282&nvalue=0&svalue=%eventvalue2%
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: 18
- Joined: Sunday 31 January 2016 21:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Eastron SDM 630 Energy meter ESPeasy
thx for the help
i don't have ever used mqtt. In the line i have to change the following to make it fit my setup?
idx=2282
eventvalue2
/json.htm?type=command¶m=udevice&idx=2282&nvalue=0&svalue=%eventvalue2%
should i put the ip adres of domoticz somewhere?
i don't have ever used mqtt. In the line i have to change the following to make it fit my setup?
idx=2282
eventvalue2
/json.htm?type=command¶m=udevice&idx=2282&nvalue=0&svalue=%eventvalue2%
should i put the ip adres of domoticz somewhere?
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Eastron SDM 630 Energy meter ESPeasy
Read this espeasy documentation about rules and use the sendtohttp function. There are also examples for domoticz in it
https://espeasy.readthedocs.io/en/lates ... Rules.html
https://espeasy.readthedocs.io/en/lates ... Rules.html
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
Who is online
Users browsing this forum: No registered users and 0 guests