Page 1 of 1

stop command for Brel MJE24D motor

Posted: Thursday 20 June 2019 10:01
by baaspi
Hello all,

I have just started using Domoticz (on a synology NAS).
Currently I have 5 folding curtains in my house which I can open and close by using Domoticz. these are configured as blinds in the switch tab.

Now I want to implement another feature of these curtains in domotics.
By pressing and holding the 'stop' button on the original remote for about 3 seconds these curtains will move to a middle position.

pressing the stop button in the switch tab a couple of times triggers the curtains to move to the middle position.

I do not know how to implement the 'stop' command in dzVents.

below is the code used to test this. when a dummy switch is set 'on', the curtain moves upwards and after 5 seconds it should stop.
currently the stop command is not recognized. An I see the following error in the log:
2019-06-20 09:30:27.164 Status: dzVents: Error (2.4.19): An error occured when calling event handler Script #1 Vouwgordijnen open op tussenstand
2019-06-20 09:30:27.164 Status: dzVents: Error (2.4.19): ..._scripts/Script #1 Vouwgordijnen open op tussenstand.lua:12: attempt to call field 'switchStop' (a nil value)

Code: Select all

return {
	on = {
		devices = {
		    'Dummy gordijnen open'
		    }
	},

	execute = function(domoticz, switch)
	    if (switch.state == 'On') then
	        domoticz.log('Goodmorning, gordijnen op tussenstand')
	        domoticz.devices('Vouwg. Keuken achterzijde').switchOff()
	        domoticz.devices('Vouwg. Keuken achterzijde').switchStop().afterSec(5)
	    else
	        
	    end
	end
}
Does anyone knows how to send a 'stop command'?

Re: stop command for Brel MJE24D motor

Posted: Thursday 20 June 2019 20:24
by waaren
baaspi wrote: Thursday 20 June 2019 10:01 I do not know how to implement the 'stop' command in dzVents.

Code: Select all

domoticz.devices('Vouwg. Keuken achterzijde').switchStop().afterSec(5)
Does anyone knows how to send a 'stop command'?
From the wiki
Did you try this ??
the method stop() ?

Code: Select all

domoticz.devices('Vouwg. Keuken achterzijde').stop().afterSec(5)

Re: stop command for Brel MJE24D motor  [Solved]

Posted: Thursday 20 June 2019 23:02
by baaspi
Thanks,

This works, I am now able to stop the moving curtains.
I tought I tried this command before but I forgot the '()' after stop.
lets see if I can find a way to send this command a couple of times to mimic the middle position command.

Re: stop command for Brel MJE24D motor

Posted: Sunday 20 October 2019 19:34
by dude
Hi Baaspi,

Did you find the solution to send the command for the mid position ?

Thx

Dude

Re: stop command for Brel MJE24D motor

Posted: Thursday 30 April 2020 20:53
by dude
Although new software versions of RFXcom do have a command to move the curtain to an intermediate position.
I've not found a way to directly send this command from domoticz
The workaround which I found and which is working now for me, is repeatedly sending the stop signal.

Code: Select all

return {
	on = {
		timer = {
				'45 minutes before sunrise',
			}
	},
	execute = function(domoticz, timer)
	    domoticz.devices('Gordijn').switchOff()
	    domoticz.devices('Gordijn').stop().repeatAfterSec(1, 5)
	end
}