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

Toulon7559
Posts: 385
Joined: Sunday 23 February 2014 18:56
Target OS: Raspberry Pi
Domoticz version: latest
Location: Hengelo(Ov)/NL
Contact:

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

Post by Toulon7559 » Sunday 13 November 2016 18:43

Related thread on application of Modbus: http://www.domoticz.com/forum/viewtopic ... 019#p98228
Set1 = RPI-B+RFXCom433+S0PCM+Linksprite-shield for BMP180/DS18B20/RS485+DDS238ZN1
Set2 = RPI-3+RFLinkGTW+ESP8266s+PWS_WS7000
Common = 2*PVLogger+PWS_TFA_Nexus+KAKUs
=> Energy & Data Management based on Time and on PV&Consumption&Meteo

Toulon7559
Posts: 385
Joined: Sunday 23 February 2014 18:56
Target OS: Raspberry Pi
Domoticz version: latest
Location: Hengelo(Ov)/NL
Contact:

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

Post by Toulon7559 » Sunday 04 December 2016 17:58

A wiki-page has been created to describe the Python script for 1 DDS238 kWh-meter, including backgrounds and required actions for installation.
Set1 = RPI-B+RFXCom433+S0PCM+Linksprite-shield for BMP180/DS18B20/RS485+DDS238ZN1
Set2 = RPI-3+RFLinkGTW+ESP8266s+PWS_WS7000
Common = 2*PVLogger+PWS_TFA_Nexus+KAKUs
=> Energy & Data Management based on Time and on PV&Consumption&Meteo

Toulon7559
Posts: 385
Joined: Sunday 23 February 2014 18:56
Target OS: Raspberry Pi
Domoticz version: latest
Location: Hengelo(Ov)/NL
Contact:

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

Post by Toulon7559 » Thursday 12 January 2017 0:50

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 1:24, edited 1 time in total.
Set1 = RPI-B+RFXCom433+S0PCM+Linksprite-shield for BMP180/DS18B20/RS485+DDS238ZN1
Set2 = RPI-3+RFLinkGTW+ESP8266s+PWS_WS7000
Common = 2*PVLogger+PWS_TFA_Nexus+KAKUs
=> Energy & Data Management based on Time and on PV&Consumption&Meteo

Toulon7559
Posts: 385
Joined: Sunday 23 February 2014 18:56
Target OS: Raspberry Pi
Domoticz version: latest
Location: Hengelo(Ov)/NL
Contact:

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

Post by Toulon7559 » Friday 20 January 2017 17:37

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-B+RFXCom433+S0PCM+Linksprite-shield for BMP180/DS18B20/RS485+DDS238ZN1
Set2 = RPI-3+RFLinkGTW+ESP8266s+PWS_WS7000
Common = 2*PVLogger+PWS_TFA_Nexus+KAKUs
=> Energy & Data Management based on Time and on PV&Consumption&Meteo

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests