jneilliii / OctoPrint-TPLinkSmartplug

105 stars 57 forks source link

Problem with refresh button and graph select #115

Closed devildant closed 4 years ago

devildant commented 5 years ago

Hello, for no apparent reason, the refresh button is disabled when loading the page (with the plug activated) In addition, the chart does not have a listing in this list. the reason for this malfunction is:

"err_code" in item.emeter.get_realtime

inside filteredSmartplugs and allPlugsDisabled

devildant commented 5 years ago

i try to uninstall/install (with clean inside config.yaml and remove db file) image

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had activity in 14 days. It will be closed if no further activity occurs in 7 days.

jneilliii commented 5 years ago

Can you try this version for me?

https://github.com/jneilliii/OctoPrint-TPLinkSmartplug/archive/0.9.17.zip

devildant commented 5 years ago

hello, i tried, but i have an error when il click on plug icon (for turn on or turn off)

2019-07-07 10:57:50,714 - octoprint.server.api - ERROR - Error while excuting SimpleApiPlugin tplinksmartplug
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/api/__init__.py", line 104, in pluginCommand
    response = api_plugin.on_api_command(command, data)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_tplinksmartplug/__init__.py", line 283, in on_api_command
    response = self.turn_off("{ip}".format(**data))
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_tplinksmartplug/__init__.py", line 173, in turn_off
    plug_ip, plug_num = plugip.split("/")
ValueError: need more than 1 value to unpack
jneilliii commented 5 years ago

Try the same branch again for me @devildant. That code was added by someone else and I think I just fixed it. I believe the issue was when you ran into a non energy monitoring plug.

devildant commented 5 years ago

it's better but the following bugs: 1) turn on printer, refresh octoprint page, the button refresh is disable image

2) the graph select is empty image

sorry for the response time I have problems with internet :(

jneilliii commented 5 years ago

Weird. I'm not able to reproduce on my end. Do you only have the one HS110 plug? I might be getting different results having multiple plugs configured and can do some additional testing. Are there any errors in octoprint.log or the browser's console?

devildant commented 5 years ago

hello, yes only one HS110. no i don't have error inside octoprint.log and browser console

Tronnic commented 5 years ago

Hello, I have a somewhat related problem. I don't see any power consumption at all (HS110) and the dropdown from the graphs menu is empty as well. Only using one plug per printer. I do have multiple in the house tho.

tpl1 tpl2

gryzlov commented 5 years ago

I use two HS110 and have same issue for 0.9.16 version, 0.9.17 works fine for me Безымянный

RcTomcat1 commented 4 years ago

I have the same problem. The power consumption widget is not even visible on my octoprint page, plug to graph is empty and nothing is selectable Version is 0.9.17

schmitzCatz commented 4 years ago

Hi, i can confirm this problem:

jneilliii commented 4 years ago

What about if you enable polling? With debug logging enabled and polling enabled to 1 minute restart octoprint. Force a refresh on your browser by pressing ctrl + f5 (assuming windows) at the same time. Check your browser console for errors. After a couple of minutes to give the plugin plenty of time to poll check octoprint.log and the plugin log for errors. Upload them here for analysis, etc.

schmitzCatz commented 4 years ago

Hi,

works like a charm. Polling is enabled and after restarting octoprint the plugin is working as intended.

Thank you for your fast replay!