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
TP Link Smartplug doesn’t seem to be working #158
Comments
Hi Hedrakk, Couple of questions to gather more info and help troubleshoot this.
Thanks, |
Gaston,
1. The debug logging was already ON. From what I can seen in the log file, everything seems to be fine.
2. The actual “button” doesn’t seem to be a button at all: I could be clicking on it all day long and it wouldn’t do a thing. I’m not getting in feedback whatsoever.
3. As I said, I’m not getting any feedback from the app. Here’s a screenshot:
Hum, I tried to send you once with the screenshot and i got an email delivery error message. I’m trying to send the email again without the screenshot. Please tell me how to send you this screenshot correctly.
I can’t test it right now because I’m in the middle of a print job, but if you have suggestions, I will try them once it’s finished.
Thanks.
Jean-Francois Chabot
…__________________________________
Capitaine
Equipe Extra-Life des Bionic Marmots|
Bionic Marmots Extra Life Team|
www.extra-life.org/participant/jfchabot
Le 19 déc. 2018 à 13:26, Gaston Dombiak ***@***.***> a écrit :
Hi Hedrakk,
Couple of questions to gather more info and help troubleshoot this.
In OctoPrint, could you go to Settings -> TP-Link Smartplug and enable debug logging? Try again switching things on/off from OctoPod. Then go back to OctoPrint -> Settings -> Logging and paste here the content of the file "plugin_tplinksmartplug_debug.log"
When you try to turn off the switch from the app, do you get a confirmation dialog?
Are you getting a dialog after you clicked on turn on/off from the app saying something like "ailed to request to turn power on/off"?
Thanks,
Gaston
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Bonjour Jean-Francois, If button is disabled then nothing will happen when you click on it which seems to be your case. Could you paste in here the content of the file plugin_tplinksmartplug_debug.log before and after you open OctoPod and go to the TP-Link Smartplugs page? I'm trying to see any log entries created when OctoPod requested the status of the plugs. Buttons are disabled when OctoPod failed to get the status of the switch. Since state is unknown, to OctoPod, then we do not know if we should offer the option to turn it on or off. An improvement I could do is to display next to each plug any error message so we can troubleshoot things easier. Merci, |
Hi Gaston,
Here�s a copy-past of �plugin_tplinksmartplug_debug.log� before I start
OctoPod :
[2018-12-20 09:30:17,722] DEBUG: Checking statuses during print progress
(51).
[2018-12-20 09:40:11,938] DEBUG: Checking statuses during print progress
(52).
[2018-12-20 09:50:00,955] DEBUG: Checking statuses during print progress
(53).
[2018-12-20 09:59:52,638] DEBUG: Checking statuses during print progress
(54).
[2018-12-20 10:10:40,645] DEBUG: Checking statuses during print progress
(55).
[2018-12-20 10:20:31,988] DEBUG: Checking statuses during print progress
(56).
[2018-12-20 10:30:23,848] DEBUG: Checking statuses during print progress
(57).
[2018-12-20 10:40:15,205] DEBUG: Checking statuses during print progress
(58).
[2018-12-20 10:50:10,203] DEBUG: Checking statuses during print progress
(59).
[2018-12-20 11:00:54,972] DEBUG: Checking statuses during print progress
(60).
[2018-12-20 11:07:03,051] DEBUG: Checking statuses during print progress
(61).
[2018-12-20 11:12:02,326] DEBUG: Checking statuses during print progress
(62).
[2018-12-20 11:17:32,268] DEBUG: Checking statuses during print progress
(63).
[2018-12-20 11:24:58,372] DEBUG: Checking statuses during print progress
(64).
[2018-12-20 11:33:28,021] DEBUG: Checking statuses during print progress
(65).
[2018-12-20 11:41:53,412] DEBUG: Checking statuses during print progress
(66).
[2018-12-20 11:49:15,382] DEBUG: Checking statuses during print progress
(67).
[2018-12-20 11:58:23,214] DEBUG: Checking statuses during print progress
(68).
[2018-12-20 12:07:09,404] DEBUG: Checking statuses during print progress
(69).
[2018-12-20 12:16:30,257] DEBUG: Checking statuses during print progress
(70).
[2018-12-20 12:25:16,956] DEBUG: Checking statuses during print progress
(71).
[2018-12-20 12:34:37,300] DEBUG: Checking statuses during print progress
(72).
[2018-12-20 12:43:24,007] DEBUG: Checking statuses during print progress
(73).
[2018-12-20 12:52:43,350] DEBUG: Checking statuses during print progress
(74).
[2018-12-20 13:01:31,059] DEBUG: Checking statuses during print progress
(75).
[2018-12-20 13:10:50,889] DEBUG: Checking statuses during print progress
(76).
[2018-12-20 13:19:38,592] DEBUG: Checking statuses during print progress
(77).
[2018-12-20 13:28:58,443] DEBUG: Checking statuses during print progress
(78).
[2018-12-20 13:37:45,098] DEBUG: Checking statuses during print progress
(79).
[2018-12-20 13:47:06,840] DEBUG: Checking statuses during print progress
(80).
[2018-12-20 13:47:27,744] DEBUG: Checking status of 192.168.10.136.
[2018-12-20 13:47:27,745] DEBUG:
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}}
[2018-12-20 13:47:27,746] DEBUG: IP 192.168.10.136 is valid.
[2018-12-20 13:47:27,868] DEBUG: Sending command
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}} to 192.168.10.136
[2018-12-20 13:47:27,871] DEBUG: «
[1]Ë"system":{"get_sysinfo":{"err_code":0,"sw_ver":"1.2.5 Build 171206
Rel.085954","hw_ver":"1.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(US)",
"mac":"50:C7:BF:00:54:C2","deviceId":"8006470C5A65A52B396E8795E8CB52F716C1FE
EE","hwId":"60FF6B258734EA6880E186F8C96DDC61","fwId":"0000000000000000000000
0000000000","oemId":"FFF22CFF774A0B89F7624BFC6F50D5DE","alias":"Wanhao
Di3","dev_name":"Wi-Fi Smart Plug With Energy
Monitoring","icon_hash":"","relay_state":1,"on_time":170784,"active_mode":"n
one","feature":"TIM:ENE","updating":0,"rssi":-72,"led_off":0,"latitude":45.5
34626,"longitude":-73.939842}},"emeter":{"get_realtime":{"current":1.766679,
"voltage":122.639331,"power":122.824208,"total":7.271000,"err_code":0}}}
[2018-12-20 13:55:52,693] DEBUG: Checking statuses during print progress
(81).
[2018-12-20 14:05:11,452] DEBUG: Checking statuses during print progress
(82).
[2018-12-20 14:14:00,238] DEBUG: Checking statuses during print progress
(83).
[2018-12-20 14:23:18,992] DEBUG: Checking statuses during print progress
(84).
[2018-12-20 14:32:07,267] DEBUG: Checking statuses during print progress
(85).
[2018-12-20 14:41:25,014] DEBUG: Checking statuses during print progress
(86).
[2018-12-20 14:50:14,315] DEBUG: Checking statuses during print progress
(87).
[2018-12-20 14:59:31,780] DEBUG: Checking statuses during print progress
(88).
[2018-12-20 15:08:21,862] DEBUG: Checking statuses during print progress
(89).
[2018-12-20 15:17:39,345] DEBUG: Checking statuses during print progress
(90).
[2018-12-20 15:26:28,905] DEBUG: Checking statuses during print progress
(91).
[2018-12-20 15:35:46,378] DEBUG: Checking statuses during print progress
(92).
[2018-12-20 15:44:36,441] DEBUG: Checking statuses during print progress
(93).
[2018-12-20 15:53:52,919] DEBUG: Checking statuses during print progress
(94).
[2018-12-20 16:02:43,501] DEBUG: Checking statuses during print progress
(95).
[2018-12-20 16:11:03,941] DEBUG: Checking statuses during print progress
(96).
[2018-12-20 16:18:29,761] DEBUG: Checking statuses during print progress
(97).
[2018-12-20 16:25:03,305] DEBUG: Checking statuses during print progress
(98).
[2018-12-20 16:31:50,152] DEBUG: Checking statuses during print progress
(99).
[2018-12-20 16:39:24,041] DEBUG: Checking statuses during print progress
(100).
[2018-12-20 17:07:58,835] DEBUG: Checking status of 192.168.10.136.
[2018-12-20 17:07:58,836] DEBUG:
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}}
[2018-12-20 17:07:58,836] DEBUG: IP 192.168.10.136 is valid.
[2018-12-20 17:08:00,130] DEBUG: Sending command
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}} to 192.168.10.136
[2018-12-20 17:08:00,135] DEBUG: «
[1]Ê"system":{"get_sysinfo":{"err_code":0,"sw_ver":"1.2.5 Build 171206
Rel.085954","hw_ver":"1.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(US)",
"mac":"50:C7:BF:00:54:C2","deviceId":"8006470C5A65A52B396E8795E8CB52F716C1FE
EE","hwId":"60FF6B258734EA6880E186F8C96DDC61","fwId":"0000000000000000000000
0000000000","oemId":"FFF22CFF774A0B89F7624BFC6F50D5DE","alias":"Wanhao
Di3","dev_name":"Wi-Fi Smart Plug With Energy
Monitoring","icon_hash":"","relay_state":1,"on_time":182816,"active_mode":"n
one","feature":"TIM:ENE","updating":0,"rssi":-72,"led_off":0,"latitude":45.5
34626,"longitude":-73.939842}},"emeter":{"get_realtime":{"current":0.211495,
"voltage":120.410910,"power":14.223687,"total":7.581000,"err_code":0}}}
[2018-12-20 17:08:04,009] DEBUG: Checking status of 192.168.10.136.
[2018-12-20 17:08:04,010] DEBUG:
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}}
[2018-12-20 17:08:04,013] DEBUG: IP 192.168.10.136 is valid.
[2018-12-20 17:08:04,125] DEBUG: Sending command
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}} to 192.168.10.136
[2018-12-20 17:08:04,130] DEBUG: «
[1]Ê"system":{"get_sysinfo":{"err_code":0,"sw_ver":"1.2.5 Build 171206
Rel.085954","hw_ver":"1.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(US)",
"mac":"50:C7:BF:00:54:C2","deviceId":"8006470C5A65A52B396E8795E8CB52F716C1FE
EE","hwId":"60FF6B258734EA6880E186F8C96DDC61","fwId":"0000000000000000000000
0000000000","oemId":"FFF22CFF774A0B89F7624BFC6F50D5DE","alias":"Wanhao
Di3","dev_name":"Wi-Fi Smart Plug With Energy
Monitoring","icon_hash":"","relay_state":1,"on_time":182820,"active_mode":"n
one","feature":"TIM:ENE","updating":0,"rssi":-71,"led_off":0,"latitude":45.5
34626,"longitude":-73.939842}},"emeter":{"get_realtime":{"current":0.212896,
"voltage":120.435491,"power":14.283302,"total":7.581000,"err_code":0}}}
[2018-12-20 17:08:06,392] DEBUG: Checking status of 192.168.10.136.
[2018-12-20 17:08:06,393] DEBUG:
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}}
[2018-12-20 17:08:06,393] DEBUG: IP 192.168.10.136 is valid.
[2018-12-20 17:08:06,533] DEBUG: Sending command
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}} to 192.168.10.136
[2018-12-20 17:08:06,538] DEBUG: «
[1]Ê"system":{"get_sysinfo":{"err_code":0,"sw_ver":"1.2.5 Build 171206
Rel.085954","hw_ver":"1.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(US)",
"mac":"50:C7:BF:00:54:C2","deviceId":"8006470C5A65A52B396E8795E8CB52F716C1FE
EE","hwId":"60FF6B258734EA6880E186F8C96DDC61","fwId":"0000000000000000000000
0000000000","oemId":"FFF22CFF774A0B89F7624BFC6F50D5DE","alias":"Wanhao
Di3","dev_name":"Wi-Fi Smart Plug With Energy
Monitoring","icon_hash":"","relay_state":1,"on_time":182823,"active_mode":"n
one","feature":"TIM:ENE","updating":0,"rssi":-70,"led_off":0,"latitude":45.5
34626,"longitude":-73.939842}},"emeter":{"get_realtime":{"current":0.211916,
"voltage":120.644801,"power":14.203706,"total":7.581000,"err_code":0}}}
[2018-12-20 17:16:16,637] DEBUG: Checking status of 192.168.10.136.
[2018-12-20 17:16:16,638] DEBUG:
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}}
[2018-12-20 17:16:16,639] DEBUG: IP 192.168.10.136 is valid.
[2018-12-20 17:16:16,777] DEBUG: Sending command
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}} to 192.168.10.136
[2018-12-20 17:16:16,780] DEBUG: «
[1]Ê"system":{"get_sysinfo":{"err_code":0,"sw_ver":"1.2.5 Build 171206
Rel.085954","hw_ver":"1.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(US)",
"mac":"50:C7:BF:00:54:C2","deviceId":"8006470C5A65A52B396E8795E8CB52F716C1FE
EE","hwId":"60FF6B258734EA6880E186F8C96DDC61","fwId":"0000000000000000000000
0000000000","oemId":"FFF22CFF774A0B89F7624BFC6F50D5DE","alias":"Wanhao
Di3","dev_name":"Wi-Fi Smart Plug With Energy
Monitoring","icon_hash":"","relay_state":1,"on_time":183313,"active_mode":"n
one","feature":"TIM:ENE","updating":0,"rssi":-74,"led_off":0,"latitude":45.5
34626,"longitude":-73.939842}},"emeter":{"get_realtime":{"current":0.213500,
"voltage":120.206845,"power":14.224610,"total":7.583000,"err_code":0}}}
And here�s a copy-past of �plugin_tplinksmartplug_debug.log� after I start
OctoPod :
[2018-12-20 09:30:17,722] DEBUG: Checking statuses during print progress
(51).
[2018-12-20 09:40:11,938] DEBUG: Checking statuses during print progress
(52).
[2018-12-20 09:50:00,955] DEBUG: Checking statuses during print progress
(53).
[2018-12-20 09:59:52,638] DEBUG: Checking statuses during print progress
(54).
[2018-12-20 10:10:40,645] DEBUG: Checking statuses during print progress
(55).
[2018-12-20 10:20:31,988] DEBUG: Checking statuses during print progress
(56).
[2018-12-20 10:30:23,848] DEBUG: Checking statuses during print progress
(57).
[2018-12-20 10:40:15,205] DEBUG: Checking statuses during print progress
(58).
[2018-12-20 10:50:10,203] DEBUG: Checking statuses during print progress
(59).
[2018-12-20 11:00:54,972] DEBUG: Checking statuses during print progress
(60).
[2018-12-20 11:07:03,051] DEBUG: Checking statuses during print progress
(61).
[2018-12-20 11:12:02,326] DEBUG: Checking statuses during print progress
(62).
[2018-12-20 11:17:32,268] DEBUG: Checking statuses during print progress
(63).
[2018-12-20 11:24:58,372] DEBUG: Checking statuses during print progress
(64).
[2018-12-20 11:33:28,021] DEBUG: Checking statuses during print progress
(65).
[2018-12-20 11:41:53,412] DEBUG: Checking statuses during print progress
(66).
[2018-12-20 11:49:15,382] DEBUG: Checking statuses during print progress
(67).
[2018-12-20 11:58:23,214] DEBUG: Checking statuses during print progress
(68).
[2018-12-20 12:07:09,404] DEBUG: Checking statuses during print progress
(69).
[2018-12-20 12:16:30,257] DEBUG: Checking statuses during print progress
(70).
[2018-12-20 12:25:16,956] DEBUG: Checking statuses during print progress
(71).
[2018-12-20 12:34:37,300] DEBUG: Checking statuses during print progress
(72).
[2018-12-20 12:43:24,007] DEBUG: Checking statuses during print progress
(73).
[2018-12-20 12:52:43,350] DEBUG: Checking statuses during print progress
(74).
[2018-12-20 13:01:31,059] DEBUG: Checking statuses during print progress
(75).
[2018-12-20 13:10:50,889] DEBUG: Checking statuses during print progress
(76).
[2018-12-20 13:19:38,592] DEBUG: Checking statuses during print progress
(77).
[2018-12-20 13:28:58,443] DEBUG: Checking statuses during print progress
(78).
[2018-12-20 13:37:45,098] DEBUG: Checking statuses during print progress
(79).
[2018-12-20 13:47:06,840] DEBUG: Checking statuses during print progress
(80).
[2018-12-20 13:47:27,744] DEBUG: Checking status of 192.168.10.136.
[2018-12-20 13:47:27,745] DEBUG:
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}}
[2018-12-20 13:47:27,746] DEBUG: IP 192.168.10.136 is valid.
[2018-12-20 13:47:27,868] DEBUG: Sending command
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}} to 192.168.10.136
[2018-12-20 13:47:27,871] DEBUG: «
[1]Ë"system":{"get_sysinfo":{"err_code":0,"sw_ver":"1.2.5 Build 171206
Rel.085954","hw_ver":"1.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(US)",
"mac":"50:C7:BF:00:54:C2","deviceId":"8006470C5A65A52B396E8795E8CB52F716C1FE
EE","hwId":"60FF6B258734EA6880E186F8C96DDC61","fwId":"0000000000000000000000
0000000000","oemId":"FFF22CFF774A0B89F7624BFC6F50D5DE","alias":"Wanhao
Di3","dev_name":"Wi-Fi Smart Plug With Energy
Monitoring","icon_hash":"","relay_state":1,"on_time":170784,"active_mode":"n
one","feature":"TIM:ENE","updating":0,"rssi":-72,"led_off":0,"latitude":45.5
34626,"longitude":-73.939842}},"emeter":{"get_realtime":{"current":1.766679,
"voltage":122.639331,"power":122.824208,"total":7.271000,"err_code":0}}}
[2018-12-20 13:55:52,693] DEBUG: Checking statuses during print progress
(81).
[2018-12-20 14:05:11,452] DEBUG: Checking statuses during print progress
(82).
[2018-12-20 14:14:00,238] DEBUG: Checking statuses during print progress
(83).
[2018-12-20 14:23:18,992] DEBUG: Checking statuses during print progress
(84).
[2018-12-20 14:32:07,267] DEBUG: Checking statuses during print progress
(85).
[2018-12-20 14:41:25,014] DEBUG: Checking statuses during print progress
(86).
[2018-12-20 14:50:14,315] DEBUG: Checking statuses during print progress
(87).
[2018-12-20 14:59:31,780] DEBUG: Checking statuses during print progress
(88).
[2018-12-20 15:08:21,862] DEBUG: Checking statuses during print progress
(89).
[2018-12-20 15:17:39,345] DEBUG: Checking statuses during print progress
(90).
[2018-12-20 15:26:28,905] DEBUG: Checking statuses during print progress
(91).
[2018-12-20 15:35:46,378] DEBUG: Checking statuses during print progress
(92).
[2018-12-20 15:44:36,441] DEBUG: Checking statuses during print progress
(93).
[2018-12-20 15:53:52,919] DEBUG: Checking statuses during print progress
(94).
[2018-12-20 16:02:43,501] DEBUG: Checking statuses during print progress
(95).
[2018-12-20 16:11:03,941] DEBUG: Checking statuses during print progress
(96).
[2018-12-20 16:18:29,761] DEBUG: Checking statuses during print progress
(97).
[2018-12-20 16:25:03,305] DEBUG: Checking statuses during print progress
(98).
[2018-12-20 16:31:50,152] DEBUG: Checking statuses during print progress
(99).
[2018-12-20 16:39:24,041] DEBUG: Checking statuses during print progress
(100).
[2018-12-20 17:07:58,835] DEBUG: Checking status of 192.168.10.136.
[2018-12-20 17:07:58,836] DEBUG:
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}}
[2018-12-20 17:07:58,836] DEBUG: IP 192.168.10.136 is valid.
[2018-12-20 17:08:00,130] DEBUG: Sending command
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}} to 192.168.10.136
[2018-12-20 17:08:00,135] DEBUG: «
[1]Ê"system":{"get_sysinfo":{"err_code":0,"sw_ver":"1.2.5 Build 171206
Rel.085954","hw_ver":"1.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(US)",
"mac":"50:C7:BF:00:54:C2","deviceId":"8006470C5A65A52B396E8795E8CB52F716C1FE
EE","hwId":"60FF6B258734EA6880E186F8C96DDC61","fwId":"0000000000000000000000
0000000000","oemId":"FFF22CFF774A0B89F7624BFC6F50D5DE","alias":"Wanhao
Di3","dev_name":"Wi-Fi Smart Plug With Energy
Monitoring","icon_hash":"","relay_state":1,"on_time":182816,"active_mode":"n
one","feature":"TIM:ENE","updating":0,"rssi":-72,"led_off":0,"latitude":45.5
34626,"longitude":-73.939842}},"emeter":{"get_realtime":{"current":0.211495,
"voltage":120.410910,"power":14.223687,"total":7.581000,"err_code":0}}}
[2018-12-20 17:08:04,009] DEBUG: Checking status of 192.168.10.136.
[2018-12-20 17:08:04,010] DEBUG:
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}}
[2018-12-20 17:08:04,013] DEBUG: IP 192.168.10.136 is valid.
[2018-12-20 17:08:04,125] DEBUG: Sending command
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}} to 192.168.10.136
[2018-12-20 17:08:04,130] DEBUG: «
[1]Ê"system":{"get_sysinfo":{"err_code":0,"sw_ver":"1.2.5 Build 171206
Rel.085954","hw_ver":"1.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(US)",
"mac":"50:C7:BF:00:54:C2","deviceId":"8006470C5A65A52B396E8795E8CB52F716C1FE
EE","hwId":"60FF6B258734EA6880E186F8C96DDC61","fwId":"0000000000000000000000
0000000000","oemId":"FFF22CFF774A0B89F7624BFC6F50D5DE","alias":"Wanhao
Di3","dev_name":"Wi-Fi Smart Plug With Energy
Monitoring","icon_hash":"","relay_state":1,"on_time":182820,"active_mode":"n
one","feature":"TIM:ENE","updating":0,"rssi":-71,"led_off":0,"latitude":45.5
34626,"longitude":-73.939842}},"emeter":{"get_realtime":{"current":0.212896,
"voltage":120.435491,"power":14.283302,"total":7.581000,"err_code":0}}}
[2018-12-20 17:08:06,392] DEBUG: Checking status of 192.168.10.136.
[2018-12-20 17:08:06,393] DEBUG:
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}}
[2018-12-20 17:08:06,393] DEBUG: IP 192.168.10.136 is valid.
[2018-12-20 17:08:06,533] DEBUG: Sending command
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}} to 192.168.10.136
[2018-12-20 17:08:06,538] DEBUG: «
[1]Ê"system":{"get_sysinfo":{"err_code":0,"sw_ver":"1.2.5 Build 171206
Rel.085954","hw_ver":"1.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(US)",
"mac":"50:C7:BF:00:54:C2","deviceId":"8006470C5A65A52B396E8795E8CB52F716C1FE
EE","hwId":"60FF6B258734EA6880E186F8C96DDC61","fwId":"0000000000000000000000
0000000000","oemId":"FFF22CFF774A0B89F7624BFC6F50D5DE","alias":"Wanhao
Di3","dev_name":"Wi-Fi Smart Plug With Energy
Monitoring","icon_hash":"","relay_state":1,"on_time":182823,"active_mode":"n
one","feature":"TIM:ENE","updating":0,"rssi":-70,"led_off":0,"latitude":45.5
34626,"longitude":-73.939842}},"emeter":{"get_realtime":{"current":0.211916,
"voltage":120.644801,"power":14.203706,"total":7.581000,"err_code":0}}}
[2018-12-20 17:16:16,637] DEBUG: Checking status of 192.168.10.136.
[2018-12-20 17:16:16,638] DEBUG:
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}}
[2018-12-20 17:16:16,639] DEBUG: IP 192.168.10.136 is valid.
[2018-12-20 17:16:16,777] DEBUG: Sending command
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}} to 192.168.10.136
[2018-12-20 17:16:16,780] DEBUG: «
[1]Ê"system":{"get_sysinfo":{"err_code":0,"sw_ver":"1.2.5 Build 171206
Rel.085954","hw_ver":"1.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(US)",
"mac":"50:C7:BF:00:54:C2","deviceId":"8006470C5A65A52B396E8795E8CB52F716C1FE
EE","hwId":"60FF6B258734EA6880E186F8C96DDC61","fwId":"0000000000000000000000
0000000000","oemId":"FFF22CFF774A0B89F7624BFC6F50D5DE","alias":"Wanhao
Di3","dev_name":"Wi-Fi Smart Plug With Energy
Monitoring","icon_hash":"","relay_state":1,"on_time":183313,"active_mode":"n
one","feature":"TIM:ENE","updating":0,"rssi":-74,"led_off":0,"latitude":45.5
34626,"longitude":-73.939842}},"emeter":{"get_realtime":{"current":0.213500,
"voltage":120.206845,"power":14.224610,"total":7.583000,"err_code":0}}}
[2018-12-20 17:23:03,849] DEBUG: Checking status of 192.168.10.136.
[2018-12-20 17:23:03,850] DEBUG:
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}}
[2018-12-20 17:23:03,851] DEBUG: IP 192.168.10.136 is valid.
[2018-12-20 17:23:04,538] DEBUG: Sending command
{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}}} to 192.168.10.136
[2018-12-20 17:23:04,543] DEBUG: «
[1]Ê"system":{"get_sysinfo":{"err_code":0,"sw_ver":"1.2.5 Build 171206
Rel.085954","hw_ver":"1.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(US)",
"mac":"50:C7:BF:00:54:C2","deviceId":"8006470C5A65A52B396E8795E8CB52F716C1FE
EE","hwId":"60FF6B258734EA6880E186F8C96DDC61","fwId":"0000000000000000000000
0000000000","oemId":"FFF22CFF774A0B89F7624BFC6F50D5DE","alias":"Wanhao
Di3","dev_name":"Wi-Fi Smart Plug With Energy
Monitoring","icon_hash":"","relay_state":1,"on_time":183721,"active_mode":"n
one","feature":"TIM:ENE","updating":0,"rssi":-73,"led_off":0,"latitude":45.5
34626,"longitude":-73.939842}},"emeter":{"get_realtime":{"current":0.216542,
"voltage":120.422629,"power":14.267936,"total":7.584000,"err_code":0}}}
As I said earlier, �button� in OctoPod doesn�t seem like a button, it looks
more like an information saying that I do have the TPLINK Smartplug plugin
installed but that�s it�
Thanks
JF
De : Gaston Dombiak <notifications@github.com>
Envoyé : 20 décembre 2018 13:32
À : gdombiak/OctoPod <OctoPod@noreply.github.com>
Cc : Hedrakk <jf.chabot@videotron.ca>; Author <author@noreply.github.com>
Objet : Re: [gdombiak/OctoPod] TP Link Smartplug doesn�t seem to be working
(#158)
Bonjour Jean-Francois,
If button is disabled then nothing will happen when you click on it which
seems to be your case. Could you paste in here the content of the file
plugin_tplinksmartplug_debug.log before and after you open OctoPod and go to
the TP-Link Smartplugs page? I'm trying to see any log entries created when
OctoPod requested the status of the plugs.
Buttons are disabled when OctoPod failed to get the status of the switch.
Since state is unknown, to OctoPod, then we do not know if we should offer
the option to turn it on or off. An improvement I could do is to display
next to each plug any error message so we can troubleshoot things easier.
Merci,
Gaston (French name but don't speak French)
�
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#158 (comment)> , or
mute the thread
<https://github.com/notifications/unsubscribe-auth/ArtxfrGDCpS1m4pNIjfXJ4edG
uW-liXhks5u69etgaJpZM4ZaXVD> .
<https://github.com/notifications/beacon/Artxfro24i-Rjq5wPhJ8a5jIihqvPWSHks5
u69etgaJpZM4ZaXVD.gif>
|
Thanks. That information helps. This part looks suspicious:
Look at the text after DEBUG: and before "system". If that is the actual text then that is the problem since that is not valid JSON. Could you confirm this is not a copy/paste corruption but the actual text in the log file? This is an example of what I have in my log
I would expect your entry in the log to look like this:
If that is the actual text in the log file then I would recommend contacting the plugin developer and open an issue to see if that is corrupted JSON? Could you check one more thing? Go to octoprint.log and paste here the entries for octoprint.plugins.tplinksmartplug. I wonder if there are 500 errors. Thanks, |
I know, the code looks weird... it’s not the same when I look at it from Notepad++ and when I paste it in an email. It would be easier if I could simply attach the log file to this email. Is it possible? When I tried with a screenshot, it didn’t worked.
Jean-Francois Chabot
…__________________________________
Capitaine
Equipe Extra-Life des Bionic Marmots|
Bionic Marmots Extra Life Team|
www.extra-life.org/participant/jfchabot
Le 21 déc. 2018 à 18:50, Gaston Dombiak ***@***.***> a écrit :
Thanks. That information helps. This part looks suspicious:
[2018-12-20 17:16:16,780] DEBUG: «
[1]Ê"system":{"get_sysinfo":{"err_code":0,"sw_ver":"1.2.5 Build 171206
Rel.085954","hw_ver":"1.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(US)",
"mac":"50:C7:BF:00:54:C2","deviceId":"8006470C5A65A52B396E8795E8CB52F716C1FE
EE","hwId":"60FF6B258734EA6880E186F8C96DDC61","fwId":"0000000000000000000000
0000000000","oemId":"FFF22CFF774A0B89F7624BFC6F50D5DE","alias":"Wanhao
Di3","dev_name":"Wi-Fi Smart Plug With Energy
Monitoring","icon_hash":"","relay_state":1,"on_time":183313,"active_mode":"n
one","feature":"TIM:ENE","updating":0,"rssi":-74,"led_off":0,"latitude":45.5
34626,"longitude":-73.939842}},"emeter":{"get_realtime":{"current":0.213500,
"voltage":120.206845,"power":14.224610,"total":7.583000,"err_code":0}}}
Look at the text after DEBUG: and before "system". If that is the actual text then that is the problem since that is not valid JSON. Could you confirm this is not a copy/paste corruption but the actual text in the log file?
This is an example of what I have in my log
[2018-12-21 19:27:12,120] DEBUG: {'emeter': {'err_code': True}, 'system': {'get_sysinfo': {'relay_state': 3}}}
I would expect your entry in the log to look like this:
[2018-12-20 17:16:16,780] DEBUG: {"system":{"get_sysinfo":{"err_code":0,"sw_ver":"1.2.5 Build 171206
Rel.085954","hw_ver":"1.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(US)",
"mac":"50:C7:BF:00:54:C2","deviceId":"8006470C5A65A52B396E8795E8CB52F716C1FE
EE","hwId":"60FF6B258734EA6880E186F8C96DDC61","fwId":"0000000000000000000000
0000000000","oemId":"FFF22CFF774A0B89F7624BFC6F50D5DE","alias":"Wanhao
Di3","dev_name":"Wi-Fi Smart Plug With Energy
Monitoring","icon_hash":"","relay_state":1,"on_time":183313,"active_mode":"n
one","feature":"TIM:ENE","updating":0,"rssi":-74,"led_off":0,"latitude":45.5
34626,"longitude":-73.939842}},"emeter":{"get_realtime":{"current":0.213500,
"voltage":120.206845,"power":14.224610,"total":7.583000,"err_code":0}}}
If that is the actual text in the log file then I would recommend contacting the plugin developer and open an issue to see if that is corrupted JSON?
Could you check one more thing? Go to octoprint.log and paste here the entries for octoprint.plugins.tplinksmartplug. I wonder if there are 500 errors.
Thanks,
Gaston
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Have you tried dropping the file on the comment window as described in here: https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/ ? If that does not work then I can give you my email |
I'm replying now with the desktop interface, on my laptop, it should be easier to attach any files. I was replying to you through my mail app before... I guess github doesn't like attachments sent using email apps. Anyhow, here's the log file in question and the screen shot of OctoPod TPLink "not so button" button :) By the way, even thought I'm printing and I'm in read-only, the button is the same whatever I'm printing or not. I hope it will help.
|
Yep, button is disabled so clicking on it does nothing. Could you attach your octoprint.log file? We can see there a little more about what happens in OctoPrint when the TP-Link plugin receives API calls. I think they will appear with this text octoprint.plugins.tplinksmartplug. I think that I will add a text that displays the reason for being disabled. It will help users self-troubleshoot this problem. Thanks for your patience. |
I agree. I won’t be able to send you the log file right now, I’m kinda busy with Holidays preparations. But I’m making a note to send you the file as soon as I can.
Jean-Francois Chabot
…__________________________________
Capitaine
Equipe Extra-Life des Bionic Marmots|
Bionic Marmots Extra Life Team|
www.extra-life.org/participant/jfchabot
Le 23 déc. 2018 à 14:04, Gaston Dombiak ***@***.***> a écrit :
Yep, button is disabled so clicking on it does nothing. Could you attach your octoprint.log file? We can see there a little more about what happens in OctoPrint when the TP-Link plugin receives API calls. I think they will appear with this text octoprint.plugins.tplinksmartplug.
I think that I will add a text that displays the reason for being disabled. It will help users self-troubleshoot this problem.
Thanks for your patience.
Gaston
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Here's the octoprint.log file |
The info that we need is not present in the log. Every time I swipe the panels in OctoPod and I get to the TPLink Smartplugs window, I get these 2 entries in octoprint.log:
I'm trying to look into the number before the POST to confirm that it's returning a 200 and not a 500. Let me know once you see the POST /api/plugin/tplinksmartplug entries in the log. Thanks, |
I have a log file here that doesn't contain POST /api/plugin/tplinksmartplug but as several instances of tornado.access and all of them have Warning with them. I don't know if it's related, but you can have a look at it... |
The 404 are expected since those URLs are invalid in OctoPrint. I guess something on your network is making those requests. The only 409 is also expected since the printer was offline when you collected the log. Could you do this final test to see if we can collect the info we need?
Thanks, |
Here's the OctoPrint Log file after the described steps. But it doesn't seem to have the lines you are looking for. Have a look. |
One last test (before running out of ideas) :(
You should see things like this in the logs:
With this test we can confirm that the app can talk via HTTP to OctoPrint and that tornado logs are logging correctly. If they appear fine then it is a mystery why it is not logging the HTTP request to get the switch statuses. If logs for tornado appear and still our request does not appear then we could try using some networking tool that captures HTTP traffic to see what is going on with the mysterious request. Not sure how comfortable you are with these things. Gaston |
Unfortunately, there is no trace of such a line in the octoprint.log Here, you can have a look at it, in any case you would find something but I doubt. Thanks for your efforts. |
I don't know if it help solve the mystery, but I finally manage to be able to use the OctoPod TPLink button. But it seems like the button is not always active. It became active for the first time when I used the plugin from within the Octoprint web interface. Once I turned on and off the TPLink plug within Octoprint, the button became "available" in Octopod. I was able to turn my TPLink plug on and off from OctoPod. Then I closed/killed the app and reopened it. Once again, the button was not functioning anymore. I redid the OctoPrint cycle and the OctoPod button "availability" came back again. There is a problem though. I'm getting warning messages, either when turning on and off about failed requests, but the plug do turn on and off. It seems like a false warning message, but maybe there's a reason behind that. So here's some screen shot of the warning messages and the log files.
|
Thanks for this info. Let me share this piece of information (ignore if you knew how OctoPrint works). OctoPrint has 2 "communication channels". 1) You can make HTTP requests to execute actions or request information and 2) You can use websockets to read information from OctoPrint. TPLink Smartplug plugin uses HTTP requests to toggle switches and uses websockets to report status of the switches. Having said that, did the printer move when you pressed the move button on any of the axis? If it moved then HTTP requests communication channel works fine and for some reason OctoPrint's log is not logging tornado.access entries since they do not appear in the log as you correctly observed. More about logging network traffic below.... This is what we learned from your last test: when you clicked the TP Link switch button from OctoPrint itself, OctoPrint sent updated switches information via the websockets channel. This is why OctoPod shows correctly the status of the button. However, when you pressed the button from OctoPod, OctoPod used the HTTP requests communication channel and this failed as seen by the dialogs that you saw in the app. Another piece of info, when you open OctoPod and go to the TP Link Smartplug page, OctoPod uses the HTTP requests communication channel to request the status of the switches which is also failing so the response never comes back via websockets leaving the buttons disabled. Summary of what we know so far:
Since OctoPrint is not logging HTTP traffic for some reason, we will need to resort to other ways to capture this information and finally get to the root of this mystery. :) Once you captured the HTTP requests and responses (i.e. the network traffic) then please paste it here. If you know how to capture network traffic then ignore the rest of this response. There are different tools that you can use to capture network traffic. You will need to ssh into the octopi box for all of them. I do not have a raspberry pi with me now so giving a few options to try. I think that TCPDUMP is already available on raspbian. Follow this guide to see how to log HTTP traffic. Might need to add sudo at the beginning if not enough permission. If this tool is not already installed then this guide will help. If that tool is not working for you then you can try using justniffer. If install is giving some errors then this other guide has more info that might help. Last tool to try is httpry. If this tool is not already available in Raspbian then you can compile it from source:
You then use it like this:
|
To answer you question about the move, yes it does when I push displacement buttons in OctoPod. Unfortunately, I don't think I'll be able to log the HTTP traffic. I've taken a look at the different options you mentioned and It's beyond my level: It could be written in Russian I wouldn't be able to say. Oh well, 98% of Octopod is working awesome for me, I think I will have to live without the support of my SmartPlug. Thanks again for your help. |
Great news Hedrakk! I got to the bottom of this. The TPLinkSmartplug plugin has been recently updated and the way to interact with it (i.e. its API) has changed and is no longer compatible with OctoPod. I updated OctoPod to use the new API of the plugin and things work fine again. I also learned how to make OctoPrint log those "missing" tornado entries. No longer needed but sharing info just in case. Go to OctoPrint -> Settings -> Logging. Under Logging Levels you need to add a new row for "tornado.access" using level "INFO". Save the new settings and you are good to go. If you want I can let you know once the new beta is ready to be tested so you can confirm that things work fine for you. I will need a way to reach out to you (eg. email, facebook) to share a link with you. Thanks for bringing this issue up. |
Great news indeed! I was ready to give up on this feature.
Thanks a lot for your determination.
How can I share my email with you so not everyone will see it?
Jean-Francois Chabot
…__________________________________
Capitaine
Equipe Extra-Life des Bionic Marmots|
Bionic Marmots Extra Life Team|
www.extra-life.org/participant/jfchabot
Le 29 déc. 2018 à 13:31, Gaston Dombiak ***@***.***> a écrit :
Great news Hedrakk!
I got to the bottom of this. The TPLinkSmartplug plugin has been recently updated and the way to interact with it (i.e. its API) has changed and is no longer compatible with OctoPod. I updated OctoPod to use the new API of the plugin and things work fine again.
I also learned how to make OctoPrint log those "missing" tornado entries. No longer needed but sharing info just in case. Go to OctoPrint -> Settings -> Logging. Under Logging Levels you need to add a new row for "tornado.access" using level "INFO". Save the new settings and you are good to go.
If you want I can let you know once the new beta is ready to be tested so you can confirm that things work fine for you. I will need a way to reach out to you (eg. email, facebook) to share a link with you.
Thanks for bringing this issue up.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Send me an email. Same username that you see in github at gmail.com |
The plugin works for me but each time I turn on or off the plug I get a message that it failed even though it works. Anyone else getting this pop up message? Anyway to fix it? |
Hi,
I can see the TP Link Smartplug plugin, but clicking on it, trying to « slide it », doesn’t seem to do anything. The plugin is working right from the Octoprint web interface, but I would like to be able to do the same in the OctoPod app.
Thank you.
The text was updated successfully, but these errors were encountered: