Giter VIP home page Giter VIP logo

Comments (4)

osfog avatar osfog commented on June 26, 2024

In the meantime i have changed to that i ignore the crc check and instead rely on the atio to returl non 0 and sending the
i.e.:


`    if (atof(value) != 0)
    {
      if (strncmp(obisCode, "1.8.0", 5) == 0)
      {
        parsed->cumulativeActiveImport = atof(value);
        cumulativeActiveImport->publish_state(parsed->cumulativeActiveImport);
      }`

from esphome-p1reader.

CarbonCollins avatar CarbonCollins commented on June 26, 2024

I am also getting this issue with the same model of power meter. similar log output too:

[21:38:04][D][data:265]: /ISk5\2M550T-2006
[21:38:04][D][data:265]:
[21:38:04][D][data:265]: 1-0:0.9.1(203805)
[21:38:04][D][data:265]: 1-0:0.9.2(220910)
[21:38:04][D][data:265]: 0-0:96.1.0(77516706)
[21:38:04][D][data:265]: 0-2:25.6.0(ER23)
[21:38:04][D][data:265]: 0-0:25.1.0(ER23)
[21:38:04][D][data:265]: 1-0:1.8.0(008472.260kWh)
[21:38:04][D][data:265]: 1-0:2.8.0(000000.000
kWh)
[21:38:04][D][data:265]: 1-0:3.8.0(000022.619kvarh)
[21:38:04][D][data:265]: 1-0:4.8.0(000701.265
kvarh)
[21:38:04][D][data:265]: 1-0:1.7.0(00.500kW)
[21:38:04][D][data:265]: 1-0:2.7.0(00.000
kW)
[21:38:04][D][data:265]: kW)
[21:38:04][D][data:265]: 1-0:22.7.0(00.000
kW)
[21:38:04][D][data:265]: 1-0:41.7.0(00.494kW)
[21:38:04][D][data:265]: 1-0:42.7.0(00.000
kW)
[21:38:04][D][data:265]: 1-0:61.7.0(00.013kW)
[21:38:04][D][data:265]: 1-0:62.7.0(00.000
kW)
[21:38:04][D][data:265]: 1-0:31.7.0(000A)
[21:38:04][D][data:265]: 1-0:32.7.0(237.7
V)
[21:38:04][D][data:265]: 1-0:51.7.0(002A)
[21:38:04][D][data:265]: 1-0:52.7.0(241.7
V)
[21:38:04][D][data:265]: 1-0:71.7.0(000A)
[21:38:04][D][data:265]: 1-0:72.7.0(244.0
V)
[21:38:04][D][data:265]: 1-0:0.2.0((ER11))
[21:38:04][D][data:265]: 1-0:0.2.8((ER11))
[21:38:04][D][data:265]: !1A56
[21:38:04][I][crc:276]: Telegram read. CRC: 7374 = 1A56. PASS = NO

from esphome-p1reader.

CarbonCollins avatar CarbonCollins commented on June 26, 2024

I spent a bit more time looking into the log output and noticed that in both mine and @johansvenson log outputs, there seems to be an inconsistency with some of the output. for instance:

This telegram has two blank lines:

[11:44:44][D][data:265]: /ISk5\2M550T-2006
[11:44:44][D][data:265]:
[11:44:44][D][data:265]: 1-0:0.9.1(104445)
[11:44:44][D][data:265]: 1-0:0.9.2(220911)
[11:44:44][D][data:265]: 0-0:96.1.0(77516706)
[11:44:44][D][data:265]: 0-2:25.6.0(ER23)
[11:44:44][D][data:265]: 0-0:25.1.0(ER23)
[11:44:44][D][data:265]:
[11:44:44][D][data:265]: 1-0:4.8.0(000704.980kvarh)
[11:44:44][D][data:265]: 1-0:1.7.0(00.199
kW)
[11:44:44][D][data:265]: 1-0:2.7.0(00.000kW)
[11:44:44][D][data:265]: 1-0:3.7.0(00.000
kvar)
[11:44:44][D][data:265]: 1-0:4.7.0(00.276kvar)
[11:44:44][D][data:265]: 1-0:21.7.0(00.004
kW)
[11:44:44][D][data:265]: 1-0:22.7.0(00.000kW)
[11:44:44][D][data:265]: 1-0:41.7.0(00.189
kW)
[11:44:44][D][data:265]: 1-0:42.7.0(00.000kW)
[11:44:44][D][data:265]: 1-0:61.7.0(00.005
kW)
[11:44:44][D][data:265]: 1-0:62.7.0(00.000kW)
[11:44:44][D][data:265]: 1-0:31.7.0(000
A)
[11:44:44][D][data:265]: 1-0:32.7.0(230.4V)
[11:44:44][D][data:265]: 1-0:51.7.0(001
A)
[11:44:44][D][data:265]: 1-0:52.7.0(245.1V)
[11:44:44][D][data:265]: 1-0:71.7.0(000
A)
[11:44:44][D][data:265]: 1-0:72.7.0(244.6*V)
[11:44:44][D][data:265]: 1-0:0.2.0((ER11))
[11:44:44][D][data:265]: 1-0:0.2.8((ER11))
[11:44:44][D][data:265]: !B587
[11:44:44][I][crc:276]: Telegram read. CRC: C779 = B587. PASS = NO

whereas this one seems to have some malformed data part way through the telegram...:

[11:45:24][D][data:265]: /ISk5\2M550T-2006
[11:45:24][D][data:265]:
[11:45:24][D][data:265]: 1-0:0.9.1(104525)
[11:45:24][D][data:265]: 1-0:0.9.2(220911)
[11:45:24][D][data:265]: 0-0:96.1.0(77516706)
[11:45:24][D][data:265]: 0-2:25.6.0(ER23)
[11:45:24][D][data:265]: 0-0:25.1.0(ER23)
[11:45:24][D][data:265]: 1-0:1.8.0(008478.205kWh)
[11:45:24][D][data:265]: 1-0:2.8.0(000000.000
kWh)
[11:45:24][D][data:265]: 1-0:3.8.0(000022.619kvarh)
[11:45:24][D][data:265]: 00
kW)
[11:45:24][D][data:265]: 0(00.000kvar)
[11:45:24][D][data:265]: 1-0:4.7.0(00.275
kvar)
[11:45:24][D][data:265]: 1-0:21.7.0(00.004kW)
[11:45:24][D][data:265]: 1-0:22.7.0(00.000
kW)
[11:45:24][D][data:265]: 1-0:41.7.0(00.188kW)
[11:45:24][D][data:265]: 1-0:42.7.0(00.000
kW)
[11:45:24][D][data:265]: 1-0:61.7.0(00.005kW)
[11:45:24][D][data:265]: 1-0:62.7.0(00.000
kW)
[11:45:24][D][data:265]: 1-0:31.7.0(000A)
[11:45:24][D][data:265]: 1-0:32.7.0(233.6
V)
[11:45:24][D][data:265]: 1-0:51.7.0(001A)
[11:45:24][D][data:265]: 1-0:52.7.0(244.1
V)
[11:45:24][D][data:265]: 1-0:71.7.0(000A)
[11:45:24][D][data:265]: 1-0:72.7.0(243.8
V)
[11:45:24][D][data:265]: 1-0:0.2.0((ER11))
[11:45:24][D][data:265]: 1-0:0.2.8((ER11))
[11:45:24][D][data:265]: !0904
[11:45:24][I][crc:276]: Telegram read. CRC: 3AB6 = 0904. PASS = NO

you can also see this in the telegram I posted above too...

from esphome-p1reader.

CarbonCollins avatar CarbonCollins commented on June 26, 2024

Hi again,

I've been looking into the issue a bit more as of late and think I may have come to a idea as to what was occuring.

It seems that the AM550 was pushing data faster than what the reader was processing causing the internal serial buffer to fill up and drop data. This is mainly from the way the data was malformed in the previous telegrams I posted. I had success doing one of two things:

  1. decrease the delay at the end of the while loop from 40 to 10 which makes the reader empty the serial buffer more frequently.

  2. Increase the internal serial buffer from the 256 default to 1024 by adding Serial.setRxBufferSize(1024); in the setup function.

In either of these two cases I did not get CRC check errors nor any malformed telegrams. Ive been running it live for the last month or so without any issues here!

I'm not sure which option would be the better choice to raise as a PR though, any thoughts on this?

from esphome-p1reader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.