[SOLVED] New MySensors appearing with random values



  • I'm using the standard Serial Gateway setup, going into Domotiga running as a VM. I have one sensor running this sketch I mashed together from two of the examples (PIR and the BMP180 sketch). This works fine, the PIR, temperature, and pressure appear as 3 sensors. I've built another MySensor, running the sketch in this thread: http://forum.mysensors.org/topic/1006/my-motion-dallas-light-sensor

    After a seemingly random interval, additional MySensor devices begin appearing in Domotiga. Here's an extract of the log - this is when a new sensor appeared in Domotiga.

    2016/02/01 23:49:29 [MySensors] < 0;0;3;0;9;read: 254-254-0 s=0,c=1,t=4,pt=7,l=5,sg=0:1089
    2016/02/01 23:49:29 [MySensors] Node:0; sensor-id:0; message-type:3; ack:0; sub-type:9; payload:read: 254-254-0 s=0,c=1,t=4,pt=7,l=5,sg=0:1089
    2016/02/01 23:49:29 [MySensors] Gateway log message: read: 254-254-0 s=0,c=1,t=4,pt=7,l=5,sg=0:1089
    2016/02/01 23:49:29 [MySensors] < 254;0;1;0;4;1089
    2016/02/01 23:49:29 [MySensors] Node:254; sensor-id:0; message-type:1; ack:0; sub-type:4; payload:1089
    2016/02/01 23:49:29 [MySensors] Set value '1089' for node 254
    2016/02/01 23:49:29 [Devices] Device with address '254' is 'Bedroom pressure'
    2016/02/01 23:49:29 [Devices] ValueUpdate called for device with id '116' valuenum '1' and value '1089'
    2016/02/01 23:49:29 [MySensors] < 0;0;3;0;9;read: 254-254-0 s=2,c=1,t=16,pt=0,l=1,sg=0:0
    2016/02/01 23:49:29 [MySensors] Node:0; sensor-id:0; message-type:3; ack:0; sub-type:9; payload:read: 254-254-0 s=2,c=1,t=16,pt=0,l=1,sg=0:0
    2016/02/01 23:49:29 [MySensors] Gateway log message: read: 254-254-0 s=2,c=1,t=16,pt=0,l=1,sg=0:0
    2016/02/01 23:49:29 [MySensors] < 254;2;1;0;16;0
    2016/02/01 23:49:29 [MySensors] Node:254; sensor-id:2; message-type:1; ack:0; sub-type:16; payload:0
    2016/02/01 23:49:29 [MySensors] Set value '0' for node 254.2
    2016/02/01 23:49:29 [Devices] Device with address '254.2' is 'Bedroom PIR'
    2016/02/01 23:49:29 [Devices] ValueUpdate called for device with id '115' valuenum '1' and value '0'
    2016/02/01 23:49:29 [MySensors] < 0;0;3;0;9;read: 142-254-0 s=2,c=1,t=16,pt=0,l=1,sg=0:0
    2016/02/01 23:49:29 [MySensors] Node:0; sensor-id:0; message-type:3; ack:0; sub-type:9; payload:read: 142-254-0 s=2,c=1,t=16,pt=0,l=1,sg=0:0
    2016/02/01 23:49:29 [MySensors] Gateway log message: read: 142-254-0 s=2,c=1,t=16,pt=0,l=1,sg=0:0
    2016/02/01 23:49:29 [MySensors] < 142;2;1;0;16;0
    2016/02/01 23:49:29 [MySensors] Node:142; sensor-id:2; message-type:1; ack:0; sub-type:16; payload:0
    2016/02/01 23:49:29 [MySensors] Set value '0' for node 142.2
    2016/02/01 23:49:29 [Devices] Device with type 'MySensors', address '142.2', instance 1' and interface 'MySensors Interface' not found!
    2016/02/01 23:49:29 [Devices] Auto created device 'MySensors device #1' with address '142.2' of type 'MySensors Node' with interface 'MySensors Interface' and instance '1'
    2016/02/01 23:49:29 [Devices] ValueUpdate called for device with id '341' valuenum '1' and value '0'
    2016/02/01 23:49:29 [Devices] Device change triggered for device 'MySensors device #1' with 'value1' = '0'``````
    

    I don't understand why it's creating these additional devices. I've checked the serial output of both of the arduinos, and I can't see anything relating to this in the output.

    Any help would really be appreciated! 🙂 Thanks! 🍻


  • Admin

    Version and type of gateway?

    If you're sending a float value to an older gateway it had problems converting it to a string.



  • Hi hek - thanks for the reply!

    I'm using the serial gateway, with an arduino nano as per this example: https://www.mysensors.org/build/serial_gateway

    The sketch is straight from the MySensors library - version 1.5 from the site.


  • Admin

    And if you look at the debug log on the node, what is it actually sending?



  • You mean the output on the serial monitor? I'm not at home at the moment so can't provide you with the output, but I don't recall seeing any values outside of the expected range (for temperature, light, and movement). I can provide this when I'm back.

    Starting to think that it might actually be my first node that's causing this. One of the 'random' values does match the pressure value of the first sensor on occasion - I wonder if there's actually a transmission issue. I did hack that sketch together myself, so it could well be that. Couldn't find an example sketch for PIR and BMP180.



  • For my own sake of closure, I wanted to share that it does appear to have been my bodged together PIR/BMP180 sketch that was causing the issue - but only when in combination of an additional sensor node. Missing closing bracket somewhere or something.

    Thanks for the help!


  • Mod

    Great that you got it working. Thanks for reporting back.
    If you don't already know, ctrl+t (or cmd+t) on the Arduino ide auto-indents the code. That can often make it easer to spot wrong brackets.


Log in to reply
 

Suggested Topics

  • 1
  • 6
  • 2
  • 3
  • 2
  • 10

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts