Page 2 of 2
Re: Improve 433Mhz reliability
Posted: Monday 03 April 2017 20:15
by jvdz
You have "All" in the event dropdownbox instead of "Device"!
Jos
Re: Improve 433Mhz reliability
Posted: Monday 03 April 2017 20:24
by Derik
mmm sorry..
Change this..
Now i got no error.
Only should i see in the log a message?
Or is this option without a log message?
See also in the log of the device no 3 time switching..
Edit:
Got it..
The test device was not in the script [ sorry ]
Look promising!!
! question..
When i have a lot of devices.
All in 1 lua or multiple lua's?
xxx
Thanks
Re: Improve 433Mhz reliability
Posted: Monday 03 April 2017 22:01
by gerard76
You can put all devices you want to use the script for in this script. The lookup is very fast.
Re: Improve 433Mhz reliability
Posted: Tuesday 04 April 2017 19:05
by Derik
mm
looks that all was working ok....
Only now i see every x time the script..
Only the strange thing..
I do not set a switch into a other position:

- ScreenShot213.jpg (170.99 KiB) Viewed 2696 times
Re: Improve 433Mhz reliability
Posted: Tuesday 04 April 2017 19:20
by jvdz
Looks like you created an indefinite looping script logic. Can you share the script to see we can spot the issue?
Jos
Re: Improve 433Mhz reliability
Posted: Tuesday 04 April 2017 19:24
by gerard76
Did you create a corresponding user variable?
Re: Improve 433Mhz reliability
Posted: Tuesday 04 April 2017 19:28
by Derik
double check everything...
I did not have 1 device in the variable list...
Did ad this one
Now it is working ok again..
Thanks for the fast support.

Re: Improve 433Mhz reliability
Posted: Wednesday 05 April 2017 13:50
by markk
Hi. I had quite a few issues with switches not triggering. Not too much of a problem when at home but sometimes timers for my lights, blinds etc didn't work whilst I was away which I wasn't happy about. I got around this by setting two or three timers to activate the same device at one minute interval but it wasn't ideal, and only worked with timers. I didn't help when we'd walked out to the shed and opened the door only to find the light didn't come on as it should. I knew I'd be for the silent treatment for a while every time I looked out of the lounge window to see my wife'e angry face as she stood there opening and closing the shed door a number of times trying to get the light to come on!!
I followed this thread with interest and had a go at implementing this script and the variables yesterday. All seemed to work really well with switches but my blinds weren't happy this morning. They were set to open as usual with the timer on the switch at 7.15 but they started to open, stopped, started then stopped again leaving them all open just about 2 inches. I'll test further tonight to see what exactly is happening but wondered if there might be a solution to this.
Re: Improve 433Mhz reliability
Posted: Wednesday 05 April 2017 22:13
by gerard76
I do not have any blinds myself. This script just repeats the last command. Apparently sending the 'Open' command multiple times has an unexpected effect. Can you confirm that? If you press 'Open' multiple times on the remote, what happens? I could delay the repeat for blinds.
Re: Improve 433Mhz reliability
Posted: Wednesday 05 April 2017 23:29
by markk
Ok, I did some testing. Strangely, the script means that when an on or off switch is pressed it is followed by three stop commands. however, pressing the remote or the switch in domoticz multiple times just send multiple ons or offs

Re: Improve 433Mhz reliability
Posted: Thursday 06 April 2017 7:26
by gerard76
Weird. It just repeats what it sees. It doesn't even know the concept 'Stop' without picking it up from a signal that is send by the remote or domoticz.
I cannot test what happens because I do not have your setup so you're on your own...

You could take out the blinds and have the script do the lights which work fine.
Re: Improve 433Mhz reliability
Posted: Thursday 06 April 2017 12:56
by markk
Ok,
It's not a major issue. I've removed the blinds from the script. The blinds are set on timers anyway so i've just set three of them to trigger one minute apart. Script works great for the lights and switches though. Thanks for this.
Re: Improve 433Mhz reliability
Posted: Sunday 30 April 2017 9:52
by Derik
Dear all,
I think the script is eating the Memory of my Cubieboard...
When i start using it's looks that my memory is sky high...
Anybody else have this experience??

- ScreenShot221.jpg (103.33 KiB) Viewed 2472 times
Re: Improve 433Mhz reliability
Posted: Tuesday 09 October 2018 20:15
by gerard76
Translated to dzVents for fun and succinctness. Also removes the need to create domoticz user variables.
Code: Select all
return {
on = {
devices = { 'A1', 'A2', 'TV' }
},
data = {
'A1', 'A2', 'TV'
},
execute = function(domoticz, device)
if domoticz.data[device.name] ~= device.state then
domoticz.data[device.name] = device.state
device.setState(device.state).repeatAfterSec(1)
end
end
}