home icon indicating copy to clipboard operation
home copied to clipboard

Motion Detector

Open loserat opened this issue 6 years ago • 2 comments

Can you tell me how I can read a motion detector?

},
   "ABB123456789":{  
      "serialNumber":"ABB123456789",
      "deviceId":"1008",
      "typeName":"Bewegungsmelder",
      "channels":{  
         "ch0000":{  
            "datapoints":{  
               "idp0000":"0"

loserat avatar Nov 10 '18 17:11 loserat

You should be able to read whether the idp0000 datapoint is 0 or 1. I don't have a motion sensor but I think it switches to 1 for a short time (as long as it detects motion). You should be able to catch every single event (very short motions) with web sockets.

henry-spanka avatar Nov 10 '18 18:11 henry-spanka

When you connect via Websocket you get the following data when the motion sensor is triggered:

{
    "result": {
        "ABB123456789": {
            "serialNumber": "ABB123456789",
            "deviceId": "2040",
            "typeName": "Bewegungsmelder/Schaltaktor 1-fach",
            "channels": {
                "ch0000": {
                    "datapoints": {
                        "idp0000": "1"
                    }
                }
            }
        },
    },
    "type": "update"
}

And the following update if no more motion is detected after the configured timeframe ("Autonomous Switch Off Time Duration" / "Nachlaufzeit")

{
    "result": {
        "ABB123456789": {
            "serialNumber": "ABB123456789",
            "deviceId": "2040",
            "typeName": "Bewegungsmelder/Schaltaktor 1-fach",
            "channels": {
                "ch0000": {
                    "datapoints": {
                        "idp0000": "0"
                    }
                }
            }
        }
    },
    "type": "update"
}

sstadlberger avatar Nov 12 '18 22:11 sstadlberger