How to Operate GWF-S171 WIFI Plug Using Raspberry Pi

I bought several See-Time GWF-S171 (wifi sockets) to work with my Raspberry Pi. I use my Raspberry Pi as a home automation platform and I have managed to connect all sorts of devices, smart meter, solar panels, Orvibo s20 (also Wifi connector).

Now I cannot connect to the wifi socket. I was monitoring all traffic between my iPhone using Wireshark and tcpdump (the socket is using the app - WeConn) and I was able to find the status using tcpdump, I also found out that all traffic is going on UDP port 9957.

Easy way to check if devices are on, code: sudo tcpdump -xn port 9957 |grep 0x0050

0100 means 0000 means off. But turning the connection on or off didn't help. So any help on this would be really appreciated.

+3


source to share


2 answers


I played with "OGEMRAY S171". It seems to be the same model.

You can send different TCP packets to socket port 9957:

Install as Admin:

0101100148000000010000005c6c5c6c0000000000000000000000000000000000000000000000000000000000000000xxxxxxxxxxxx0000feff0000xxxxxxxxxxxx000000000100

      

Include:

0101010180000000010000005c6c5c6c0000000000000000000000000000000000000000000000000000000000000000xxxxxxxxxxxx0000000000000000000001000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

      



Switch off:

0101010180000000010000005c6c5c6c0000000000000000000000000000000000000000000000000000000000000000xxxxxxxxxxxx0000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

      

Get information:

0101030138000000010000005c6c5c6c0000000000000000000000000000000000000000000000000000000000000000xxxxxxxxxxxx0000

      

Where in the above examples xxxxxxxxxxxx

is the MAC address of the device sending the packets. I tried it with the "TCP / UDP Terminal" Android app. Sending packages from a Windows laptop using a "package carrier" was not successful.

There is also an "internet mode" in which the application (I am using an android application) sends TCP packets to an external server (in my case it is 52.28.78.96) on port 9955. These packets are a little different, but I think this mode is not interesting for your problem.

+2


source


If anyone is interested, I wrote a Homebridge plugin for devices like the S171. https://github.com/loki29pl/homebridge-weconn



+1


source







All Articles