can you please run through your process in wireshark to get the packets needed?
I can’t seem to get the packets in a usable format
I had heaps of problems also, I put it down to UDP packets going from source to destination in the WI-FI network and not traversing the LAN network. So I added a second WI-FI AP to my network and connected my phone to that network. I then set my Cisco switch to ‘port mirror mode’ for the new AP switch port, so RX and TX where duplicated to the port Wireshark was listening on. The App sends a UDP packet to the switch on port 18530, the switch then sends a ‘UDP 18530’ back to the App. If the state changes the switch also sends a UDP packet to broadcast. The switches also send a ‘current status’ UDP packet to broadcast every 30 seconds… Without the encryption code the status messages are useless.
In Wireshark, ‘copy’ the data block from the UDP packet . For nc (netcat) you need to convert the byte stream into another format using the ‘\x’ separator .eg for the Wireshark byte stream 0140accf238bfaaffafaaffaaffaaffaaffaaffaaffaaffaaf , The converted stream needs to be \x01\x40\xac\xcf\x23\x8b\xfa\xaf\xfa\xfa\xaf\xfa\xaf\xfa\xaf\xfa\xaf\xfa\xaf\xfa\xaf\xfa\xaf\xfa\xaf
So the final command is ‘echo –n –e “\x01\x40\xac\xcf\x23\x8b\xfa\xaf\xfa\xfa\xaf\xfa\xaf\xfa\xaf\xfa\xaf\xfa\xaf\xfa\xaf\xfa\xaf\xfa\xaf” |nc –w1 –u 10.10.0.1 18530
@MarkPartlett thanks for sharing your experience, you’ve inspired me to go down this path and give this switch a go.
Looks like the learning curve to get this working is steep (I’m not a developer btw). If you don’t mind can you help me through this process and I’ll gladly share my experience on this forum for the benefit of others.
This is an amazing cheap devices and it being AUS compliant is mind blowing. Home Assistant integration… game changer!
Did you guys get this working, looking at them also…seeing as they may have some broadlink compatibility has anyone tried: https://github.com/eschava/broadlink-mqtt Maybe it will have some pointers for you homeassistant code.
I forked this project to make updates for use with mulitple devices,
@psyciknz note the MS6126 device is not a Broadlink device so I don’t think it’ll work (the MS6124 and MS6122 are broadlink devices).
I just bought a MS6126 from Jaycar so looking forward to seeing how these will work via UDP sniffing in the coming days.
Did you manage to get anywhere with that power monitoring version? I’m just trolling to decide if I want one and to hack around, or take the road easier travelled and just extend my zwave network.
The price difference is considerable though. But there is something to be said for convenience - zwave works, no need to block outgoing connections, no need for bridging software etc.
More than willing to help; " http://blog.giuliomontagner.com/post/155085663708/trying-to-hack-ankuoo-rec-switch-and-make-it " has everything you need. if promiscuous mode in wireshark doesn’t work… you might need to setup a “man in the middle” method of capture.
@MarkPartlett thanks for that. I’ve figured that I’m able to issue an ON and OFF command from home assistant using “google assistant webserver” hassio addon. This saves the need for me to wireshark UDP packets.
Did you manage to figure a way to capture the switch’s status? I can see the Google Assistant can ask “is the switch on” and it’ll respond correctly however how do I get status information into home assistant?
I’m a bit confused, what is the message broadcasted with the webserver addon that interacts with a switch on the network?
I can’t use the instructions in the link by MarkPartlett due to using OSX.
@CampbellFabrications refer here Community Hass.io Add-on: Google Assistant Webserver (broadcast messages without interrupting music)
@MarkPartlett,
Would you be so kind as to elaborate on how you used switch.command_line to control your Ankuoo REC switches? I have some of these and have been banging my head against the wall trying to figure out how to integrate them with HA so any help would be greatly appreciated.
Thank you!
just picked up a ms6124 at jaycar and have been trying to get this setup through hassio as a sp2 broadlink device (using the custom component here: Broadlink SP3S Power consumption sensor) but have had no luck.
I’ve also tried the broadlink to mqtt python program here: https://github.com/eschava/broadlink-mqtt. It detects the device (as Unknown, though), and connects to it, but no power consumption is listed (only as None).
Anybody have any thoughts if these devices are capable of power metering through home assistant?
Hi everyone.
This is the first time I have used this chat. I have 8 of these Ankuoo MS6126. About 12 months ago I purchased 5 and installed very easily. To add the 5 Wi-Fi switches to the REC app was too easy. I used the 2.4G Wi-Fi with security mode WPA2 PSK. About 12 months later I purchased another 3. Before I install these 3, I set them up on my test bench wired up and tried to connect / add the 3 new Wi-Fi switches to the REC app. Everything I tried failed to add the device to the App. Nothing has changed with my Wi-Fi hardware and software and is all the same as what was there when I connected the first 5 a year prior. The 3 new Wi-Fi switches make all the correct noises when trying to add to the REC app but then says “device not found”
After hrs of playing with modem settings and trying to get these to connect I changed my Wi-Fi security to NONE and the 3 Wi-Fi switches added with no issues. I can’t run my Wi-Fi without security. I changed the Wi-Fi security to WPA2 PSK and still have the original connection issues. We checked the password many time and it is correct. I even shorten the password to 8 characters still no good. I booted all Wi-Fi devices off my network to make sure there wasn’t to many devices on my network and still no change. I even turned my Guest Wi-Fi on, connected my phone and tried to connect the Wi-Fi switches with and without security but still no joy.
Can anyone help?? Has anyone else had these issues?
do you have VLAN?
do you have 2.5mhz and 5mhz wifi using same ssid?
do you have special character in password? try 11111111
You switches are purchased many month apart and may be same model but different version with different firmware. you may better contact APP maker and report this issue and see if they have recommended action.
Hi
Not sure about VLAN.
Yes have 2.4 and 5 on the same SSID. I did make sure that the phone was connected to 2.4. Yes the password has got special characters so I also changed the SSID to 123456789. Still didn’t like it.
I even connected to the Wi-Fi switch with no security updated firmware on Wi-Fi switches and changed back to the WPA2 PSK but still made no change.
Do you know the APP maker contact details?
Try make unique 2.4 ssid and see if that make difference
If possible, can you compare software versions for other switches?
contact Ankuoo support. Should be on their website
My broadlink didn’t work because my 2.4 and 5.0 wifi were the same ssd. I had to disable the 5.0 radio then reboot my phone to get it to connect after which i was able to re-enable it.
Ok thanks for the help. I’ll give that a go.