Implant, Closing gate by hand timer reset

Moderator: leecollings

PeterRozenveld
Posts: 38
Joined: Sunday 15 October 2023 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Implant, Closing gate by hand timer reset

Post by PeterRozenveld »

I have an Implant and a sectional door,
At the door through a relay I control the implant. That works.
Domoticz gives a good display.
I just want domoticz to give a pulse, when the door is open longer than 30 minutes. However, the door only knows since it has a bistable function, that with each pulse the door then opens, then closes. Do I close the door by hand. Then the counter of Blockly continues to run and still sends a pulse , causing the door to open again. How do I stop that counter , and reset that command: If "door" is "Open" THEN CLOSE_SWITCH after 1800 seconds.

Translated with DeepL.com (free version)
User avatar
waltervl
Posts: 5397
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Implant, Closing gate by hand timer reset

Post by waltervl »

You will need a door sensor that sends the state of the door to Domoticz. Then you know the state of the sectional door (open/close). Else it will be guessing what the state of the door is.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
PeterRozenveld
Posts: 38
Joined: Sunday 15 October 2023 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Implant, Closing gate by hand timer reset

Post by PeterRozenveld »

"At the door, I control the implant through a relay. That works.
Domoticz gives a good display. "
That's what I meant by the input on the first input. The signaling what the state of the door is. Open or closed. The 2nd OUT , that's what I control the Novoferm4 with. That responds to a Pulse, one time it closes, the next time it opens.
User avatar
waltervl
Posts: 5397
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Implant, Closing gate by hand timer reset

Post by waltervl »

Ah, in blockly you cannot (I believe).In dzvents you have the cancelQueuedCommands() function for this.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
PeterRozenveld
Posts: 38
Joined: Sunday 15 October 2023 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Implant, Closing gate by hand timer reset

Post by PeterRozenveld »

Ok, that's what I thought. I notice you know more about it than I do. So now get someone to find, who could possibly write this....
User avatar
waltervl
Posts: 5397
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Implant, Closing gate by hand timer reset

Post by waltervl »

What does your blockly script look like? Probably easy to convert it into dzVents....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
PeterRozenveld
Posts: 38
Joined: Sunday 15 October 2023 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Implant, Closing gate by hand timer reset

Post by PeterRozenveld »

Where shall I start, have tried to make some in the 3 phases, they all fail. The simplest thing would be if the counter reset itself upon reaching the final contact : Door closed. And that it continues , when e.g. after 40 seconds the door is still not closed. The problem is namely that bistable state , which is caused by a pulse pusher. Too bad that novferm4 has no Up and Down pusher / pulse.
I will start with the last 2, man what a mess:
Attachments
Gate01 van 2024-07-06 13-42-30.png
Gate01 van 2024-07-06 13-42-30.png (158.15 KiB) Viewed 1400 times
Gate02 van 2024-07-06 13-42-56.png
Gate02 van 2024-07-06 13-42-56.png (205.18 KiB) Viewed 1400 times
User avatar
waltervl
Posts: 5397
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Implant, Closing gate by hand timer reset

Post by waltervl »

I did it a liitle differently: When my garagedoor is open for X minutes I get a warning. Instead of a warning you can close the door.
The script is checking every 10 minutes if the door is still open.if more than 20 minutes open then the switch is triggered.

Replace 'YourDoorSensor and YourDoorSwitch with your own devices.

Code: Select all

return {
	on = {
		timer = {'every 10 minutes'},
	},
	execute = function(domoticz)
	    local garage = domoticz.devices('YourDoorSensor') --  doorsensor
            local garageswitch = domoticz.devices('YourDoorSwitch') --  doorswitch
 
           -- garage sensor check  
           if garage.state == 'Open' and garage.lastUpdate.minutesAgo > 20 then       
               -- domoticz.notify('','garagedeur staat meer dan 20 min open!')
               garageswitch.SwitchOn()  -- Switch to close the door
               domoticz.log('door closed', domoticz.LOG_INFO)
           end
        
end
}
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
PeterRozenveld
Posts: 38
Joined: Sunday 15 October 2023 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Implant, Closing gate by hand timer reset

Post by PeterRozenveld »

Thank you!!! Can you explain what does what ?
After all, trying to understand some of it so I know what is happening.
User avatar
waltervl
Posts: 5397
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Implant, Closing gate by hand timer reset

Post by waltervl »

As already explained the script is checking every 10 minutes

Code: Select all

timer = 10 minutes
if the garagedoor is open and longer than 20 minutes

Code: Select all

if garage.state == 'Open' and garage.lastUpdate.minutesAgo > 20 then 
If not do nothing if true then switch the garage door switch

Code: Select all

garageswitch.SwitchOn()
and put a log statement

Code: Select all

domoticz.log('door closed', domoticz.LOG_INFO) 
everything with prefix -- is treated as a comment/remark, so not executed.

See also the extensive wiki: https://www.domoticz.com/wiki/DzVents:_ ... _scripting
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
PeterRozenveld
Posts: 38
Joined: Sunday 15 October 2023 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Implant, Closing gate by hand timer reset

Post by PeterRozenveld »

Code: Select all

