Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P078 Eastron does not work #1684

Closed
vmfs1968 opened this issue Aug 26, 2018 · 123 comments
Closed

P078 Eastron does not work #1684

vmfs1968 opened this issue Aug 26, 2018 · 123 comments
Labels
Category: Plugin Related to supported sensors Type: Bug Considered a bug

Comments

@vmfs1968
Copy link

I tested this plugin and it does not work
does not make any kind of milk
I currently have my Eastron running with the soft tasmota that works fine
but wanted to run it with esp_Easy
Can someone help?

@TD-er
Copy link
Member

TD-er commented Aug 26, 2018

It is still testing, the only thing I did was moving it from the playground to here, since a number of persons could not get it to compile.
What hasn't been implemented (and also missing in the Playground plugin) is to configure the settings from within the plugin.
So you may want to have a look at the settings you need and change that in the source code, recompile and flash.
Can you let me know what settings do work?

@TD-er TD-er added Type: Bug Considered a bug Category: Plugin Related to supported sensors labels Aug 26, 2018
@vmfs1968
Copy link
Author

I with easy esp never managed to work
I have to run is with the spft tasmota this link here
https://github.com/arendst/Sonoff-Tasmota
now I can not see what was wrong with the plugin
I know that in SDM.h it looks like it uses #ifdef USE_HARDWARESERIAL
rx tx

@TD-er
Copy link
Member

TD-er commented Aug 27, 2018

What pins do you want to use (RX/TX and the 3rd pin) and what baudrate do you use on Tasmota?

@vmfs1968
Copy link
Author

I am using gpio 1 and 3
but also in other gpios
baudrate 9600
addresses 001

@E-NINA
Copy link

E-NINA commented Aug 28, 2018

Hello,
I've managed to compile and overcome the compilling issue not on a clean way but changing entries on SDM library of files:

SDM.h
line 13 change -> SoftwareSerial.h to ESPeasySoftwareSerial.h
lines 153 and 168 change -> SoftwareSerial to ESPeasySoftwareSerial

and
SDM.cpp from:
lines 17 change -> SoftwareSerial to ESPeasySoftwareSerial

Its necessary also define prior the compile the required softwareserial inputs as settings on easyeasp webpage don't works.

The issue I've right now is posting data to EmonCMS, server cann't see any input

image

@vmfs1968
Copy link
Author

Very well friend
I'll try
And now send mqtt data to domoticz, see if it works
I'll give you news later

@TD-er
Copy link
Member

TD-er commented Aug 28, 2018

@E-NINA
I don't get it why you had such compiler issues.
I did change exactly that in the .cpp and .h files as you mentioned.
So all I can conclude is that you didn't get all the files from the repository.

The settings from the plugin page are indeed not yet working, which is a known issue at this moment.

What baudrate do you use? (for what node)
And do you use 2 or 3 pins?

@E-NINA
Copy link

E-NINA commented Aug 29, 2018

I'm compiling with arduino-ide, using pins 12 and 13 and as I'm using a MAX485 with DE/RE lines (pin 4) see bellow:

ESPeasySoftwareSerial swSerSDM(12, 13); //config SoftwareSerial (rx->pin6 / tx->pin7)
SDM Plugin_078_SDM(swSerSDM, 2400, 4); //config SDM

Regarding my compilation issues where exactly the same that I found on some forums:

http://www.letscontrolit.com/forum/viewtopic.php?f=4&t=5665&start=10
#205 (comment)

With equivalente method I could also compile on previous version of easyesp with eastron on playground status and old SDM template branch (on that, reference needs be changed only on sdm.h as file SDM.cpp don't exists)

Regarding emoncms, I'm using my own instance of emonemcs I'dont know if somethins is broken but if I set on propose wrong API key I could see that easyesp is trying connect. As soon I set the right API key, no errros but also no any new input.

image

@vmfs1968
Copy link
Author

vmfs1968 commented Aug 29, 2018

already works
and sends the data to domoticz mqtt correctly
and I have no problem compiling

@LeeNX
Copy link
Contributor

LeeNX commented Aug 29, 2018

Now I am going to have to hook up my hardware and test! ;-)

@vmfs1968 - Was this a self compile/build or nightly test build?

Expected feedback from me too soon

@vmfs1968
Copy link
Author

@TD-er
Copy link
Member

TD-er commented Aug 29, 2018

@vmfs1968 Could you be a little more elaborate in your posts?
It is very hard to see what you mean to tell us.

@LeeNX
Copy link
Contributor

LeeNX commented Aug 29, 2018

I think @vmfs1968 is saying that he self-compiled the URL he posted in response to my question on what he used.

@TD-er - Thanks

