[Solved] Help: gateway is sometimes receiving wrong values


  • Hero Member

    Hi maybe someone can help me with a strange problem.
    I noticed that one of my sensors sent wrong values (very high ones).
    So I added some serial prints in the sketch and connected the MysController to log the values received from the gateway.

    Here is a picture where you can see the comparision between the output of the sensor 103 and the received values:
    0_1509637032587_2017-11-02 16_21_59-BME680Sensor-2.png

    The red rectangles show the inconsistent values, while the blue value can not be found at all.
    The green rectangle seems to be an unexpected type: S_TEMP was received, but S_AIR_QUALITY was expected.

    The following screenshot is the raw data from the sam scenario:
    0_1509637144681_2017-11-02 16_23_09-MYSController 1.0.0beta (build 3314).png

    The value I am sending is of type uint32_t:
    MyMessage resistanceMsg(CHILD_ID_RESISTANCE, V_LEVEL);
    present(CHILD_ID_RESISTANCE, S_AIR_QUALITY);
    send(resistanceMsg.set(lastResistance)

    Any suggestions what went wrong here???


  • Hero Member

    Nobody who can explain the jammed data on 16:21:30?
    What happens if two sensors send data at the same time?


  • Hardware Contributor

    @Heinz said in Help: gateway is sometimes receiving wrong values:

    What happens if two sensors send data at the same time?

    Data from both sensors is corrupted and they have to resend. You cannot have "mixed" data as there is a checksum in the message and even if it picked up cleanly one of the two checksum there's no way it could match a "mixed" message.


  • Admin

    No, I don't get it either..

    The (Serial COM 13) log you show is from the node right? It looks corrupted from the start. You aren't trying to read out a signed value into uint32 right?


  • Hero Member

    Yes the left one is printed directly from the sensor node.
    Why does it look corrupted from the start???

    The value to be transmitted is an uint32_t which represents a resistance in Ohm.
    On the left side the values are ok, but the value received from the gateway is sometimes a very large one.
    This occurs sporadically 1-3 times per hour. The value should be transfered every 10 seconds.

    All other nodes here in my home work very well. Only this one makes problems.
    Adruino Uno, NRF, BME680 breakoutboard from watterott (http://www.watterott.com/de/BME680-Breakout) via I2C.

    The strange thing is that not only the value is damaged, but also the type.
    Sketch can be found here:
    https://github.com/windkh/mysensors/tree/master/BME680Sensor


  • Admin

    Sorry, misread. Yes, the value is being sent correctly.
    I have no clue why it behaves like this. Any corrupted message should be caught by the NRF24-hardware and be thrown away.


  • Hero Member

    Then I will exchange the radio...



  • What type of GW do you use?
    There had been reports on (constantly) corrupted messages in some versions of the Wifi-GW (ESP8266). You may update to version 2.2-beta and use recent versions of the ESP stuff.


  • Hero Member



  • Nice case 😀 .
    Does mysensors 2.0 mean 2.0.0 or 2.2.0-beta?

    I still recommend to try most recent beta code (in between transport problems @nrf24 seem to be solved) at least for the gw.


  • Hero Member

    I am not using the beta but the standard 2.0.0 release


  • Hero Member

    Ok, it seems that I found the cause of the problem: after changing the radio everything works as expected:

    Here the green line with sporadic wrong values:
    0_1509743234795_BME680.png

    And here the result with a new radio:
    0_1509743267882_BME680-2.png

    --> SOLVED


  • Hero Member

    Studying the log files of the night I found one damaged value

    2017-11-04_23:02:43 MYSENSOR_BME680_R 33597 Ohm
    2017-11-04_23:02:53 MYSENSOR_BME680_R 33760 Ohm
    2017-11-04_23:03:04 MYSENSOR_BME680_R 33814 Ohm
    2017-11-04_23:03:25 MYSENSOR_BME680_R 33705 Ohm
    2017-11-04_23:03:25 MYSENSOR_BME680_R 2164818857 Ohm
    2017-11-04_23:03:36 MYSENSOR_BME680_R 33814 Ohm
    2017-11-04_23:03:46 MYSENSOR_BME680_R 33869 Ohm
    2017-11-04_23:04:07 MYSENSOR_BME680_R 33624 Ohm
    2017-11-04_23:04:49 MYSENSOR_BME680_R 33924 Ohm

    Well, exchanging the radio improved the situation significantly, but unfortunately the problem might be still there....


Log in to reply
 

Suggested Topics

  • 33
  • 2
  • 5
  • 17
  • 3
  • 5

64
Online

11.4k
Users

11.1k
Topics

112.7k
Posts