return {
	on = {
		timer = {'every 2 minutes'},
	},
	execute = function(domoticz)
	    local garage = domoticz.devices('Sect.Stand-deur(1)') --  deur informatie relais K6 Phoenix
            local garageswitch = domoticz.devices('Sect.Novoferm-f(2)') --  de aansturing vd Novoferm4 op contact f
 
           -- garage sensor check kijken of de deur open is  
           if garage.state == 'Open' and garage.lastUpdate.minutesAgo > 3 then       
               domoticz.notify('','garagedeur staat meer dan 10 min open!')
               garageswitch.switchOn() -- stuurt de Novoferm4
               domoticz.log('door closed', domoticz.LOG_INFO)
           end
        
end
}

Code: Select all

 garageswitch.switchOn() -- stuurt de Novoferm4  
## doesn´t seem to be right, The switch doesn´t go on.
## and the switch must be a puls !
Last edited by PeterRozenveld on Sunday 07 July 2024 13:47, edited 1 time in total.
User avatar
waltervl
Posts: 5397
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Implant, Closing gate by hand timer reset

Post by waltervl »

What type of Domoticz device is 'Sect.Novoferm-f(2)'?
See the device list in menu setup - devices
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
PeterRozenveld
Posts: 38
Joined: Sunday 15 October 2023 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Implant, Closing gate by hand timer reset

Post by PeterRozenveld »

That's an electronic device Novoferm4 for moving the door, When you close the 2wires of the f-connection , the gate will close-stop-open-stop
The last state will be remembered , so if the last state was open-then stopped, the next move will be close!
So it need puls of 0 Ohm , ( Or Puls of 180 Ohm for ventilation = small opening)
User avatar
waltervl
Posts: 5397
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Implant, Closing gate by hand timer reset

Post by waltervl »

I need the device type in Domoticz, see menu setup - devices or on the device widget.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
PeterRozenveld
Posts: 38
Joined: Sunday 15 October 2023 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Implant, Closing gate by hand timer reset

Post by PeterRozenveld »

The device type is now an normal On/Off switch...
I think is should be kind a sort of push ? I Can´t find a good type by this real device "Novoform-4"
User avatar
waltervl
Posts: 5397
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Implant, Closing gate by hand timer reset

Post by waltervl »

How is this device "Novoform-4" connected to Domoticz? What Hardware gateway is used (python plugin?)?
Does it work when you click on the switch from Domoticz? I assumed it worked already from Domoticz otherwise it has no use to created a script with it.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
PeterRozenveld
Posts: 38
Joined: Sunday 15 October 2023 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Implant, Closing gate by hand timer reset

Post by PeterRozenveld »

It is a Fibaro "Smart Implant" :

https://manuals.fibaro.com/smart-implant/

¨SwitchImplant 1" (The Input) is connected to a relay that tells if the door is closed or open. (Hangs the input to ground)
"SwitchImplant 2" I use as Output, which should activate the via a Pulse the Novoferm4-Contacts-"F" to start moving.

https://www.novoferm.nl/fileadmin/user_ ... -50_01.pdf

The only thing you cannot influence is : which direction/ or that it stops !
When it closed last time, it will open at a pulse (at least if it is stationary). and Vise Versa. When it moves, and gets a pulse, it stops ! So we have to do Fuzzy logic method: Every 20 seconds, for example, give a pulse until the signal comes : Door Closed! ( Run time door is 16 seconds)

Note , I am already very grateful to you for the effort you put into it !!!
-----------------------------------------------------------------------------------------------
And I had a ¨pressive day¨ yesterday .
You see, I have Functional Neurological Disorder, which is when you don't take burnout seriously.
PeterRozenveld
Posts: 38
Joined: Sunday 15 October 2023 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Implant, Closing gate by hand timer reset

Post by PeterRozenveld »

Code: Select all

return {
	on = {
		timer = {'every 2 minutes'},
	},
	execute = function(domoticz)
	    local garage = domoticz.devices('Sect.Stand-deur(1)') --  deur informatie relais K6 Phoenix
            local garageswitch = domoticz.devices('Sect.Novoferm-f(2)') --  de aansturing vd Novoferm4 op contact f
 
           -- garage sensor check kijken of de deur open is  
           if garage.state == 'Open' and garage.lastUpdate.minutesAgo > 3 then       
               domoticz.notify('','garagedeur staat meer dan 10 min open!')
               garageswitch.switchOn() -- stuurt de Novoferm4
               domoticz.log('door closed', domoticz.LOG_INFO)
           end
        
end
}
This works, but garageswitch should be a puls ! (ON _OFF)
User avatar
waltervl
Posts: 5397
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Implant, Closing gate by hand timer reset

Post by waltervl »

garageswitch should be a puls ! (ON _OFF)
Perhaps something you can set on the Zwave implant device itself?
Edit: See page 14 (section 4.9) of the manual (Connection with gate opener)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
PeterRozenveld
Posts: 38
Joined: Sunday 15 October 2023 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Implant, Closing gate by hand timer reset

Post by PeterRozenveld »

No, not possible ! Must be een puls, because other buttons, (push) activate the same way ! The Implant is not the only activator.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests