DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Moderator: leecollings

jvm1000
Posts: 4
Joined: Thursday 21 June 2018 14:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by jvm1000 »

hello

I ask for help.
It is possible to integrate this energy meter with wifi in domoticz?

https://es.aliexpress.com/item/5-60-A-1 ... 63c0m231On

If this product is integrated, the problems of remote measurement and control of energy in a DIN rail format would be solved.

it has a app and works fine, can turn on off the power line and see all datas

Thanks for help
Gaudi
Posts: 35
Joined: Monday 12 November 2018 14:47
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Gaudi »

Hi, have also found this meter and found the WiFi addition over the standard RS485 of the DDS238-1 very convenient.
Have just recently bought it but have not received it yet.
https://www.ebay.com/itm/5-60-A-110V-23 ... 3796397256


Has anyone got experience on how to read the data over WiFi?
Any information on how to analyze the protocol to make it work with Domoticz is appreciated.

The listed application that works with the unit is Wisen, and it is available both for Android and iOS.
https://play.google.com/store/apps/deta ... d&hl=en_US
https://itunes.apple.com/us/app/wisen/id1113254821?mt=8

Thank you.
Djoe
Posts: 5
Joined: Monday 11 February 2019 10:27
Target OS: Linux
Domoticz version:
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Djoe »

Hi,

For me the WISEN application doesn't work (no device are detected).

I have scan the device to try a manual configuration, there are some answers on TCP port 7001, but not a web site.

So for me this device doesn't work through wifi at this time :-(

Regards,
Toulon7559
Posts: 843
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Toulon7559 »

Setup-descriptions for this device purchased through AlieXpress:
scroll down to descriptions for RS485-protocol and further down for setup of the required Wisen WiFi-function.
The instruction is rather simple & clear, except for the aspect to which WiFi-network the meter will connect if several networks are present .........
Last edited by Toulon7559 on Monday 11 February 2019 17:53, edited 1 time in total.
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.
Gaudi
Posts: 35
Joined: Monday 12 November 2018 14:47
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Gaudi »

I have contacted the manufacturer and he mentioned that the unit does come with a ESP8266 module pre-programmed in the factory that will only work with the software provided by Wisen. I do not like the idea very much, as my usage information is uploaded automatically to their cloud.

There is an alternative to have it supplied with a LPT230 module which will enable you to interface to your own application, but to have it supplied you will need to specify that at the time of purchase.

I have asked if it is possible to replace the module myself for a LPT230 (soldering skills): answer is no.
I have also asked if it is possible to flash the module with a generic firmware and have it configured myself, and the answer is also no.

I now wonder, that if it is a standard module (ESP8266 Serial interface to WiFi, already supported by Domoticz https://www.domoticz.com/wiki/ESP8266_WiFi_module) I should be able to flash it with a custom configured firmware that will connect with Domoticz.

Any help on this?


Regards
Toulon7559
Posts: 843
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Toulon7559 »

The application of the designated Wisen App is perhaps 'too nice/ too elaborate' (at least not easily compatible) for interfacing with Domoticz.

The question is how much WiFi-readout you want towards Domoticz.
If you only want to know the actual values for power & accumulated energy, you could have a practical WiFi-solution
1) by connection of an ESP8266 to the S0-interface,
2) apply/program the ESP8266 by means of ESPEasy as a counter, and
3) transmit the info from the ESP8266 as Delta-upload to a virtual incremental counter in Domoticz.
This thread may be a guide.
That same Forum and this Domoticz Forum have plenty of HowTo-info on this subject:
Google, Wiki and the Search-function are your friends ......
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.
Gaudi
Posts: 35
Joined: Monday 12 November 2018 14:47
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Gaudi »

Thank you for your comments.
Ideally I would like to publish all the parameters the unit currently reports: Total energy kWh, Positve kWh, Real voltage V, Real current A, Real active power W, Real reactive power Var, Power factor COSФ, Real frequency Hz. I have a QNAP NAS, and it will be great to have it store the historical data.
A similar dashboard to MeterN (https://www.123solar.org/metern/) would desired.

But before fiddling with the visualization, I need to figure out if it is possible to flash another firmware, and hope it is compatible with the way it is interfaced to the meter sensors.
Djoe
Posts: 5
Joined: Monday 11 February 2019 10:27
Target OS: Linux
Domoticz version:
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Djoe »

Toulon7559 wrote: Monday 11 February 2019 18:04 2) apply/program the ESP8266 by means of ESPEasy as a counter, and
Do you actually run your DDS238 with espeasy ? Because the main issue is to know on which gpio ports other chips are connected (power meter and so one). I haven't try to open the module yet.

And have you try to reload the factory esp firmware to this module after espeasy use?

I think it can be possible to run this module without flashing a custom firmware.
We have some JSON result on 7001 TCP port :

Code: Select all

