Motion sensor is always "motion"??

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.
Post Reply
binbo
Posts: 25
Joined: Sunday 18 June 2017 21:47
Target OS: -
Domoticz version:
Contact:

Motion sensor is always "motion"??

Post by binbo » Saturday 06 January 2018 20:30

Hi All! :D

I've got MD-2018R vibration glass break sensors on all my windows - they look like these:
Image
(https://www.amazon.co.uk/AtlanticS-MD-2 ... B00FGSG1X6)

Domoticz picks them up like this: 2018-01-06 18:22:24.282 (rfx) Security (Window 12)

FFXMngr Gets 4 message each vibration:

Code: Select all

------------------------------------------------
Packettype    = Security1
subtype       = Meiantech/Atlantic/Aidebao
Sequence nbr  = 0
id1-3         = CD81AA decimal:13468074
status        = Motion
battery level = OK
Signal level  = 8  -56dBm
------------------------------------------------
I think the problem is - they dont seem to have a message just "motion" - and every few minutes they send a signal out - even when no vibration? Maybe to update a real alarm system of their battery status?

The problem is - This event is being set off every 3 minutes - when the sensors are reporting their battery status. So my lamps keep turning on. lol

Image

I've put "= Motion" as thats all they seem to report?

Thanks for any help!

binbo
Posts: 25
Joined: Sunday 18 June 2017 21:47
Target OS: -
Domoticz version:
Contact:

Re: Motion sensor is always "motion"??

Post by binbo » Tuesday 09 January 2018 20:36

If I remove the "AND Time => sunset"

it works - but i dont want my lights coming on in the day :)

I'm guessing domoticz is repeating the command over-and-over checking time of day - and because the sensor doesnt have a diffent output it's always just "motion" its being triggered.

Does anyone know what to do when the only data sent is "motion" - there is no "motion stop" or anything - so really after "motion" is sent - it's always true that the device is saying "motion"


Thanks for any help

binbo
Posts: 25
Joined: Sunday 18 June 2017 21:47
Target OS: -
Domoticz version:
Contact:

Re: Motion sensor is always "motion"??

Post by binbo » Sunday 14 January 2018 13:21

OK, I worked this out myself - thanks for the help :lol: :P

If anyone ever has the same problem - maybe my description wasn't very good - or maybe I didn't understand what was going on well enough to explain.

Basically - these little window vibration / shock sensors - they send out the message "Motion"

BUT - they don't then have an "OFF" or "Motion Stopped" command. (Think a light - they are either "ON" or "OFF") - These little sensors are always "Motion"

So - I had to manually set the device to "Off" after a "Motion" was detected.

This has got them working great! :D

Image


What i need to work out now is... How do i have all my "window sensors" in one group running off the one blocky script. As i woulddnt like to make 32 blocky scripts all doing the same thing :)

Cheers! :mrgreen:

binbo
Posts: 25
Joined: Sunday 18 June 2017 21:47
Target OS: -
Domoticz version:
Contact:

Re: Motion sensor is always "motion"??

Post by binbo » Sunday 14 January 2018 14:35

Wow! Lua is a little different from the php / javascript that I know - but it makes domoticz so amazing!

Look at this I wrote -

Code: Select all

commandArray = {}

local maxWindows = 20

for i = 1,maxWindows,1 
do 
    if (devicechanged['Window '..i] == 'Motion') then
        if(timeofday['Nighttime'] == true) then
            commandArray['Lamps'] = 'On'
        end
    	commandArray['Window '..i] = 'Off'
    end
end

return commandArray
And that does exactly what I wanted! Same as 20 blocky scripts.

Thank you so much for such an amazing free home automation system! I will post more once I've got my security system started :D

Next Step...

Doorbell to notify when someone enters garden using beam breakers :mrgreen:

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest