Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Kincony KC868-H32B Hang with momentary Switches
#1
Hello,

When I use the momentary switch of a relay in combination with Mqtt, I am able to make the kincony ethernet "hang".


It seems to occur when the Kincony had to process commands during the momentary switch.
  - Note: while I do not receive the state on mqtt, the relay have well-executed the momentary switch
  - When a bug occurs:
     - the ethernet is completely stuck; no ping, no HTTP server, no mqtt
     - HTTP UI for wifi (on another IP is still working)
     - Only possible recovery is a Hard reboot (reset of wifi is not working)


My reproduction method: 
 - Put Relay1 with momentary switch 1 seconds
 - send 2 mqtt command:
    - `mosquitto_pub -t "relay32/dddd/set` -m "{\"relay1\":1}" 
    - `sleep 0.5`
    - `mosquitto_pub -t "relay32/dddd/set` -m "{\"relay1\":1}"


I also reproduced it with the embedded HTTP page just by insisting when relay state is "wrong".

I tried to update to the latest version (44) but it does not seem to help.


Have you any idea on how to mitigate that?
Reply
#2
what load you connect to relay? can you take a photo or draw a diagram?
Reply
#3
Sorry for the delay.


In order to keep things easy, I disconnected the load.



The reproduction method with nothing connected over the kincony relay:

 - Relay 15 is configured as momentary 1s

 - Only ethernet use mqtt (wifi is not using MQTT)




     


Note:
 - Command on relays without momentary have never experienced the issue.
 - I tried to use HTTP requests and never be able to reproduce the issue




I'll continue to make more tests, maybe the payload mqtt is not good but this is the one we see in Home assistant tutorial
Reply
#4
mqtt payload you can see this link: https://www.kincony.com/download/KC868-H...ommand.pdf
Example
A. turn ON relay1:
Send: Payload={"relay15":{"on":1}}
B. turn OFF relay1:
Send: Payload={"relay15":{"on":0}}
on:1 is ON,

before when you have issue, what load you have connected with relay output terminal? if have connect with AC contact, H32B need add "RC snubber" for kill interference signal from contact's coin.
Reply
#5
So I am sending the right command with:

Code:
mosquitto_pub -h 192.168.178.111 -t relay32/4ab843d38a5a21ae54def363/set -m "{\"relay15\":{\"on\":1}}"

But still the module hangs (only ethernet) even with nothing connected


I'll try to activate wifi MQTT but I prefer to use ethernet which is far more reliable normally.

The history of the kincony:
  - Load 220AC ~1A
    - Ethernet MQTT
    - No momentary switch
  - Load 24VAC ~0.2A
    - Momentary 1 second
    - ethernet MQTT
    - Never got it working, always crash if we send too fast a command (and sometimes it crash at the first message) as shown on my video above.

For now, I cannot use MQTT+Momentary reliably.

I'll try with Wifi Mqtt and if not working use HTTP Post to switch states.

Edit:
 - wifi+Ethernet on MQTT does not help
 - HTTP posts make the system also fail after several requests
   - my request is the same as the one in the web-ui

Code:
curl http://192.168.178.200/sw_ctl.cgi\?Relay15\=ON\&postpwd\=12345
Reply
#6
not send command to fast, every command need a delay time. can you take a video and send whatsapp number: +86-15381188302 to us, so that we can easy to chat and help you.
Reply
#7
For others to know:
 - The first answer seems to be the right one.

By switching the relay probably emits EMC -> It crashes the CPU of the kincony,


The solution we have: 
  - Add an RC snubber on each relay to reduce the noise.
  - (worked at home) Reverse polarity of the switch (Put negative bellow and positive above)
      - probably no the best solution but allows working without snubber.
Reply
#8
whether work well now?
Reply
#9
Yes, still it wasn't expected to `dies` without notice due to EMC.


Note 2: the watchdog is not enabled? (for rebooting over a crash)
Reply
#10
That was interference, which made the Ethernet chip crash, but the CPU did not crash. Therefore, RC snuber can kill this interference signal is used.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)