Closed sebcsaba closed 1 year ago
Show device diagnostics
device diagnostics:
{
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2023.3.6",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.10.10",
"docker": true,
"arch": "aarch64",
"timezone": "Europe/Budapest",
"os_name": "Linux",
"os_version": "5.15.84-v8",
"supervisor": "2023.03.3",
"host_os": "Home Assistant OS 9.5",
"docker_version": "20.10.22",
"chassis": "embedded",
"run_as_root": true
},
"custom_components": {
"sonoff": {
"version": "3.3.1",
"requirements": [
"pycryptodome>=3.6.6"
]
},
"integration_manifest": {
"domain": "sonoff",
"name": "Sonoff",
"config_flow": true,
"documentation": "https://github.com/AlexxIT/SonoffLAN",
"issue_tracker": "https://github.com/AlexxIT/SonoffLAN/issues",
"codeowners": [
"@AlexxIT"
],
"dependencies": [
"http",
"zeroconf"
],
"requirements": [
"pycryptodome>=3.6.6"
],
"version": "3.3.1",
"iot_class": "local_push",
"is_built_in": false
},
"data": {
"version": "229d93a",
"cloud_auth": false,
"config": null,
"options": {},
"errors": [],
"device": {
"uiid": 1,
"params": {
"configure": [
{
"startup": "on",
"outlet": 0
},
{
"startup": "on",
"outlet": 1
},
{
"startup": "on",
"outlet": 2
},
{
"startup": "on",
"outlet": 3
}
],
"pulses": [
{
"pulse": "off",
"switch": "off",
"outlet": 0,
"width": 0
},
{
"pulse": "off",
"switch": "off",
"outlet": 1,
"width": 0
},
{
"pulse": "off",
"switch": "off",
"outlet": 2,
"width": 0
},
{
"pulse": "off",
"switch": "off",
"outlet": 3,
"width": 0
}
],
"sledOnline": "on",
"fwVersion": "1.4.3",
"staMac": "***",
"switches": [
{
"switch": "off",
"outlet": 0
},
{
"switch": "on",
"outlet": 1
},
{
"switch": "on",
"outlet": 2
},
{
"switch": "on",
"outlet": 3
}
]
},
"model": "MINI DIY",
"online": null,
"localtype": "diy_plug",
"deviceid": "1001439f62"
}
}
}
Furted, from shell:
~$ curl -X POST -d '{"deviceid": "1001439f62", "data":{"switches":[{"switch":"off","outlet":0}]}}' http://192.168.1.200:8081/zeroconf/switches
{"seq":88,"error":0}
~$ curl -X POST -d '{"deviceid": "1001439f62", "data":{"switch":"off"}}' http://192.168.1.200:8081/zeroconf/switches
{"seq":89,"error":400}
~$ curl -X POST -d '{"deviceid": "1001439f62", "data":{"switch":"off"}}' http://192.168.1.200:8081/switches
curl: (52) Empty reply from server
~$
Fixed
custom_components/sonoff/core/ewelink/local.py
in
send
, line 248, when setting up payload:in
send
, line 259, when building http url: if the command isswitch
, the API should be/zeroconf/switches