Communication protocol description of X11 firmware software package
重要通知: 自2023年起X11固件不在通过本页面发布,转到论坛发布,跳转地址(X11插座 – Shane技术之家论坛 (zhangyuqing.cn))
Listening topic:
Mqtt protocol:
-------------------------V0.1.0 && v0.1.1-------------------------
[mac_address] is your device address, for example: ecfabc6a3ef8
device/x11/[mac_address]/sensor
(This topic reports the switch status regularly)
device/x11/[mac_address]/set
(This topic is about sending control information)
device/x11/[mac_address]/status
(This topic is to report device-related information)
Details:
Device Information:
send:
{"cmd":"device report"}
response:
{"type":"x11","mac":"ecfabc6a3ef8","ip":"192.168.3.21","version":"0.1.0"}
restart your device:
send:
{"cmd":"reboot"}
control your device:
send:
{"mac" : mac_address,"plug":{"on":"1"}}
look the soft version:
send:
{"mac":mac_address,"version":"-1"}
response:
{"mac":mac_address,"version":"0.1.0"}
ota upgrade:
{"mac" : mac_address,"ota":"http://192.168.2.197:8080/oled.bin"}
http web upgrade port is: http://{your device ip}:8088
-------------------------------v0.1.2-----------------------------
Add power-off state save
Add timing function
Add delay function
look_task_0 = {"mac" : mac_address,"task":"1"};
look_task_1 = {"mac" : mac_address,"task":"2"};
look_task_2 = {"mac" : mac_address,"task":"3"};
look_task_3 = {"mac" : mac_address,"task":"4"};
task_0_data = {"mac" : mac_address,"task_0":{"hour":23,"minute":30,"repeat":127,"action":2,"on":1}}
task_1_data = {"mac" : mac_address,"task_1":{"hour":18,"minute":21,"repeat":127,"action":0,"on":1}}
task_2_data = {"mac" : mac_address,"task_2":{"hour":19,"minute":3,"repeat":127,"action":0,"on":1}}
task_3_data = {"mac" : mac_address,"task_3":{"hour":6,"minute":30,"repeat":127,"action":1,"on":1}}
delay_settings = {"mac" : mac_address,"delay":{"status":1,"action":2,"times":1}};
look_delay_settings = {"mac" : mac_address,"delay":{"status":-1}};
-------------------------------v0.1.3-----------------------------
This version is an stable version.
1. Fix the delay bug
2. Replace ip with domain name
3. Release my first stable version
-------------------------------v0.1.4-----------------------------
1. add auto check ota upgrade action
message json is :
{"cmd":"checkAutoUpgrade"}
-------------------------------v0.1.5-----------------------------
1.fix mqtt counting bug
-------------------------------v0.1.6-------------------------
1.add configure mqtt information while adding network configuration
-------------------------------v0.1.7-------------------------
1. add view mqtt info json command
send:
{"cmd":"view_mqtt_info"}
2. fix some bugs
-------------------------------v0.1.8-------------------------
1.fix mqtt reconnected failure when the network was down.
-------------------------------v0.1.9-------------------------
1. add x11 support the Apple Homekit; Homekit auth code is: 111-11-111
2. add reset the Homekit pair info using json command.
send: {"cmd":"reset_homekit_info"}
3. fix wifi AP always available for users.
4. adjust some codes
-------------------------------v0.2.1-------------------------
1. add default mqtt server info
2. add startOnlineToCloud Service
-------------------------------v0.2.2-------------------------
1. fix bugs of 0.2.0&& 0.2.1
-------------------------------v0.2.3-------------------------
1. remove something about udp
2. fix some bugs when the power and wifi is down
Connecting homeassistant config files:
[mac_address] is your device address, for example: ecfabc6a3ef8
switch:
- platform: mqtt
name: 'x11_plug_[mac_address]'
state_topic: 'device/x11/[mac_address]/sensor'
command_topic: 'device/x11/[mac_address]/set'
payload_on: '{"mac":"[mac_address]","plug":{"on":"1"}}'
payload_off: '{"mac":"[mac_address]","plug":{"on":"0"}}'
value_template: '{{ value_json.on }}'
state_on: '1'
state_off: '0'
homeassistant:
customize:
switch.x11_plug_[mac_address]:
friendly_name: x11智能开关
mqtt:
# MQTT Broker的IP地址或者域名
broker: 1.0.0.1
# MQTT Broker的端口号,缺省为1883
port: 1883
# 用户名
username: x11
# 密码
password: xxxxx
udp protocol:
The device listening port is: 10182The device sending information port is: 10181 0.0.0.0
Currently mqtt information is not configurable. If you are interested in this firmware, please contact me.