Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC868-A64 output changes are slow
#1
I would like to control groups of outputs quickly. E.g. set output1, output2, output3,... output15 to on, rest to off.
I'm mainly interested in wired ethernet connection (I expect it to give better results than WiFi).

I've expected the string format of TCP client/ TCP server would be best because the commands are quite compact. However, those protocols are not stable for me and are causing frequent disconnections.
Are there some protocol constraints like, wait until reply was received or something like that? How does the board recognize the end of the command anyways (there are no specifications about command delimiters, so packet fragmentation can cause issues here)?

Then I've tried MQTT but setting e.g. the mentioned 15 outputs takes non-trivial time (I would estimate ~500ms?). 
The MQTT command I've used is this one 
Code:
{"output1":{"value":true},"output2":{"value":true},"output3":{"value":true},"output4":{"value":true},"output5":{"value":true},"output6":{"value":true},"output7":{"value":true},"output8":{"value":true},"output9":{"value":true},"output10":{"value":true},"output11":{"value":true},"output12":{"value":true},"output13":{"value":true},"output14":{"value":true},"output15":{"value":true}}

I've mostly used firmware 1.0.27
Are there any alternative firmwares to try (I've also tested TCP protocols on 2.2.2 with the same result)? Is there some open source firmware I can use and tweak for my usecase? I don't need most of the "smart" logic of the board, I just want to be notified very quickly about input changes and be able to quickly control the outputs.

Thank you in advance!
Reply
#2
you can use one mqtt command for multi channel ON or OFF. such as output1-15 ON:
Code:
{"output1":{"value":true}},{"output2":{"value":true}},{"output3":{"value":true}},{"output4":{"value":true}},{"output5":{"value":true}},{"output6":{"value":true}},{"output7":{"value":true}},{"output8":{"value":true}},{"output9":{"value":true}},{"output10":{"value":true}},{"output11":{"value":true}},{"output12":{"value":true}},{"output13":{"value":true}},{"output14":{"value":true}},{"output15":{"value":true}}

output 1-15 OFF:
Code:
{"output1":{"value":false}},{"output2":{"value":false}},{"output3":{"value":false}},{"output4":{"value":false}},{"output5":{"value":false}},{"output6":{"value":false}},{"output7":{"value":false}},{"output8":{"value":false}},{"output9":{"value":false}},{"output10":{"value":false}},{"output11":{"value":false}},{"output12":{"value":false}},{"output13":{"value":false}},{"output14":{"value":false}},{"output15":{"value":false}}

here is tested by MQTTBOX tool:
   
   
Reply
#3
Photo 
You don't understand me. I know that I can send multiple values via mqtt. But as I wrote, it is slow. You can see individual LEDs appearing one by one. 
[Image: ezgif-3-5f16c8379f.gif]

If I use TCP Client, the response is instant, BUT the protocol is not stable and disconnects after less than 10 seconds.
[Image: ezgif-3-2c1c332c02.gif]

How can I make the TCP Client protocol stable? Or how can I achieve the same speed via mqtt?
Thank you!
Reply
#4
because we add the delay time, it protect the power supply, if 64 channel output all turn ON at the same time, it's not good for power supply, it will have impact for power supply.
Reply
#5
But with RELAY-SET_ALL-255,0,0,0,0,255,255,255,255 there is no delay, so why it can't be the same with mqtt?
Reply
#6
now mainly use by mqtt. you can let A64 work as TCP Server mode, then you can use client to send RELAY-SET_ALL-255,0,0,0,0,255,255,255,255
Reply
#7
(01-21-2024, 12:42 PM)admin Wrote: now mainly use by mqtt. you can let A64 work as TCP Server mode, then you can use client to send RELAY-SET_ALL-255,0,0,0,0,255,255,255,255

I would like to use it that way, but TCP Server disconnects after only a couple of commands, so it is not reliable.
Reply
#8
between every command , you need add delay time, do you have fast send command to board? can you take a video of your problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)