$ telnet 192.168.4.1 7001
Trying 192.168.4.1...
Connected to 192.168.4.1.
Escape character is '^]'.
GET /
{"action":"devConfig","params":{"STEP":0,"devTid":"ESP_2M_84F3EB1B2B6A","PIN":"<null>","code":"1400100"}}
ALLO
{"action":"devConfig","params":{"STEP":0,"devTid":"ESP_2M_84F3E61F7B6C","PIN":"<null>","code":"1820340"}}
My original goal was to log all traffics between the apps and the module to analyse it and to do the same, without going to the "cloud".

But, the apps is not working, it never detect the module (I saw a lot off UDP traffic to discovers modules, but my DDS238 never answer to broadcast request, I think that's why it is not detected).

If someone can send me a .cap file I agree to analyse the "factory" protocol and to produce a solution here...
Gaudi
Posts: 35
Joined: Monday 12 November 2018 14:47
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Gaudi »

Djoe wrote: Monday 11 February 2019 19:58
Toulon7559 wrote: Monday 11 February 2019 18:04 2) apply/program the ESP8266 by means of ESPEasy as a counter, and
Do you actually run your DDS238 with espeasy ? Because the main issue is to know on which gpio ports other chips are connected (power meter and so one). I haven't try to open the module yet.

And have you try to reload the factory esp firmware to this module after espeasy use?

I think it can be possible to run this module without flashing a custom firmware.
We have some JSON result on 7001 TCP port :

Code: Select all

$ telnet 192.168.4.1 7001
Trying 192.168.4.1...
Connected to 192.168.4.1.
Escape character is '^]'.
GET /
{"action":"devConfig","params":{"STEP":0,"devTid":"ESP_2M_84F3EB1B2B6A","PIN":"<null>","code":"1400100"}}
ALLO
{"action":"devConfig","params":{"STEP":0,"devTid":"ESP_2M_84F3E61F7B6C","PIN":"<null>","code":"1820340"}}
My original goal was to log all traffics between the apps and the module to analyse it and to do the same, without going to the "cloud".

But, the apps is not working, it never detect the module (I saw a lot off UDP traffic to discovers modules, but my DDS238 never answer to broadcast request, I think that's why it is not detected).

If someone can send me a .cap file I agree to analyse the "factory" protocol and to produce a solution here...
Can you comment on how to get such .cap file or point me to a guide?
I can provide these for you.

Also, it took me a while to be able to connect to my unit. Have you tried the exact steps as indicated in the included manual? If you have not received one, I can publish a scanned copy here.

Thanks!
Djoe
Posts: 5
Joined: Monday 11 February 2019 10:27
Target OS: Linux
Domoticz version:
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Djoe »

I agree to have your manual because mine is very poor.

For instance it's not written that I have to create an account on the "cloud" to access to the button "Add a device".

I tried to "add a device" as a "Plug" type (it's written in the doc), but it doesn't work.

I tried the "Other device" type too, and no more results.

After the fail it say "Try the compatibility mode" (??), but no more results too...

I have downloaded the apps on a ios v10. I will try in a couple of days with ios v9...
Toulon7559
Posts: 843
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Toulon7559 »

@Djoe

Before a misunderstanding creeps in:
my DDS238es are of type 1ZN which type has RS485-interface and S0-interface, not WiFi!
For these DDS238es I use both interfaces:
- RS485 through an RS485-bus running to a single RS485-shield on a Raspberry dealing with the RS485-bus.
By means of RS485 you may get all info you desire.
See the Domoticz' Wiki and this message and it's 'tail' of responses.
- S0-interface connected to pins D3 or to D4 of an ESP8622 (type WEMOS_D1).
Is only for actual power and energy, and the ESP8266 is a separate device outside the DDS238-1ZN.
See this message and subsequent responses.
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.
Gaudi
Posts: 35
Joined: Monday 12 November 2018 14:47
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Gaudi »

Please find the scanned manual in the following link:

https://www.camscanner.com/share/show?e ... AFQS9af7h5

Please, let me know if you can debug the communication protocol or find an alternate way to gather the data.

You mentioned about capturing traffic, how can I help with thus?

Regards
Djoe
Posts: 5
Joined: Monday 11 February 2019 10:27
Target OS: Linux
Domoticz version:
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Djoe »

@Toulon7559

I understand your installation.
It's not what I'm looking for.
RS485 ou 422 need cooper link that I don't have and I don't want to go back to this kind of technology (even if it's a good one, better than RS232 for sure).

@Gaudi

We have the same documentation :-(
I tried on another device (ios9) with the same result :-(
Capturing the IP traffic between your device and your controller is not easy to explain if you have never do it.
You have to use tcpdump (if the traffic go through a physical layer, like ethernet) or airodump-ng (if the traffic go through wireless only).

I don't have a lot of time to work on this personal project during 2 weeks, but if I found a solution I will publish the result here.
Don't worry!
Toulon7559
Posts: 843
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Toulon7559 »

A Windows' IP-scanner like Advanced IP-Scanner and his companion Advanced Port Scanner may assist in finding the IP and the ports of the WiFi-device.
WireShark usually enables a deeper look into the traffic.
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.
Gaudi
Posts: 35
Joined: Monday 12 November 2018 14:47
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Gaudi »

Toulon7559 wrote: Tuesday 12 February 2019 10:40 A Windows' IP-scanner like Advanced IP-Scanner and his companion Advanced Port Scanner may assist in finding the IP and the ports of the WiFi-device.
WireShark usually enables a deeper look into the traffic.
Thanks, I already have the IP address for the unit. If I were to use WireShark, how should I capture packets from this IP in order to send them to you?

Also, I have a contact from the manufacturer. You may want to contact him to get support on your unit.
I have to say that it took me a while to pair the meter with my phone. Keep trying pressing the button till it enters the pairing mode.
Toulon7559
Posts: 843
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Toulon7559 »

@Gaudi

Wireshark needs some programming to look for specific aspects of the LAN-traffic.
IP-address is the start-of-search, but do you know the specific ports on which Wifi of the DDS238-4W can be accessed?

As stated in this message, with the DDS238-1ZN I get all info I desire. RS485-handling (as described in the Wiki) is based on the interface protocol I got from the manufacturer:
Not more interface-data available from DDS238-1ZN, therefore for me no need to further contact the manufacturer.
RS485 data-layout (after quick scan) seems very comparable for DDS238-1ZN and DDS238-4W, but that needs further check & test to be sure.
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.
Toulon7559
Posts: 843
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Toulon7559 »

In the last line of this message I put a question mark to the setup of the Wifi of the DDS238-4W, because of the following aspects:
- the description in the 'Manual' tells
2.Meter input power
When the meter power on, you can push the setting button last 5s , meter enter into the status of waiting for WIFI distribution network and the WIFI led will flash 1s interval .
its means meter enter into the status of waiting for WIFI distribution network . if WIFI led light on 5s , light off 0.1s ,it means meter connect the WIFI successfully.

3.Add device
Please check firstly that your telephone have connected the available WIFI network , then click the “add device “ button .now the meter only used under 2.4GHz WIFI network , it can not use under 5GHz WIFI network .
Rather ambigious, especially if several networks are present. Strongest network takes control? Which will be the default-IP-address?
- With an IP-scanner on a LAN you can check whether the Meter has joined a specific, existing Network, by appearance of IP-address and Identification.
Some IP-scanners also indicate whether HTTP etc. is available as service for the device.
- In this perspective: what about LAN with password-protection?
Usually
data-traffic to/from a device over a LAN only starts when that 'new' device has beforehand been told the LAN-identification and the LAN-password.
Reading the description, I nowhere find how the DDS238-4W-device gets this information before starting operation.

Or do I completely misunderstand the text and operates the Setup like for many other comparable devices, in the sequence as stated below?
1) If switched on, the device starts as a new/independent LAN/Wifi Access Point
2) you make contact with that Access Point by means of your Smartphone (or comparable) and tell to which destination-LAN it should go as Client by giving the required Wifi Identification&Password
3) after completion of the information-insert, the device switches to the destination LAN, and becomes Client in that destination-LAN

Just curious what is correct understanding .......
Last edited by Toulon7559 on Tuesday 12 February 2019 19:57, edited 8 times in total.
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.
telectroboy
Posts: 12
Joined: Tuesday 12 February 2019 14:57
Target OS: OS X
Domoticz version:
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by telectroboy »

Hello Guys,

I've bought the same smart meter with wifi connection.
I've opened it and YES it's works on ESP8266.

I'm not able to find the source files and I, first, had the project to add an ESP32 to the RS485 ModBus in order to retrieve datas.

For me, Wisen software works great but no power history are saved.

So I want to get rid of this software and build an internet page. So tonight I'll open this smart meter and post some pictures of the inside.
Perhaps together we could understand how it works to build a new software.

See U
telectroboy
Posts: 12
Joined: Tuesday 12 February 2019 14:57
Target OS: OS X
Domoticz version:
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by telectroboy »

Toulon7559.

1) If switched on AND PRESS LONG ON WIFI BUTTON, the device is a Wifi Access Point
2) you make contact with that Access Point by means of your Smartphone (or comparable) and tell to which destination-LAN it should go by giving Wifi Identification&Password
3) after completion of the information-insert, the device RESET AND switshes to the destination LAN.
Toulon7559
Posts: 843
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: DDS238-4 W wifi Energy-meter S0-interface RS485-Interface ON/OFF control

Post by Toulon7559 »

@telectroboy

;-) You confirm my 'alternative, practical interpretation' of the text of the Manual
But (IMHO) that is not what the Manual literally tells (as quoted in this message) ........
Last edited by Toulon7559 on Tuesday 12 February 2019 19:59, edited 1 time in total.
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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest