Delay in On-Off

Support questions for server and client (Windows, iPhone, Android, Linux)
Post Reply
cyberde
3 stars
3 stars
Posts: 61
Joined: Thu 11 Apr 2013, 08:00
Location: The Netherlands
Contact:

Delay in On-Off

Post by cyberde » Wed 17 Apr 2013, 08:20

I am having the folowing problem with light switches and remotes.
It sometimes happens when you press off instead of on when you want to turn on the light, and right after pressing Off you press On (or a motion sensor registers no movement and quickly afterwards it does). Now somehow, SwitchKing only registers the Off event and not the On event if the signals are sent quickly after each other (as in around 1 second). I do see the Telldus Duo registering the signal because of the blinking blue light.

I have been tinkering with the advanced settings and currently set the Send count to 3, Send interval to 500 ms and Receive delay to 100ms. But this doesn't solve my problem.

Do you have any other idea's?

Also, my switches are from KlikAanKlikUit (Self learing On/Off), but SwitchKing sees them as Nexa (Self learing On/Off) when creating a data source. When I manually change them to KliKAanKlikUit; SwitchKing doesn't update the values anymore until I change them back to Nexa again.

Martin
Administrator
Administrator
Posts: 2655
Joined: Tue 09 Nov 2010, 20:25

Re: Delay in On-Off

Post by Martin » Wed 17 Apr 2013, 09:06

The problem with the On event not being registered has to do with solving an issue that some data sources sometimes sends out multiple identical events during several seconds. There is a setting that is not visible in the client that sets time value for this threshold in milliseconds. By default, it is set to 2500ms (2.5 seconds).

If you see the fast switching as a problem, you can lower this value by creating a text file containing the following text:

Code: Select all

UPDATE SystemSettings SET SystemSettingValue = '1' WHERE SystemSettingName = 'IdenticalEventsTimePeriodThreshold';
Save the file, stop Switch King's services and start ServerGUI.exe (found in the server installation directory). The click "run script" and browse for the file.
If you want to reset to the default value after testing, change the part "SystemSettingValue = 1" back to "SystemSettingValue = '2500'".

The KlikAanKlikUit devices are actually using the same protocol as Nexa. When Switch King (or the Duo) intercepts a signal from your remote, the signal does indicate the protocol (Archtec - used by several vendors) but does not know the brand of the remote or device.
Switch King then picks the first type of device in combination with brand or vendor that is matching the specific protocol, which happens to be Nexa. That it says "Nexa" instead of "KlikAanKlikUit" does not affect the function itself, and there is - unfortunately no way to detect "KlikAanKlikUit".
Martin | Switch King

cyberde
3 stars
3 stars
Posts: 61
Joined: Thu 11 Apr 2013, 08:00
Location: The Netherlands
Contact:

Re: Delay in On-Off

Post by cyberde » Wed 17 Apr 2013, 09:21

Hi Martin,

Thank you very much for your elaborate explanation, perfect service!
It is indeed a problem I have with motion sensors, which turn the light off and you wave your arm and it doesn't turn on again until the motion sensor sends the Off signal again and later the On signal.

I have ran the script on my installation, changing it to 500ms. I will test it tonight if it has solved some issues, if not I will lower the value even more.

Also thank you for the explanation of the KlikAanKlikUit devices, I have figured something like that as well and changed them all back to Nexa or SwitchKing wouldn't update my data sources.

All in all I am very satisfied with SwitchKing, especially it's so easy to write plugins for it to integrate my home automation system with SwitchKing! You have another lifetime license buyer here ;) Looking forward to next releases!

Martin
Administrator
Administrator
Posts: 2655
Joined: Tue 09 Nov 2010, 20:25

Re: Delay in On-Off

Post by Martin » Wed 17 Apr 2013, 09:31

Thanks for the feedback :)

However, your motion detector problem should be possible to solve (or at least improve) by setting a value that forces the rule to be active a minimum amount seconds/minutes/hours after activation (minimum fulfilled duration).
If you set the minimum fulfilled duration to like 10 minutes, you can set the detector to be active for 1 minute only. The "Off" signal sent by the detector will not turn off the lights until 9 minutes later after the "Off" signal being sent. This gives you 9 minutes of "grace period" in which it is more likely that you trigger the detector (thereby extending the period another 10 minutes) before Switch King turns off the lights.
Martin | Switch King

cyberde
3 stars
3 stars
Posts: 61
Joined: Thu 11 Apr 2013, 08:00
Location: The Netherlands
Contact:

Re: Delay in On-Off

Post by cyberde » Wed 17 Apr 2013, 09:52

Thanks again, that also sounds like an extra solution to the motion detector problem. I have set this up as well now. The other one, changing the IdenticalEventsTimePeriodThreshold setting will most likely solve my "problem" with the wall switches and such. Will test this tonight when I get home.

Another question, will there be a easier way of editing the rules in a future version? Now we need to go to a schedule, rules tab, edit rule. If would be very handy if rules would be accessible through the Open button too :)

tomas
Administrator
Administrator
Posts: 419
Joined: Tue 09 Nov 2010, 20:41

Re: Delay in On-Off

Post by tomas » Sun 21 Apr 2013, 21:38

cyberde wrote:Another question, will there be a easier way of editing the rules in a future version? Now we need to go to a schedule, rules tab, edit rule. If would be very handy if rules would be accessible through the Open button too
Thanks for the feedback, but it is not something we have planned for the near future unfortunately. We have some ideas of providing a better overview of why a device is on, but have not yet found time to implement that.
Tomas | Switch King

cyberde
3 stars
3 stars
Posts: 61
Joined: Thu 11 Apr 2013, 08:00
Location: The Netherlands
Contact:

Re: Delay in On-Off

Post by cyberde » Thu 16 May 2013, 10:19

Hi Tomas,

Thank you very much for your help. It seems that it is receiving signals better/faster now. Is it a limitation that when SK is sending a signal to a dimmer (repeat it 3 times with 300ms interval) it cannot receive signals from a switch?

Martin
Administrator
Administrator
Posts: 2655
Joined: Tue 09 Nov 2010, 20:25

Re: Delay in On-Off

Post by Martin » Thu 16 May 2013, 12:11

cyberde wrote:Is it a limitation that when SK is sending a signal to a dimmer (repeat it 3 times with 300ms interval) it cannot receive signals from a switch?
Yes, this is a limitation, but it is a limitation in the TellStick - or rather a protocol limitation. Since sent and received signals are both using the same frequency, a sending device blocks other sending devices while transmitting data.
Martin | Switch King

cyberde
3 stars
3 stars
Posts: 61
Joined: Thu 11 Apr 2013, 08:00
Location: The Netherlands
Contact:

Re: Delay in On-Off

Post by cyberde » Thu 16 May 2013, 12:41

Thanks again for the explanation, makes sense.
Most of the time it still works if the signal is sent from the switch while SK is sending three signals to a receiver. If the signal is received between the send intervals, SK will switch on the other light after it has completed sending the signals to the receiver :)

Also what are the most optimized settings? Sometimes I have to "synchronize" a receiver because it didn't receive the ON/OFF signal. I guess this could be caused by another device sending at the same time?

Martin
Administrator
Administrator
Posts: 2655
Joined: Tue 09 Nov 2010, 20:25

Re: Delay in On-Off

Post by Martin » Thu 16 May 2013, 13:46

Unfortunately, there are no optimal settings that cover each setup, since the best settings are depending on the type of interference and what transmitting devices you have in your environment. IR detectors and certain temperature sensors "spam" the air with signals.

You can either delay the outgoing signals from Switch King so that transmitting devices can finish before Switch King sends a signal that is triggered by a received signal (which you have already done), increase the number of repetitions or adjust the time between outgoing signals. All of these parameters can actually help you "zoom in" on a window where no device is broadcasting, but which combination that is best is best determined by trial and error (again - since your environment is different from others).

As an additional step, you can configure synchronization so that synchronization signals are sent to your devices every "X" minutes. The devices that always work can have their synchronization option turned off, so that devices that are close to the outer range or often affected by noise can be synchronized more frequently - like every 5 or 10 minutes.
Martin | Switch King

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests