-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[D Main.EwelinkClient ] WS connection closed while sending json string #3
Comments
Hi, you have a Json formatting problem. The string So you would use the command:
You may also have to escape the You may also find that you don’t need the brackets ie
Let me know which of these (if any) works. |
Hello Nick, thanks for your support.
also i try [D Main.EwelinkClient ] CLIENT: message received topic: /ewelink_command/1001088fc6/send_json Format looks good, but no Success |
I don’t have a B2 bulb to try, but I’ll take a look tomorrow. By the way:
Can’t work. Json expects ” around strings.
Json formatting is very specific. It might be easier to knock up a custom device for the B2, I’s fairly simple. Are the settings ‘white’, ‘read’, ‘computer’ etc names that you gave to the settings? Or are they built in? |
Ok, the problem is that it’s sending the command as a string, not Json.
Is the correct format, I need to figure out why it’s not being loaded as Json. |
Ok, found it. I just pushed a fixed version. Try pulling it now, hopefully it will now work correctly with:
|
Having looked through the code (which I haven't in a while), if the B2 gets set up as a default device, with the new version I just pushed, you could also use the command:
or
or
let me know if these commands work as expected, if so, a custom device isn't really needed. |
Dear Nick, I am very excited once again. |
Glad it's working. I don't think sending me a B2 would help as it's a Europe only product I believe (220-240V). - I'm in Canada. It did help sort out some bugs in the |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
code
{mso-style-priority:99;
font-family:"Courier New";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Vorformatiert Zchn";
margin:0cm;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLVorformatiertZchn
{mso-style-name:"HTML Vorformatiert Zchn";
mso-style-priority:99;
mso-style-link:"HTML Vorformatiert";
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
-->Hello Nick, how are you tdoay.Hope all is fine.Im Back with a smal issue of ewelink-mqtt Since a reboot of my Fhem Automatisation Unit i get the foling Output and no Connect to the api. [D Main.EwelinkClient ] received response status: 200[D Main.EwelinkClient ] received response: { "error": 403, "msg": "Sign:oauthClient enable invalid"}[E Main.EwelinkClient ] login error: 403, :None[W Main ] Client Disconnected Have you any Idea?Best Wishes, Rene Hartmann Gesendet von Mail für Windows Von: Nick WatertonGesendet: Montag, 26. April 2021 04:01An: NickWaterton/eWeLink-mqttCc: skycrack-77; AuthorBetreff: Re: [NickWaterton/eWeLink-mqtt] [D Main.EwelinkClient ] WS connection closed while sending json string (#3) Ok, found it.I just pushed a fixed version. Try pulling it now, hopefully it will now work correctly with:mosquitto_pub -t "/ewelink_command/1001088fc6/send_json" -m '{"white":{"br":100, "ct":0}}'—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.
|
New App ID and Secret was required. |
Hello,
i want change the bright of a B2 Bulb.
When i send
mosquitto_pub -t "/ewelink_command/1001088fc6/send_json" -m '{white:{br:100, ct:0}}'
the Websocket disconnected.
[D Main.EwelinkClient ] CLIENT: message received topic: /ewelink_command/1001088fc6/send_json
[I Main.EwelinkClient ] CLIENT: Received Command: send_json, device: 1001088fc6, Setting: {white:{br:100, ct:0}}
[D Main.Default ] deviceid: 1001088fc6, got command from queue: send_json, {white:{br:100, ct:0}}
[I Main.Default ] Default CLIENT: Received Command: send_json, device: 1001088fc6, Setting: {white:{br:100, ct:0}}
[D Main.Default ] send_json: for device 1001088fc6
[D Main.EwelinkClient ] sending: {
"action": "update",
"apikey": "0ea2ca0f-6b45-43ff-819a-710439769f54",
"deviceid": "1001088fc6",
"from": "app",
"params": "{white:{br:100, ct:0}}",
"sequence": "1619356129714",
"ts": 1619356129,
"userAgent": "app"
}
[D Main.EwelinkClient ] Sending command: {"action": "update", "userAgent": "app", "from": "app", "params": "{white:{br:100, ct:0}}", "apikey": "0ea2ca0f-6b45-43ff-819a-710439769f54", "deviceid": "1001088fc6", "ts": 1619356129, "sequence": "1619356129714"}
[D Main.EwelinkClient ] WS connection closed
[D Main.EwelinkClient ] Disconnecting
[D Main.Default ] deviceid: 10008ae241, process queue exited: task completed
[D Main.Default ] deviceid: 100097c066, process queue exited: task completed
[D Main.Default ] deviceid: 10009345e5, process queue exited: task completed
[D Main.Default ] deviceid: 1000920eae, process queue exited: task completed
[D Main.Default ] deviceid: 1000644d1f, process queue exited: task completed
[D Main.Default ] deviceid: 10003baa31, process queue exited: task completed
[D Main.Default ] deviceid: 100103f737, process queue exited: task completed
[D Main.Default ] deviceid: 10003baafc, process queue exited: task completed
[D Main.Default ] deviceid: 1001088fc6, process queue exited: task completed
[D Main.Default ] deviceid: 10011fcc31, process queue exited: task completed
[D Main.EwelinkClient ] exited keepalive loop
[I Main.EwelinkClient ] published: EWE-MQclient/status: Disconnected
[D Main.EwelinkClient ] Exited Receive Loop
[W Main ] Client Disconnected
The Json Output from ewelink is:
{
"__v": 0,
"_id": "608042abf4b0e20008d548c7",
"apikey": "0ea2ca0f-6b45-43ff-819a-710439769f54",
"brandLogoUrl": "https://eu-ota.coolkit.cc/logo/q62PevoglDNmwUJ9oPE7kRrpt1nL1CoA.png",
"brandName": "SONOFF",
"createdAt": "2021-04-21T15:20:11.588Z",
"devConfig": {},
"devGroups": [],
"deviceUrl": "",
"deviceid": "1001088fc6",
"devicekey": "54af3297-3bcc-4af6-9f69-4c049a6af309",
"extra": {
"id": "5f97e54a875e410cccbd4df1",
"extra": {
"apmac": "d0:27:02:11:1c:dd",
"brandId": "5c4c1aee3a7d24c7100be054",
"description": "20201027008",
"mac": "d0:27:02:11:1c:dc",
"manufacturer": "\u6df1\u5733\u677e\u8bfa\u6280\u672f\u6709\u9650\u516c\u53f8",
"model": "WTW-SNL-02",
"modelInfo": "5e7a146548af4f7140874c8e",
"staMac": "D0:27:02:11:1C:DC",
"ui": "\u53cc\u8272\u51b7\u6696\u706f\u652f\u6301\u968f\u8c03\u53ca\u573a\u666f",
"uiid": 103
}
},
"family": {
"id": "5ea82fbd3afd5d0007e0991e",
"index": -7
},
"group": "",
"groups": [],
"ip": "95.91.104.154",
"location": "",
"name": "B2 Lampe",
"offlineTime": "2021-04-24T12:16:33.528Z",
"online": true,
"onlineTime": "2021-04-25T01:01:51.461Z",
"params": {
"OTA": "success",
"bindInfos": {
"alexa": [
"0ea3ca0f-6b45-42ff-819a-710439769f54_26ca1996a20e8bd63617ab272d4eeede1d2d8e32"
],
"gaction": [
"0ea2ca0d-6b45-42ff-819a-710439769f54_ewelink-google-home-v1"
]
},
"bright": {
"br": 100,
"ct": 255
},
"computer": {
"br": 20,
"ct": 255
},
"fwVersion": "1.3.5",
"ltype": "white",
"nightLight": {
"br": 5,
"ct": 0
},
"read": {
"br": 100,
"ct": 255
},
"selfApikey": "",
"sequence": "123456789",
"staMac": "D0:27:02:11:1C:DC",
"switch": "on",
"timers": [],
"version": 7,
"white": {
"br": 39,
"ct": 0
}
},
"productModel": "B02",
"relational": [],
"settings": {
"alarmNotify": 1,
"appDoorbellNotify": 1,
"opsHistory": 1,
"opsNotify": 0,
"wxAlarmNotify": 0,
"wxDoorbellNotify": 0,
"wxOpsNotify": 0
},
"shareUsersInfo": [],
"sharedTo": [],
"showBrand": true,
"type": "10",
"uiid": 103
},
Maybe i do something wrong. Im glad for a Hint.
The text was updated successfully, but these errors were encountered: