Smart Home Automation Forum
KC868-H32B Parallel Actions - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1)
+--- Forum: KC868-HxB series Smart Controller (https://www.kincony.com/forum/forumdisplay.php?fid=2)
+--- Thread: KC868-H32B Parallel Actions (/showthread.php?tid=178)



KC868-H32B Parallel Actions - mfauziii - 01-09-2021

I had created a simple flow within my home assistant using toggle switch to control few switches. The switch work normally only if the switches are turn on/off one by one but when simultaneous actions triggered, only few switches are turn on/off. I attach a video for this scenario. 

Could anybody suggest a better way to make a parallel/simultaneous actions work.

Node-red flow diagram
   




RE: KC868-H32B Parallel Actions - admin - 01-09-2021

home assistant control relays indepently. suggest add a switch for control "ALL ON" and "ALL OFF" by these command.
ALL ON: RELAY-AON-255,1,1
ALL OFF: RELAY-AOF-255,1,1
more functions you can see protocol link: https://www.kincony.com/smart-controller-development-protocol.html


RE: KC868-H32B Parallel Actions - mfauziii - 01-09-2021

I have go through the protocol documentation and found that multiple relays can be turn on/off with a single request via provided masked addresses of the relays but it seem less flexible than sending a multiple requests especially when multiple flows exist and i think kind of hard to avoid from multiple requests coming in at the same time for instance perhaps 2 or more people in a house pressing different switch at the same time. 

I just need further clarification on when multiple tcp request happened simultaneously. It's critical to know the constraints or capabilities of the controller before rolling out the solution.

Here attached the debug info of my flow, 5 requests have been made, only 1 (randomly) successfully turning on/off the relay. 


   

Thanks


RE: KC868-H32B Parallel Actions - admin - 01-09-2021

i have seen your Node-Red debug information. all command almost sent at the same time. if you want to multi command, you need add a delay, not send all commands together, send command-1 , when received feedback , then begin send command-2, when received feedback, then begin send command-3.


RE: KC868-H32B Parallel Actions - mfauziii - 01-10-2021

Understood, meaning to say, I will have to manually handle queue of tasks outside of the controller, put some delay before next task can be executed.


RE: KC868-H32B Parallel Actions - admin - 01-10-2021

yes, right.


RE: KC868-H32B Parallel Actions - mirko - 01-18-2021

What is the minimum delay time between sending commands to the controller?


RE: KC868-H32B Parallel Actions - admin - 01-19-2021

two command delay >200ms


RE: KC868-H32B Parallel Actions - mfauziii - 01-31-2021

(01-18-2021, 10:56 PM)mirko Wrote: What is the minimum delay time between sending commands to the controller?

Based on my testing, 350ms is OK. Tried lowering the delay between commands, sometime few commands are not executed (inconsistent).


RE: KC868-H32B Parallel Actions - admin - 01-31-2021

CPU need time to do with command, so add delay time bigger is better.