New smart app to link the virtual/simulated garage door device with two actual devices

ok looks like its working it should though I haven’t updated the app to include the 2nd sensor, not required I guess since I only have 1. So is it advisable to have a 2nd sensor to use as fully open or no real benefit?

you can have 2 sensors that what i thought you wanted but the main peice of information (for me) is if its open or not, not two bother how far open/fully open

Mark its what i was looking for not Khadanja. Thank you for this i am going in right now updating my codes to test it out tonight.

Ill keep you posted if it works as intended.

No prob possibly need to do work on the checker as I’ve basically bypassed it for now
Let me know

With this setup you wouldn’t need the checker would you?

You would get a positive conformation that it was open or closed with the two sensors so a checker wouldnt need to be used.

Looking at the code it looks like its setup for two standard NC sensors so they would both say open and both say closed is that correct?

The way i have it set up is when the gate is closed the closed sensor will say closed and the open sensor will say closed. then when you give the command to open the “closed” sensor will immediately change to open but the "open " sensor will continue to say closed until it is fully open and then it will update status to open. and then both of them will say open. Does that make sense?

Thank you so much for doing this!

My thought was open sensor open=closed and closed sensor closed= closed

Ok sounds good, Ill just wire it up to make it that way.

I updated the code and will do the testing and setup tonight when I get home from work and will report back tonight once its installed.

Thank you sir!

So everything is installed, the closed function works as planed:

App says open
I Push close
App says closing
Once gate is fully closed it waits till the switch says closed then displays closed

Then I noticed the issue on the open command.

App says closed
I push open
App says opening
Then 3-5 seconds later app indicates opened when gate is not fully opened. I watched the open contact sensor to see if it was a false reading and if the sensor was being thrown off but it says open the entire way and then once fully open it says closed…

For some reason the app is not using the data from the open sensor but rather defaulting to the closed sensors reading of closed/open.

ive updated it try the new code
ive also renabled the push, it only uses the open sesnor, but should tell you if the is an issue (eg blocked track) when closing. make sure the check time is turned up longer than th etime it takes to open or close
if you post the logs so i can check

I can see a few bugs. I’ll.have a look 2moz morning (uk)

Can you tell me what the virtual device is called and what both you contact sensor are called

if you update the code and try it,

Increase the check time

I cant see an event for the fully open contact sensor. Is the fully open sensor actually closing when fully open?.

Yes it is… I will re-assign the contact sensor in the Smart app and see if that fixes it and then send new logs.

just check you are using the latest copy of the app and DH, it shouldnt be sending the null, i replace them with opening and closing

my code does not call up a debug line containing motionOrContactHandler not sure what is generating that message

Is there a way to get this working with no physical garage door switch? I am using Sonoff/ewelink and my current garage door is a virtual one only. I have a physical open/close I want to sync up wit the garage door open/close status. Thanks

I will update them both and report back.

Run it again with the logs and send them to me

Logs below, thank you sir

Open:
d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:36:15 AM: info virtual gd event Contact/DoorState = Gate - contact - open

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:36:15 AM: info virtual gd event Contact/DoorState = Gate - door - open

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:36:15 AM: info virtual gd event Contact/DoorState = Gate - contact - open

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:36:15 AM: info virtual gd event Contact/DoorState = Gate - door - open

c4bca0cf-a0ba-4004-a90a-85c908e786a7 6:36:15 AM: info SHM isActiveSensor(contact:open, app: off, location: off) = false, locationId: 8ac4d931-effd-4b82-a867-46c3ead0c7dc, ISA: c4bca0cf-a0ba-4004-a90a-85c908e786a7

c4bca0cf-a0ba-4004-a90a-85c908e786a7 6:36:15 AM: debug motionOrContactHandler(Gate contact:open)

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:36:11 AM: warn checkIfActually open

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:36:11 AM: debug sending push message

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:36:08 AM: info checkIfActually .dewl is 60 sec… Actual sensor state ZZ Gate sensor Closed = open, Virtual door state = contact is ‘closed’ & and door is ‘opening’

2c1d8bd9-64c3-4177-bfe6-78901c5c4423 6:36:11 AM: debug open = open

c4bca0cf-a0ba-4004-a90a-85c908e786a7 6:35:31 AM: debug motionOrContactHandler(ZZ Gate sensor Open contact:closed)
0a0e993c-3632-48a8-a818-efefd6ba4d4c 6:35:11 AM: debug Parse returned Zz Gate Switch switch is off

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:35:09 AM: trace contactHandler - ‘ZZ Gate sensor Closed contact’ is ‘open’ - virtual contact is 'closed’and door is ‘opening’

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:35:09 AM: debug GATE 2 phisical sensor for ‘ZZ Gate sensor Closed’ it is ‘open’ sensors are ‘ZZ Gate sensor Open’ & ‘ZZ Gate sensor Closed’

c4bca0cf-a0ba-4004-a90a-85c908e786a7 6:35:08 AM: info SHM isActiveSensor(contact:open, app: off, location: off) = false, locationId: 8ac4d931-effd-4b82-a867-46c3ead0c7dc, ISA: c4bca0cf-a0ba-4004-a90a-85c908e786a7

c4bca0cf-a0ba-4004-a90a-85c908e786a7 6:35:08 AM: debug motionOrContactHandler(ZZ Gate sensor Closed contact:open)

0a0e993c-3632-48a8-a818-efefd6ba4d4c 6:35:08 AM: debug Parse returned Zz Gate Switch switch is on

0a0e993c-3632-48a8-a818-efefd6ba4d4c 6:35:08 AM: debug Parse returned Zz Gate Switch switch is on

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:35:07 AM: trace virtualgdcontactHandler - sending open command to Zz Gate Switch the actual garage controler

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:35:07 AM: info virtual gd event Contact/DoorState = Gate - door - opening

2c1d8bd9-64c3-4177-bfe6-78901c5c4423 6:35:07 AM: debug open = null

2c1d8bd9-64c3-4177-bfe6-78901c5c4423 6:35:07 AM: debug open = null

Close:
d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:41:29 AM: info virtual gd event Contact/DoorState = Gate - door - closed

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:41:29 AM: info virtual gd event Contact/DoorState = Gate - contact - closed

c4bca0cf-a0ba-4004-a90a-85c908e786a7 6:41:29 AM: debug motionOrContactHandler(Gate contact:closed)

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:41:26 AM: warn checkIfActually closed

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:41:26 AM: debug sending push message

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:41:26 AM: info checkIfActually .dewl is 45 sec… Actual sensor state ZZ Gate sensor Closed = closed, Virtual door state = contact is ‘open’ & and door is ‘closing’

2c1d8bd9-64c3-4177-bfe6-78901c5c4423 6:41:26 AM: debug close = closed

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:41:05 AM: trace contactHandler - ‘ZZ Gate sensor Closed contact’ is ‘closed’ - virtual contact is 'open’and door is ‘closing’

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:41:05 AM: debug GATE 2 phisical sensor for ‘ZZ Gate sensor Closed’ it is ‘closed’ sensors are ‘ZZ Gate sensor Open’ & ‘ZZ Gate sensor Closed’

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:41:05 AM: trace contactHandler - ‘ZZ Gate sensor Closed contact’ is ‘closed’ - virtual contact is 'open’and door is ‘closing’

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:41:05 AM: debug GATE 2 phisical sensor for ‘ZZ Gate sensor Closed’ it is ‘closed’ sensors are ‘ZZ Gate sensor Open’ & ‘ZZ Gate sensor Closed’

c4bca0cf-a0ba-4004-a90a-85c908e786a7 6:41:05 AM: debug motionOrContactHandler(ZZ Gate sensor Closed contact:closed)

c4bca0cf-a0ba-4004-a90a-85c908e786a7 6:41:05 AM: debug motionOrContactHandler(ZZ Gate sensor Closed contact:closed)

0a0e993c-3632-48a8-a818-efefd6ba4d4c 6:40:47 AM: debug Parse returned Zz Gate Switch switch is off

c4bca0cf-a0ba-4004-a90a-85c908e786a7 6:40:42 AM: info SHM isActiveSensor(contact:open, app: off, location: off) = false, locationId: 8ac4d931-effd-4b82-a867-46c3ead0c7dc, ISA: c4bca0cf-a0ba-4004-a90a-85c908e786a7

c4bca0cf-a0ba-4004-a90a-85c908e786a7 6:40:42 AM: debug motionOrContactHandler(ZZ Gate sensor Open contact:open)

0a0e993c-3632-48a8-a818-efefd6ba4d4c 6:40:42 AM: debug Parse returned Zz Gate Switch switch is on

0a0e993c-3632-48a8-a818-efefd6ba4d4c 6:40:42 AM: debug Parse returned Zz Gate Switch switch is on

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:40:41 AM: trace virtualgdcontactHandler - sending close command to Zz Gate Switch the actual garage controler

d6c02cf3-8757-4c82-8aff-0f52db7e33d5 6:40:41 AM: info virtual gd event Contact/DoorState = Gate - door - closing

2c1d8bd9-64c3-4177-bfe6-78901c5c4423 6:40:41 AM: debug close = null

2c1d8bd9-64c3-4177-bfe6-78901c5c4423 6:40:41 AM: debug close = null