I was hoping it was the nightly test build of the firmware ... See what I can do in the next day or two. Free time is so limited ... ;-)

@vmfs1968
Copy link
Author

vmfs1968 commented Aug 29, 2018

I compiled the normal version, add the 078 testing plugin
I changed this line
ESPeasySoftwareSerial swSerSDM (12, 13); // config SoftwareSerial (rx-> pin6 / tx-> pin7)
as the E-NINA

@E-NINA
Copy link

E-NINA commented Aug 29, 2018

Hello again,

One more thing I've found the issue with EMONCMS posting. Again I'm not a expert programmer and probably isn't the best solution but as I've my own istance of EMONCMS running on a virtual server and I had already some inputs running without problems from an iotawatt where isn't necessray made any change to the code it works on the fly. On easyESP I had changed the following line on _C007.ino

from
String postDataStr = F("GET /emoncms/input/post.json?node=");

to -> (I removed the "/emoncms")
String postDataStr = F("GET /input/post.json?node=");

And started to work. I don't know if this is a issue of local installations of emoncms or if is also hapenning on "emoncms.org"
See picture below:

image

@E-NINA
Copy link

E-NINA commented Aug 29, 2018

one more thing I'm using port 8080 on emoncms server

@Maikel-K
Copy link

Maikel-K commented Sep 9, 2018

I want to start using this plugin in the coming week, i got the SDM120C.

Is anybody able to point me in the right direction to get it working? Or is it no working straight out of the box when selecting the plugin?

@TD-er
Copy link
Member

TD-er commented Sep 9, 2018

At this moment the settings made in the web interface are not being used.
So for now, you have to build a version yourself.
It will get fixed later of-course.
I added it to the main branch (as testing) since a lot of people were having problems building it from the playground. But I haven't had time to give it the attention it really needs.

@Maikel-K
Copy link

What would be needed to help you in fixing this plug-in to make it work via the web-interface.

Or how can i compile it to make it work myself? I tried compiling it multiple times with ArduinoIDE and Atom platformio-ide but it keeps failing!

@TD-er
Copy link
Member

TD-er commented Sep 10, 2018

You have to set the settings yourself in the source code and then compile it again.
Retrying without changing, should yield the same result over and over again.

@Maikel-K
Copy link

Mm, i then have to find out how to do it properly... damn...

@TD-er
Copy link
Member

TD-er commented Sep 10, 2018

This plugin simply has to wait, I don't have time enough

@Maikel-K
Copy link

Maikel-K commented Sep 10, 2018

I understand, i Will try to fix it myself. The only thing i need to find out is how to edit and compile it correctly myself.

@LeeNX
Copy link
Contributor

LeeNX commented Sep 11, 2018

@TD-er - How much time do you need? I can send you some! ;-) haha ...

@Maikel-K - Have you tried one of the nightly test builds? This is my plan, as soon as I find of the time we joking about .

Also just received another MODBus/RS485 Meter DDS-238-2 ZN/S, but more related to #1017

@TD-er
Copy link
Member

TD-er commented Sep 11, 2018

@LeeNX Well, see the issue-list :)
And that list doesn't even include issues for all my own ideas.
But if you can send me some boxed time, that would be great.

@LeeNX
Copy link
Contributor

LeeNX commented Sep 11, 2018

@TD-er suffers from DI2 (Development Induced Insomnia)!

Thanks for all the awesome work, don't know how you do it!

@Grovkillen
Copy link
Member

https://mh-nexus.de/en/hxd/

You can view as plain text and compare. I use it "all the time".

@LeeNX
Copy link
Contributor

LeeNX commented Nov 11, 2018

Other than the SDM120 vs SDM220, the old difference is the SDM120 has a BMP280 sensor vs a DHT22 on the SDM220?

@Grovkillen - Cool, will check out your link. Maybe the week is not a lose. Thanks!

@LeeNX
Copy link
Contributor

LeeNX commented Nov 11, 2018

I'm using Ubuntu at the moment, so can't run HxD. I normally use MidNight Command for a Hex Viewer, thou I was hoping to diff a text file. I am not sure how to diff a binary file and understand what is different.

I will try tomorrow with a fresh view.

@LeeNX
Copy link
Contributor

LeeNX commented Nov 11, 2018

Also noticed that only the first four task publish data via MQTT, this is expected, right?

@TD-er
Copy link
Member

TD-er commented Nov 11, 2018

Also noticed that only the first four task publish data via MQTT, this is expected, right?

Yep, a plugin can only output up-to 4 values.

@uzi18
Copy link
Contributor

uzi18 commented Nov 11, 2018

@LeeNX task 5 does not send for You?

@LeeNX
Copy link
Contributor

LeeNX commented Nov 11, 2018

@uzi18 - That is correct. I had shuffled BMP280, DHT22, SysInfo and Eastron device and Task 5 does not publish. I currently have the data that is not overly important in Task 5.

screenshot from 2018-11-11 13-02-16

@TD-er
Copy link
Member

TD-er commented Nov 11, 2018

OK, now I understand what you are asking.

What kind of controller are you using?
And have you tried increasing the buffer size of the controller?

@LeeNX
Copy link
Contributor

LeeNX commented Nov 11, 2018

Using the OpenHAB MQTT controller. I am sure I double the message queue from 5 to 10, now I have it at 20 and all values seem to be coming throu.

@TD-er - Thanks!

@TD-er
Copy link
Member

TD-er commented Nov 11, 2018

You can try to make the send interval different per plugin. (e.g. 60 and 61 seconds) to make the message bursts happen less often at the same time.

@jvm1000
Copy link

jvm1000 commented Nov 11, 2018

I have conected 2 sdm120, one with id1, and other with id2,
i read 16 values, 8 for the id1, 8 for the id2,
get 14 reading ok.
2 nan, the nans are the first value of both sdm120 (voltage).
i delay could be needed?
no different with o without resistance 180 ohm to endline
no different connecting or not GND

@TD-er
Copy link
Member

TD-er commented Nov 11, 2018

Are the NaN values in the devices tab, or at the receiving end of the used controller?
And what controller do you use?
Some controllers only send 1 value per message and you can only buffer up-to the set limit of the controller.
You can experiment with lowering the minimum send interval and increasing the number of elements in the message queue.
Also please try to enable only 1 and see if all values from 1 SDM120 are read properly.

@jvm1000
Copy link

jvm1000 commented Nov 11, 2018

12 values works fine (8 values for id1 + 4 values id2)

@TD-er
Copy link
Member

TD-er commented Nov 11, 2018

what controller settings do you use?
And at what level do the NaN values occur?

@jvm1000
Copy link

jvm1000 commented Nov 11, 2018

the NaN values in the devices tab
i only use wemos mini

@jvm1000
Copy link

jvm1000 commented Nov 11, 2018

both dm120 works fine working separatelly
both works fine with 4 values each one
even one with 8 and the other with 4

@TD-er
Copy link
Member

TD-er commented Nov 11, 2018

Have you tried to set different interval timers for the separate plugin instances?
For example 60, 61, 62, etc. seconds

@Grovkillen
Copy link
Member

Grovkillen commented Nov 11, 2018

Maybe we could have a setting that would publish task 1 on time HH:MM:01 and second task on HH:MM:02 etc? Optional ...

EDIT: maybe not 🤔😉

@uzi18
Copy link
Contributor

uzi18 commented Nov 11, 2018

@jvm1000 show screenshot please

@jvm1000
Copy link

jvm1000 commented Nov 11, 2018

let me do more test with more time in the interval.
i just sew the leds flashing without rest

@jvm1000
Copy link

jvm1000 commented Nov 11, 2018

solved, with more time in interval, and with diferents values.
Trying that the readings do not coincide at the same time

@E-NINA
Copy link

E-NINA commented Nov 11, 2018

I've tested today's branch mega-20181111 and seems everything is working with a small issue. I've connected 2 sdm's 120 and if I set SDMs with ID 1 and ID 2 data is posted to dashboard. If I set ID's not starting at 1 (I try 10 and 11 -> that was my initial setup) I only get 1st value on dash board of each SDM (voltage)

jvm1000 can you make a quick test and double check this issue?

@TD-er
Copy link
Member

TD-er commented Nov 11, 2018

Hmm, both issues might be related.
What if in the library the ID is cached, or not sent for every query.

@TD-er
Copy link
Member

TD-er commented Nov 11, 2018

I see what is wrong.
const float _tempvar = Plugin_078_SDM->readVal(p078_getRegister(query, node), node);
It is both using node and the getRegister function should be called with model, not with the ID.

This can explain almost all issues reported in the last 2 days :)
As soon as I'm at a computer, I will make a commit for it.

uzi18 added a commit to uzi18/ESPEasy that referenced this issue Nov 11, 2018
@uzi18
Copy link
Contributor

uzi18 commented Nov 11, 2018

@TD-er of fix ready in PR #2043
Someone ready to test? ;)

@jvm1000
Copy link

jvm1000 commented Nov 12, 2018

tested, all ok.
two sdm120, one with id2 and other with id3,
4 devices. intervals 11,13,17,19 seconds
16 values readead and transmited to mosquitto OK
thanks for that big job

@TD-er TD-er closed this as completed Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Plugin Related to supported sensors Type: Bug Considered a bug
Projects
None yet
Development

No branches or pull requests

10 participants