New plugin for DDS238-1

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
jm_araujo
New user
Posts: 3
Joined: 11 Feb 2020, 13:39

New plugin for DDS238-1

#1 Post by jm_araujo » 11 Feb 2020, 13:55

Hi,
I'm developing a new plugin for the DDS238-1 ZN Energy Meter with MODBUS interface, found cheaply (under 20€) on Aliexpress and other similar sites.

I'm mostly done finishing testing, and would like to share it with the community, but I don't understand how new plugin numbers are attributed in the ESPEasyPluginPlayground. Do I have to contact someone, or just pick one? I see a lot of gaps in the numbering of the plugins in the playground, can I pick a low one in a gap ( like number 136 seems to not have been used), or do I go for the end: I see a 251 in the pull requests, so I should pick 252?

I searched and couldn't find an answer, so I've decided to ask here.

Thank you.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: New plugin for DDS238-1

#2 Post by grovkillen » 11 Feb 2020, 13:58

The playground is a free for all. Pick whatever number you feel like.

If you plan on applying it to the official repo you will be assigned the next available number (91 I think).
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: New plugin for DDS238-1

#3 Post by TD-er » 11 Feb 2020, 14:02

For the playground it doesn't really matter a lot, as people always make their own builds based on that code.
But for the main repository, I will just assign a new number, based on the existing used numbers + the open pull requests.

For the playground we usually use > 127, as that was probably once the "oh we will never reach that" value and a nice split of the 8 bit range.
But I think we should soon also look into using larger int values for the plugin ID. (which may be quite hard to do as it will also break settings)
For now, pick a free one between 128 and 255

jm_araujo
New user
Posts: 3
Joined: 11 Feb 2020, 13:39

Re: New plugin for DDS238-1

#4 Post by jm_araujo » 12 Feb 2020, 00:45

Thank you for your prompt replies,
Just finished my testing and created a pull request, numbered it 224.
I hope it is useful for someone else.

rol-rider
Normal user
Posts: 43
Joined: 02 Oct 2016, 12:36

Re: New plugin for DDS238-1

#5 Post by rol-rider » 24 Mar 2020, 15:47

Hello,
good idea this plugin, nice job @jm_araujo.
I would like to test, with my DDS238, but impossible for me to compile the sources.
is there a binary file with this plugin?
Sorry for my English ! Google Translate !
sorry for my English ! i use google translat.

rol-rider
Normal user
Posts: 43
Joined: 02 Oct 2016, 12:36

Re: New plugin for DDS238-1

#6 Post by rol-rider » 30 Mar 2020, 14:40

I managed to compile a version with the P224_DDS238 plugin.
But ?
I can't get it to work!
I don't know how to wire it?
What is "Port Software serial" for?
Can someone use this plugin? and will be able to inform me?
thank you
Material and wiring used
Image
Image
Image

*google translation used
sorry for my English ! i use google translat.

rol-rider
Normal user
Posts: 43
Joined: 02 Oct 2016, 12:36

Re: New plugin for DDS238-1

#7 Post by rol-rider » 01 Apr 2020, 11:00

I managed to use the plugin and it works !

wiring:
Image
result:
Image

I have the binary file, if some are interested, I will publish it.
sorry for my English ! i use google translat.

rol-rider
Normal user
Posts: 43
Joined: 02 Oct 2016, 12:36

Re: New plugin for DDS238-1

#8 Post by rol-rider » 24 Apr 2020, 13:07

Wh_tot ?
without load quickly rose to 20 ??
do you have an explanation ?
if load = 0 ......... Watt = 0
sorry for my English ! i use google translat.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: New plugin for DDS238-1

#9 Post by TD-er » 24 Apr 2020, 14:54

Maybe it is the internal resolution of that meter?
So the steps will be per 20 Wh, which is a reasonable resolution I guess as those meters are usually meant for measuring in kWh.
Meaning 20 Wh steps is a resolution of 50 steps per kWh.

lowca
New user
Posts: 2
Joined: 15 Jan 2016, 22:26

