Hey guys, Got a vibration sensor stuck to the cat door, so that when the cat comes in or out it detects it. However, im trying to get it to also know the difference between going in or out. This is tricky. I’ve set it(using logic) to pick up on a certain range of movement, so that when the cat comes in the tilt changes 40 degrees. However , it also changes 40 degrees when the door closes again, hence i get another notification. kinda defeats the purpose.
So what i want to is to tell it not to register the second tilt(as the door closes vertically.
i know this is a rather specific question, if anyone know a better forum for it let me know.
it is,however for some reason it still reacts to both axle movements. hm, im gonna get some screen dumps i think of what i’ve done so far. after all this is a veeeery important flow
Yeah, that is exactly what i mean. But i almost know for sure that the rest position is not 0 (i have 2 myself), so he has to add or extract 40 to the value it has in rest position.
Thus, if rest position = 44,88 (random chosen…) then:
If actual value = 88,88 (44,88+40) / if actual value = 4,88 (44,88-40)
or better build in some slack if door doesn’t open completely:
if actual value >= 79,88 (greater then 44,88+35) / if actual value <= 9,88 (44,88-35)
Ok. Maybe indeed a screeny of your flow(s) to indicate how you do it now would come in handy.
And another question is, how is the device positioned? Flat (bottom down horizontally) or on it’s side (bottom vertically).
When playing around this afternoon i noticed that the values significantly changed when i vertically rotated it over it’s sides. Maybe you can play around a bit with that to get more usable values…
Btw, to elaborate:
If “aqara vibration sensor” [the tilt alarm turned on]
and “logic” [tilt angle] is greater then
then “speech” [say something]
Something like that. But looking at the possibilities i am not sure if this is going to work because i have a sense that the tilt angle will be reported instantaneously and will not have reached the maximum…
Hmmm, give me some time, i will try to find out what the reference pane or previous position triggers do.
Both directions so the cat can go in and out(theres an nfc rader there that opens the lock for the cat, if only i could use that). Manage to get it to work decenrly one way, but still with two notificarions, one for when it opens and then when it closes…
The problem is that the tilt angle is roughly the same in both ways because the device is on it’s side.
If you try the same when it is horizontal, the angles do show pos and neg values. So the “Tilt angles to previous” will not work sideways.
I’m a bit out of time now, but you can try to mess with the “Set tilt reference vector” and “Tilt angles in mobile interface” settings or indeed with the “Tilt angles to reference plane”
If you can detect the pos or neg of the first movement you know if the flap is opened from the outside or inside. I would have to mount the sensor waaay up in one corner, as I have the XL flap but the cat still hits it or bumps it in the upper half (I have two big maine coon).
I wouldn’t be too concerned about the direction, but I am probably going to mount a detector so I can switch on the light in the washing room with the feeder, they are making a mess and we always step on crumbs when going in to do laundry…
I got it to detect which way the flap opened, the problem was that the sensor is too slow to update, so the flap closes again before it detected the change. Quick cat i guess. I put a tile bluetooth on him instead, and use the Beacon app to know hes inside or outside.
Did you really use exact 40? If that isn’t met, it will never trigger,
Maybe use a value of >=25 or 30, the it will also trigger if it doesn’t open fully.