notabene00 / HomeyCONZ

deCONZ app for Athom Homey smart home controller
GNU General Public License v3.0
18 stars 11 forks source link

Trådfri motion sensor #14

Closed notabene00 closed 4 years ago

notabene00 commented 4 years ago

Device name:

Trådfri motion sensor

Device link:

https://www.ikea.com/gb/en/p/tradfri-wireless-motion-sensor-white-70429913/

Device modelid:

TRADFRI motion sensor

Device capabilities:

Motion, binary luminance sensor

State report example:

state:
      { dark: true,
        lastupdated: '2019-07-14T21:08:45',
        presence: false }
notabene00 commented 4 years ago

@k4mrat can you test? https://github.com/fantomnotabene/HomeyCONZ/tree/tradfri-motion-sensor

k4mrat commented 4 years ago

I’ll try it ASAP, hopefully after work tonight!

k4mrat commented 4 years ago

Nice going! It pairs fine. The dark/light works! (See issues below)

Issues: • Don’t know if you made a flow card for “if dark” but I can’t find one.

•I haven’t had time to test very thoroughly before I go to sleep tonight, but for 4 minutes the motion alarm never canceled, but the light/dark Boolean flipped when motion was triggered and that time was reset to 0.

•Something I stumbled upon when I tried to map the sensor, and realized that it had this Boolean, was that when the button is set to “Night” it reacts with dark true/false correctly. But when set to “Day” it seems to send only Dark:true. I thought it was me doing something wrong, but it seems like the same thing happens now with this driver. I’m suspecting IKEA might have messed something up here. It would have been more logical to have Boolean “Light:true/false” than “Dark” IMO. (Or I’m missing something!)

k4mrat commented 4 years ago

Night on: Dark correctly

A9245A3F-8C61-4B77-B8E6-0976E8828647

k4mrat commented 4 years ago

Night on: also correct

4EEFEE06-92D7-48B3-9D28-65CB3874A50F

k4mrat commented 4 years ago

Day mode on: Reports Dark:true. Not your fault though I’d say!

But motion is never canceled. Will look more at that tomorrow.

A42C4453-1CB1-47CB-B212-367207554008

notabene00 commented 4 years ago

Don’t know if you made a flow card for “if dark” but I can’t find one

No, work in progress. It pairs - already a good feedback :)

Not your fault

So it is not working as expected, but not my bad?

motion is never canceled

Can you leave the room and wait a couple minutes? Maybe 3-4

notabene00 commented 4 years ago

@k4mrat branch updated added condition flow card check if it works too

k4mrat commented 4 years ago

So it is not working as expected, but not my bad?

Not if I’m right about this:

•Something I stumbled upon when I tried to map the sensor, and realized that it had this Boolean, was that when the button is set to “Night” it reacts with dark true/false correctly. But when set to “Day” it seems to send only Dark:true. I thought it was me doing something wrong, but it seems like the same thing happens now with this driver. I’m suspecting IKEA might have messed something up here. It would have been more logical to have Boolean “Light:true/false” than “Dark” IMO. (Or I’m missing something!)


Can you leave the room and wait a couple minutes? Maybe 3-4

I’ll give that a try!

k4mrat commented 4 years ago

The motion sensor resets itself perfectly now it seems!

Got some more info about the Boolean and maybe why it may behaves the way it does.

The new version seems to have the ability to dim lights to like 30% or 100% depending on dark or not. The old one, when used as intended; directly with a Trådfri LED, is either ON or OFF.

The Night/Day setting on the back of it is just to tell the lights if you want them to only turn on when dark or always. This is probably why the Day-setting always sends “Dark:True” as this tells the LEDs to turn on.

notabene00 commented 4 years ago

@k4mrat so.. can I say that TMS is fully implemented and should be merged?

k4mrat commented 4 years ago

Yeah. Might wanna make a note somewhere about the “is dark” only working if set to “Night” mode.

notabene00 commented 4 years ago

I have no idea where