DIN Energy-meter with S0-interface & RS485-Interface

Moderator: leecollings

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

Re: DIN Energy-meter with S0-interface & RS485-Interface

Post by Toulon7559 »

Related thread on application of Modbus: http://www.domoticz.com/forum/viewtopic ... 019#p98228
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: 849
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: DIN Energy-meter with S0-interface & RS485-Interface

Post by Toulon7559 »

A wiki-page has been created to describe the Python script for 1 DDS238_1ZN kWh-meter, including backgrounds and required actions for installation.
Last edited by Toulon7559 on Monday 08 June 2020 23:18, 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.
Toulon7559
Posts: 849
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: DIN Energy-meter with S0-interface & RS485-Interface

Post by Toulon7559 »

It took some time before 'try-and-error' resulted in a pragmatic & reasonably simple solution to have script(s) for shifting the RS485-bus-address of the DDS238-1 kWh-meter from the initial/default Slave-address 01.
In the related Domoticz-Wiki section now 2 scripts have been inserted with description:
  • script 1 is to search for the address of a Slave-device type DDS238-1ZN at the RS485-bus
    script 2 is to shift the address of the selected Slave-device to another location
For simplicity no single, combined script, as explained in the text introducing the 2 scripts.

When trying to develop a sweepsearch-function for occupied addresses, according to information in StackOverflow I stumbled against a weakness of Python to cope with time-out.
Such time-out occurs when during sweepsearch a check on an 'empty' address is without result, and remedy is not simple.
Simple 'Manual setting & control' of the scripts: a protection against errors such as shift to an occupied address is not included, except ;) by the brains of the User.
Sometimes script2 (for unclear reasons) does not change settings as desired, requiring User's intervention to get back on track, with first step to (re)find the device on the bus e.g. using script1.
Last edited by Toulon7559 on Saturday 25 February 2017 0:24, 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.
Toulon7559
Posts: 849
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: DIN Energy-meter with S0-interface & RS485-Interface

Post by Toulon7559 »

After some experiments (for another purpose) I found a way to make an XML-file from the read-out for the kWh-meter type DDS238-1ZN.
This message shows the setup.
The resulting XML-file has the same elements as the XML-file Status.xml as coming out of an FP4All PVLogger, but due to the charateristics of the Python dictionary the order is different.
For compatibility some more work to be done, to get a time-stamp which is same layout as in the FP4All-outputformat.
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.
rmanzoli
Posts: 1
Joined: Wednesday 29 April 2020 22:38
Target OS: Windows
Domoticz version:
Contact:

Re: DIN Energy-meter with S0-interface & RS485-Interface

Post by rmanzoli »

kaboom748 wrote: Sunday 13 November 2016 14:27 THIS IS THE DATASHEET FOR THE PROTOCOL :)

De : kWhmeter [mailto:[email protected]]
Envoyé : 13 novembre 2016 01:46
À : GUILLAUME . <[email protected]>
Objet : Re:DDS238-1 ZN

please see it

Lixin Instrument Manufacturing Co.,Ltd.
TEL:0086-577-62750366
FAX:0086-577-62752366
Liushi ,Yueqing,Zhejiang,China
ISO9001,CE,IEC,CMC,CMS,GMC
contact person : peter (manager)
MSN:[email protected]
skyper:lixinmeter
http://www.chinaenergymeter.com http://www.hi-king.com
Hello,


Do you happen to have any project on microcontrollers communicating with this device?

I have the energy device and tried to send through the EUSART of my microcontroller, the frame containing the data to change the ID and baud rate. But the device has not changed.

If I can help, I would appreciate it very much.
Toulon7559
Posts: 849
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: DIN Energy-meter with S0-interface & RS485-Interface

Post by Toulon7559 »

See message https://www.domoticz.com/forum/viewtopi ... 50#p113697 and the related wiki-section.
What is the error report at the side of the microcontroller?
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: 849
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: DIN Energy-meter with S0-interface & RS485-Interface

Post by Toulon7559 »

Observation after recent crash and subsequent upgrade of a setup to Raspian_Bullseye:
be aware that the scripts in Wiki are written for Python2.x in combination with a Linksprite RS485-HAT!
If using Python3.x, then these sripts have to be adapted to become compatible with that variety of Python!
Another type of RS485-interface also may have effects!

At this moment trying myself to make the required adaptation for Python3.x & Linksprite_RS485, but :( causing serious headaches:
some help will be much appreciated.
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 0 guests