Page 2 of 2

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

Posted: Sunday 13 November 2016 17:43
by Toulon7559
Related thread on application of Modbus: http://www.domoticz.com/forum/viewtopic ... 019#p98228

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

Posted: Sunday 04 December 2016 16:58
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.

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

Posted: Wednesday 11 January 2017 23:50
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.

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

Posted: Friday 20 January 2017 16:37
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.

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

Posted: Wednesday 29 April 2020 22:43
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.

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

Posted: Monday 08 June 2020 23:20
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?

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

Posted: Saturday 11 February 2023 18:08
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.