alexryd / node-shellies

Handles communication with Shelly devices
MIT License
35 stars 13 forks source link

CoAP for Motion Sensor 1 not parsed #36

Closed jghaanstra closed 2 years ago

jghaanstra commented 2 years ago

I have several motion sensors 1 on firmware v2.0.5@3f0fcbbe where status updates are not getting parsed correctly by the shellies library.

device.type is SHMOS-01 Prop is payload oldValue is [[0,6107,1],[0,3119,1654287358],[0,3120,1],[0,6110,0],[0,3106,11],[0,3111,98],[0,9103,0]] newValue is [[0,6107,0],[0,3119,1654287358],[0,3120,1],[0,6110,0],[0,3106,11],[0,3111,98],[0,9103,0]]

What could be causing this?

The device is discovered as SHMOS-01 which has a valid device class. Yet it seems to be parsed as an unknown device.

/cit/d from the device is:


  "blk": [
    {
      "I": 1,
      "D": "sensor_0"
    },
    {
      "I": 2,
      "D": "device"
    }
  ],
  "sen": [
    {
      "I": 6107,
      "T": "A",
      "D": "motion",
      "R": [
        "0/1",
        "-1"
      ],
      "L": 1
    },
    {
      "I": 3119,
      "T": "S",
      "D": "timestamp",
      "U": "s",
      "R": [
        "U32",
        "-1"
      ],
      "L": 1
    },
    {
      "I": 3120,
      "T": "A",
      "D": "motionActive",
      "R": [
        "0/1",
        "-1"
      ],
      "L": 1
    },
    {
      "I": 6110,
      "T": "A",
      "D": "vibration",
      "R": [
        "0/1",
        "-1"
      ],
      "L": 1
    },
    {
      "I": 3106,
      "T": "L",
      "D": "luminosity",
      "R": [
        "U32",
        "-1"
      ],
      "L": 1
    },
    {
      "I": 3111,
      "T": "B",
      "D": "battery",
      "R": [
        "0/100",
        "-1"
      ],
      "L": 2
    },
    {
      "I": 9103,
      "T": "EVC",
      "D": "cfgChanged",
      "R": "U16",
      "L": 2
    }
  ]
}```
jghaanstra commented 2 years ago

Found it. There was a bug in some local changes.