当前位置:网站首页>Using tcp/udp tools to debug the yeelight ribbon
Using tcp/udp tools to debug the yeelight ribbon
2022-06-25 00:26:00 【a10615】
Use TCP/UDP Tool debugging Yeelight Lamp with
This article describes how to Windows Next , Use TCP/UDP Tool debugging Yeelight Lamp with
preparation
TCP/UDP Debugging tools
Yeelight WiFi Light Inter-Operation Specification
One 、 Search device
Search device , By sending multicast search commands to the LAN , The device will respond after receiving , Return the current status information of the device
1、 establish UDP Multicast connection
According to the document search command
M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1982
MAN: “ssdp:discover”
ST: wifi_bulb
- type : choose UDP Multicast
- The goal is IP: Keep multicast identity IP Group 239.255.255.250
- port :1982
- Local port :1982( The device response is this port , Can't change )

2、 Send multicast search command
After creating the connection , Copy the search command to the sending area ( Line break , use Ctrl+Enter)
then “ send out ”, Wait for device response
3、 Device response
After sending , If a device is online , Generally, the response can be received immediately . The receiving area is the response of the device 
Two 、 Equipment online notification
If the equipment is equipped with network , When accessing the network, the online notification will be sent through multicast . It's the same as searching , Create the same connection , Wait for the device to go online .
In receiving area , Can receive the notification after the equipment goes online ( When the same device goes online , Maybe several times , I have received 3 Time . Different from the search response , See documentation )
3、 ... and 、 Control equipment
1、 establish TCP Connect
Based on search or online notification ip、port Information , establish tcp Connect 
2、 dispatch orders
Input command in the sending area ( The command ends with a new line <Ctrl + Enter>)
Such as : Switch the switch state of the equipment
{
"id":1,"method":"toggle","params":[]}

3、 Device response
After the device receives the command , Will respond to the operation results of the command , If the operation is successful , Notification messages are also sent
# Operating results
{
"id":1, "result":["ok"]}
# Notice information
{
"method":"props","params":{
"power":"off"}}

If the Yeelight Interested in , You can contact us :[email protected]
边栏推荐
- Qiniu cloud uploads video to get the first frame of video
- 5-minute NLP: summary of 3 pre training libraries for rapid realization of NER
- Wallpaper applet wechat applet
- 2021-02-15
- Related operations of ansible and Playbook
- [interview question] what is a transaction? What are dirty reads, unrepeatable reads, phantom reads, and how to deal with several transaction isolation levels of MySQL
- ros(25):rqt_image_view报错Unable to load plugin for transport ‘compressed‘, error string
- 【排行榜】Carla leaderboard 排行榜 运行与参与手把手教学
- Encryption and encoding resolution
- Human body transformation vs digital Avatar
猜你喜欢
Microsoft won the title of "leader" in the magic quadrant of Gartner industrial Internet of things platform again!

Applet opening traffic master

Unmanned driving: Some Thoughts on multi-sensor fusion

What is the difference between one way and two way ANOVA analysis, and how to use SPSS or prism for statistical analysis

How to quickly open traffic master for wechat applet

Working principle analysis of kubernetes architecture core components

C WinForm maximizes occlusion of the taskbar and full screen display

无人驾驶: 对多传感器融合的一些思考

Registration method of native method in JNI

Virtual machine - network configuration
随机推荐
Difficult and miscellaneous problems: A Study on the phenomenon of text fuzziness caused by transform
UE4 WebBrowser chart cannot display problems
Analysis report on development trend and investment forecast of global and Chinese D-leucine industry from 2022 to 2028
Several ways for wechat applet to jump to the page are worth collecting
Paper review: U2 net, u-net composed of u-net
@mysql
Related operations of ansible and Playbook
Common redis commands in Linux system
C# 闭包的垃圾回收
Go crawler framework -colly actual combat (III) -- panoramic cartoon picture capture and download
Single blind box removal, social blind box and friend blind box program source code
Jar package merging using Apache ant
Apk decompiled method (not confused)
Go crawler framework -colly actual combat (4) -- Zhihu answer crawl (2) -- visual word cloud
2021-11-07
Kubernetes 架构核心组件工作原理解析
Use coordinatorlayout+appbarlayout+collapsingtoolbarlayout to create a collapsed status bar
The picture of wechat official account can not be displayed normally
2019 summary and 2020 outlook
C# Winform 最大化遮挡任务栏和全屏显示问题