Re: New plugin for DDS238-1

#10 Post by lowca » 18 May 2020, 14:27

Good job,. Just testing on dds238-2.
Have problem with booting esp8266, when rx and tx is connected, but found this:.
NOTE for ESP8266: when GPIO15 is used (especially for swapped hardware serial):
some converters (like mine) have built-in pullup resistors on TX/RX lines from rs232 side,
connection this type of converters to ESP8266 pin GPIO15 block booting process.
In this case you can replace the pull-up resistor on converter with higher value (100k),
to ensure low level on GPIO15 by built-in in most ESP8266 modules pulldown resistor.
Cheers..

jvdk
New user
Posts: 2
Joined: 09 Jul 2021, 15:03

Re: New plugin for DDS238-1

#11 Post by jvdk » 09 Jul 2021, 15:17

Today I received my DDS238-1 ZN.
I connected the energy meter to a Wemos via a MAX485 as shown by rol-rider.
I flashed the Wemos with ESPEasy_ESP82xx_mega-20210503.
Whatever I try, the Wemos does not read any value from the energy meter. The Memos was set as follows:
settings.png
settings.png (73.92 KiB) Viewed 15426 times
I also tried to reverse D6 and D7, but that did not help. I checked the wiring, but that seems to be OK.
Does anyone has hint how to solve it?

Regards,

Jan

jvdk
New user
Posts: 2
Joined: 09 Jul 2021, 15:03

Re: New plugin for DDS238-1

#12 Post by jvdk » 27 Dec 2021, 16:50

I saw that I never posted the reason why it did not work.

I bought five MAX485 converters. I tried two, but it did not work. So, I bought a RS485 RTU USB-A 2.0 Adapter and a MAX485 at Domoticx.nl. With the USB adapter I could see that the DDS238-1 was working. So I connected the MAX485 I bought from Domotocx.nl. The result was that the DDS238-1 ZN could be read: both software serial as hardware serial.

From the five MAX485s (NOT bought from Domoticx.nl) three did not work!

The only problem I encountered with easpeasy was that it can not handle "Export Energy". "Import Energy" works fine. Export Energy results in very high readings. Probably the sign is not handled correctly. Because I used the DDS238 for reading the power generated by my PV, I reversed the connections and made a rule to ignore the very high readings from wat now has become "Export Energy".

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: New plugin for DDS238-1

#13 Post by TD-er » 27 Dec 2021, 17:05

Very high values does indeed sound like wrong interpretation of negative values.
Without looking into the code, does it make sense if you subtract 65535 from the value?

About the non working MAX485 units...
There are many versions of that chip and only a few are designed to operate at 3.3V
Some may work at 3.3V, but it may be just luck or only working sometimes depending on the load of the unit (and thus the actual supplied voltage which may drop at higher load)
So you might want to have a look at the actual chip used on your boards and look them up in the datasheet.

Ton_vN
Normal user
Posts: 300
Joined: 21 Oct 2016, 15:20
Location: Hengelo (Ov)/ NL
Contact:

Re: New plugin for DDS238-1

#14 Post by Ton_vN » 10 Feb 2023, 18:29

Because the RS485-HAT on my Raspberry crashed, now looking for alternatives.
What is the actual status of the interface for DDS238-1ZN with ESPEasy?

Reading the proceeding messages, could it be that the voltage on the RS485-interface is too low for reading the meter-interface?
Has spec of termination of the RS485-bus been obeyed?
Last edited by Ton_vN on 11 Feb 2023, 22:13, edited 1 time in total.

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: New plugin for DDS238-1

#15 Post by Ath » 10 Feb 2023, 20:18

Ton_vN wrote: 10 Feb 2023, 18:29 Because the RS485-HAT on my Raspberry crashed, now looking for alternatives.
What is the actual status of the interface for DDS238-1ZN with ESPEasy?
Plugin P108 is available for about 2 year in ESPEasy, that supports the DDS238-x series. Documentation is not very elaborate though...

This plugin is included in the Energy and Collection B builds.
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests