glenndehaan / ikea-tradfri-coap-docs

How can you communicate to your ikea tradfri gateway/hub through coap-client
MIT License
191 stars 20 forks source link

Set motion sensor interval? #15

Closed radeknovis closed 1 year ago

radeknovis commented 4 years ago

Hey Glenn, Your documentation is by far the best I have found on the internet, amazing work.

However, one thing is still unclear to me. How to set a custom time interval for the motion sensor? or even read the current values mentioned in https://github.com/glenndehaan/ikea-tradfri-coap-docs#sensor-parameters ?

Thanks!

glenndehaan commented 4 years ago

That is a good question. The codes on that page where taken from the IKEA Android app that's why I documented them. The problem is that I don't own a Motion sensor therefore I was not able to document the complete control process. I can hover take a look at the android code to see if I am able to figure this out without having the device itself.

I hope to have to time tomorrow so if I find something I will update my findings here.

Joey-1970 commented 4 years ago

Hello Glenn,

I currently make tests with the motion sensor. Here are the device information: `stdClass Object ( [9001] => TRADFRI motion sensor [9002] => 1583771824 [9020] => 1583771836 [9003] => 65541 [9054] => 0 [9019] => 1 [3] => stdClass Object ( [9] => 74 [0] => IKEA of Sweden [1] => TRADFRI motion sensor [2] => [3] => 2.0.022 [6] => 3 )

[5750] => 4
[3300] => Array
    (
        [0] => stdClass Object
            (
                [9003] => 0
            )

    )

) I think there is nothing to get important...

Joachim`

glenndehaan commented 4 years ago

Yeah thats what I thought already. Since the device is working on it's own and also managing the lights on it's own it isn't providing any data back to the gateway.

The Android app also isn't showing any control options based on the code I could decompile. This also makes sense since the motion sensor is running of batteries and if it would have to send motion data the whole time those batteries would run out pretty quickly.

glenndehaan commented 4 years ago

I will update the documentation to remove the listed sensor values since I also can't find those back in the latest version of the app. While in the app I used back then these values where in there.

Joey-1970 commented 4 years ago

Hello Glenn,

it must be somehow possible to get informations from the Trdfri MotionSensor and the Remote too. Look at this thread at "my smart home software": https://www.symcon.de/forum/threads/43031-Modul-IKEA-Tradfri-mit-IP-Symcon-steuern/page4 The persons use another gateway, but they get some useful informations... Maybe there is another way to get the informations from remotes and sensors as from bulbs? Maybe that this information is not get direct from the remote/sensor but from the gateway?

Joachim

glenndehaan commented 4 years ago

Yeah what I think happens in that software is that it keeps the last state provided to the gateway. Looking at the last picture in that forum there is a time set when that state was provided. The IKEA gateway is completely stateless and will always ask for the current state.

Now it is possible that these devices send more data but the gateway isn't using it and therefore we can't read it out by using the coap api. It would mean that you should use another gateway or for example use a Zigbee dongle.

kollokollo commented 3 years ago

There are two different versions of the motion sensor: