imrahil / OctoPrint-NavbarTemp

Plugin for OctoPrint - displays temperatures on navbar
GNU Affero General Public License v3.0
44 stars 50 forks source link

Do not see internal Temperature #47

Closed sanchezluciano closed 4 years ago

sanchezluciano commented 5 years ago

Hi. For some reason my internal temperature is not displaying. I've enable/disabled the tick box and ever re-installed the plugin. This used to work on my Pi until I recently formatted the card and reinstalled OctoPi. Could it be a permissions issue or something?

Cosik commented 5 years ago

@sanchezluciano debug log from plugin or print screen of octoprint?

imrahil commented 5 years ago

@cosik maybe it's an issue with not connected printer?

Cosik commented 5 years ago

maybe, so I asked for print screen ;)

sanchezluciano commented 5 years ago

@Cosik maybe it's an issue with not connected printer?

It looks like it was this! When I connect the printer I can see the temperature but only of the SoC. But here's the thing...

I used to be able to see the temperature of my RPi at all times even with the printer not connected. Is this a feature that was removed? I would really like to be able to see the temperature of the RPi without the printer connected because I don't always have my printer on.

Thanks!

Cosik commented 5 years ago

ok, I get your point. Could me make it as improvement in next version?

SillyHats commented 5 years ago

I would also like to see this improvement implemented

tablatronix commented 5 years ago

I just noticed this as well, would be nice to have soc temp always

Haprog commented 4 years ago

It would be very useful to see the SoC temp even when printer is not connected.

Thorinair commented 4 years ago

It has been a year and a half... We could still use this, please...

Cosik commented 4 years ago

Problem is still valid?

ScottWell1 commented 4 years ago

Yes -- But not really a problem as much as a "desired enhancement". Just as Octoprint only displays tool/bed temps when printer is "connected", NavbarTemp currently only displays its info when printer is "connected". It would be a nice enhancement to see the temps at all times, whether printer is "connected" or not.

Cosik commented 4 years ago

ok so it's related to https://github.com/imrahil/OctoPrint-NavbarTemp/issues/65 please @ScottWell1 take a look and share your opinion.

ScottWell1 commented 4 years ago

Yes, I think this is same as #65. An enhancement request for the plugin to always display output, even when printer is not in "connected" state.

Cosik commented 4 years ago

@ScottWell1 if you want, on devel branch I already upladed something which will fix/change this state. Only bed temp will required connection.

ScottWell1 commented 4 years ago

@Cosik -- Thanks for working on this! I installed from devel branch and tested on Pi4 with Octoprint 1.3.12. I noticed three small aesthetic issues.

  1. When initially loading (or reloading) the page, the NavbarTemp outputs are not present until the timer "refresh" occurs. But I don't think this is new behavior; I think the plugin has always worked this way -- so really a different issue and not related to this one?

  2. When printer is not connected, "Tool: 0.0C" is now shown. That's obviously incorrect data, but not a big deal -- easily ignored. (This only occurs when printer is disconnected, as when printer is connected the correct tool (and bed) temps + targets are displayed.)

  3. Every 30 seconds, the SoC label and temperature disappear entirely for 3-5 seconds before reappearing with updated temperature. The custom label and temperature do NOT disappear. Is there a way to always keep the existing SoC label and temperature visible until the new values overwrite them?

-- Edit --

Item 3 seems related to this line in updateCustom(self), as it obliterates the SoC temp display until updateSoCTemp(self) gets called again and prints both SoC and Custom again....

self._plugin_manager.send_plugin_message(self._identifier,
                 dict(isSupported=False, cmd_result=cmd_rtv, cmd_name=self.cmd_name))
Cosik commented 4 years ago

@ScottWell1 thanks for help in testing. I back to develop after some break.

  1. Is related to way how this is working. I will try to add note in general way of working. Timer every period of time is shooting to NavBar with data. So if you will refresh page it will loos previous data.

  2. This is correct behavior because when you have not connected printer Octoprint don't receive information about temperature. I didn't found solution how to hid it.

  3. I was not able to retest it, but probably I found root cause of this. Please check latest devel branch, both timers are now separated.

ScottWell1 commented 4 years ago

@Cosik 1 & 2 -- Understood, no problem. 3 - I downloaded latest devel branch (as of commit 6ad43c1) to retest. However, the custom command label and action are now missing from the Setup dialog, looks like they got lost in recent commit? I now see only the two checkboxes when I go to Settings page, the custom command fields are missing.

ScottWell1 commented 4 years ago

@Cosik - To clarify previous comment:

0.13 from Master -- Temps display ok (connected only of course), Settings panel is complete with checkbox and custom command.

0.14 from Devel -- Only SoC displays (connected or unconnected). No other temps are displayed. Settings panel is incomplete, has only checkboxes -- does not have the custom command fields.

Cosik commented 4 years ago

@ScottWell1 as usually recommended is to force reload page. Usually is ctrl+F5 or/and clear cache. I tested it on my 2 virtual envs.

ScottWell1 commented 4 years ago

Tried that multiple times, deleted cache, etc.... Problem is in the code. With 0.13, settings page is correct with checkbox and custom command. With 0.14, only checkboxes and no custom command. Please fix. Pi4 with Octoprint 1.4.

After ctrl-f5 and manually deleting cache, 0.14 looks like this: image

With previous version, 0.13, looks like this: image

I have uninstalled/reinstalled multiple times, cleared cache via settings and via ctrl-f5 (Chrome-Windows 10)... same results. Something wrong with code.

Cosik commented 4 years ago

@ScottWell1 yes, right I reproduced it now it should work correctly. I've made some more improvements, please check.

ScottWell1 commented 4 years ago

@Cosik - I used "uninstall and cleanup" to remove previous version, then downloaded and installed latest from devel branch. I had a lot of trouble with temps not appearing -- including bed/tool not appearing at all (connected or disconnected). After multiple restarts and forced reloads, it is working now. Not sure what caused that.

I do see one repeatable problem with settings. When I change the checkbox for "Short tool names" (whether setting or clearing it) and Save, SoC temp continues to display until a refresh, then disappears. Going back to the Settings page, the SoC checkbox is empty. So it seems like changing the "Short Tool Names" box is clearing the SoC box.

--EDIT -- Looks like changing anything on settings page clears SoC box. For example, change custom command name and Save, then open settings page again and SoC box is clear.

Cosik commented 4 years ago

@ScottWell1 now it should work. But I noticed that settings are permanent saved on Octoprint closing, also refresh time for this plugin is 30s so values should be updated ~35s depending of cpu load.

ScottWell1 commented 4 years ago

@Cosik -- Plugin not working at all now. :-(

I used "uninstall and cleanup" to remove previous version. Then installed latest from devel branch. Opened Settings, put checkmark into SoC box, Saved. Waited 60 seconds. No temps displayed. SoC is not there. The "Tool: 0.0C" is not there.

Settings disappear. Example... I put checkmark in SoC and entered values into both custom command fields. Waited 1 minute. Returned to Settings, everything still there (good). Then closed browser, reopened, navigated to Octoprint. NavbarTemp Settings page all blank again.

Saw some errors in browser console, maybe these will help diagnose?

packed_core.js:16553 Error calling onStartupComplete on view model TemperatureViewModel : TypeError: Unable to process binding "html: function(){return $parent.formatBarTemperature(name(),actual(),target()) }"
Message: Cannot read property 'useShortNames' of undefined
    at NavbarTempViewModel.self.formatBarTemperature (http://octopi.local/static/webassets/packed_plugins.js?8ec07a83:2496:38)
    at html (eval at parseBindingsString (http://octopi.local/static/webassets/packed_libs.js?3339d949:11374:90), <anonymous>:3:115)
    at update (http://octopi.local/static/webassets/packed_libs.js?3339d949:11398:400)
    at a.B.i (http://octopi.local/static/webassets/packed_libs.js?3339d949:11378:286)
    at Function.Pc (http://octopi.local/static/webassets/packed_libs.js?3339d949:11357:355)
    at Function.Qc (http://octopi.local/static/webassets/packed_libs.js?3339d949:11357:133)
    at Function.aa (http://octopi.local/static/webassets/packed_libs.js?3339d949:11356:482)
    at Object.a.m.a.B (http://octopi.local/static/webassets/packed_libs.js?3339d949:11355:39)
    at http://octopi.local/static/webassets/packed_libs.js?3339d949:11378:273
    at Object.q (http://octopi.local/static/webassets/packed_libs.js?3339d949:11317:244)
callViewModelIf @ packed_core.js:16553
2packed_libs.js:11378 Uncaught TypeError: Unable to process binding "html: function(){return $parent.formatBarTemperature(name(),actual(),target()) }"
Message: Cannot read property 'useShortNames' of undefined
    at NavbarTempViewModel.self.formatBarTemperature (packed_plugins.js:2496)
    at html (eval at parseBindingsString (packed_libs.js:11374), <anonymous>:3:115)
    at update (packed_libs.js:11398)
    at a.B.i (packed_libs.js:11378)
    at Function.Pc (packed_libs.js:11357)
    at Function.Qc (packed_libs.js:11357)
    at Function.aa (packed_libs.js:11356)
    at Object.a.m.a.B (packed_libs.js:11355)
    at packed_libs.js:11378
    at Object.q (packed_libs.js:11317)
packed_core.js:16553 Error calling onSettingsHidden on view model NavbarTempViewModel : TypeError: Cannot read property 'displayRaspiTemp' of undefined
    at NavbarTempViewModel.self.onSettingsHidden (http://octopi.local/static/webassets/packed_plugins.js?8ec07a83:2530:38)
    at callViewModelIf (http://octopi.local/static/webassets/packed_core.js?3514a079:16543:34)
    at http://octopi.local/static/webassets/packed_core.js?3514a079:16489:13
    at Pn (http://octopi.local/static/webassets/packed_libs.js?3339d949:11208:530)
    at Function.<anonymous> (http://octopi.local/static/webassets/packed_libs.js?3339d949:11229:66)
    at callViewModelsIf (http://octopi.local/static/webassets/packed_core.js?3514a079:16487:7)
    at callViewModels (http://octopi.local/static/webassets/packed_core.js?3514a079:16481:5)
    at HTMLDivElement.<anonymous> (http://octopi.local/static/webassets/packed_core.js?3514a079:5302:21)
    at HTMLDivElement.dispatch (http://octopi.local/static/webassets/packed_libs.js?3339d949:5184:27)
    at HTMLDivElement.elemData.handle (http://octopi.local/static/webassets/packed_libs.js?3339d949:4992:28)
callViewModelIf @ packed_core.js:16553
packed_libs.js:11378 Uncaught TypeError: Unable to process binding "html: function(){return $parent.formatBarTemperature(name(),actual(),target()) }"
Message: Cannot read property 'useShortNames' of undefined
    at NavbarTempViewModel.self.formatBarTemperature (packed_plugins.js:2496)
    at html (eval at parseBindingsString (packed_libs.js:11374), <anonymous>:3:115)
    at update (packed_libs.js:11398)
    at a.B.i (packed_libs.js:11378)
    at Function.Pc (packed_libs.js:11357)
    at Function.Qc (packed_libs.js:11357)
    at Function.aa (packed_libs.js:11356)
    at Object.a.m.a.B (packed_libs.js:11355)
    at packed_libs.js:11378
    at Object.q (packed_libs.js:11317)
Cosik commented 4 years ago

@ScottWell1 problem with writing plugins is that there is no good tutorial how to make complicated one. Also testing of them is very hard. I reverted few changes and hope that they will help/fix problem.

ScottWell1 commented 4 years ago

@Cosik -- Wish I could help more, but I have done very little python and I have no experience with html/js so am clueless there. I REALLY appreciate your continued efforts to improve the plugin. I will grab latest devel, retest, and come back with results soon.

Cosik commented 4 years ago

This plugin combine 3 languages, python for me is not a problem, JS and HTML is bigger one, also some behaviours of octoprint are unknown for me. I noticed that there is a problem with Tool and Bed temp. It required reload of page. But I think that's another issue and new one should be created, this one is too long ;)

ScottWell1 commented 4 years ago

@Cosik -- With latest devel, the SoC and Custom temps do display. But there are not Tool: or Bed: temps displayed (already reloaded, cleared cache, etc.). In fact, default part of Octoprint page below graph has Tool and Bed temps as 0.0 when connected (if plugin is loaded). Deactivating or uninstalling plugin, they come back and work normally.

Still seeing errors in browser console, but slightly different than before:

packed_core.js?3514a079:17295 Could not bind view model NavbarTempViewModel to target #navbar_plugin_navbartemp : TypeError: Unable to process binding "html: function(){return formatBarTemperature(temperatureModel.bedTemp.name(),temperatureModel.bedTemp.actual(),temperatureModel.bedTemp.target()) }"
Message: self.settings.useShortNames is not a function
    at NavbarTempViewModel.self.formatBarTemperature (http://octopi.local/static/webassets/packed_plugins.js?8ec07a83:2496:38)
    at html (eval at parseBindingsString (http://octopi.local/static/webassets/packed_libs.js?3339d949:11374:90), <anonymous>:3:106)
    at update (http://octopi.local/static/webassets/packed_libs.js?3339d949:11398:400)
    at a.B.i (http://octopi.local/static/webassets/packed_libs.js?3339d949:11378:286)
    at Function.Pc (http://octopi.local/static/webassets/packed_libs.js?3339d949:11357:355)
    at Function.Qc (http://octopi.local/static/webassets/packed_libs.js?3339d949:11357:133)
    at Function.aa (http://octopi.local/static/webassets/packed_libs.js?3339d949:11356:482)
    at Object.a.m.a.B (http://octopi.local/static/webassets/packed_libs.js?3339d949:11355:39)
    at http://octopi.local/static/webassets/packed_libs.js?3339d949:11378:273
    at Object.q (http://octopi.local/static/webassets/packed_libs.js?3339d949:11317:244)
(anonymous) @ packed_core.js?3514a079:17295
packed_core.js?3514a079:17277 Did not bind view model SoftwareUpdateViewModel to target #softwareupdate_confirmation_dialog since it does not exist
packed_core.js?3514a079:17277 Did not bind view model SoftwareUpdateViewModel to target #wizard_plugin_softwareupdate since it does not exist
packed_plugins.js?8ec07a83:83 addButtonsToTermTab
packed_plugins.js?8ec07a83:84 len: 6
packed_plugins.js?8ec07a83:114 Adding button: [Z-8]  G90;G0 Z8 F480
packed_plugins.js?8ec07a83:114 Adding button: [Z-Home]  G28 Z
packed_plugins.js?8ec07a83:114 Adding button: [Report Settings]  M503
packed_plugins.js?8ec07a83:114 Adding button: [Firmware Info]  M115
packed_plugins.js?8ec07a83:114 Adding button: [Current Pos]  M114
packed_plugins.js?8ec07a83:114 Adding button: [Endstop Status]  M119
packed_core.js?3514a079:3334 User Scott logged in
packed_core.js?3514a079:17316 ... binding done
packed_core.js?3514a079:17328 Application startup complete
packed_core.js?3514a079:16553 Error calling onStartupComplete on view model TemperatureViewModel : TypeError: Unable to process binding "html: function(){return $parent.formatBarTemperature(name(),actual(),target()) }"
Message: self.settings.useShortNames is not a function
    at NavbarTempViewModel.self.formatBarTemperature (http://octopi.local/static/webassets/packed_plugins.js?8ec07a83:2496:38)
    at html (eval at parseBindingsString (http://octopi.local/static/webassets/packed_libs.js?3339d949:11374:90), <anonymous>:3:115)
    at update (http://octopi.local/static/webassets/packed_libs.js?3339d949:11398:400)
    at a.B.i (http://octopi.local/static/webassets/packed_libs.js?3339d949:11378:286)
    at Function.Pc (http://octopi.local/static/webassets/packed_libs.js?3339d949:11357:355)
    at Function.Qc (http://octopi.local/static/webassets/packed_libs.js?3339d949:11357:133)
    at Function.aa (http://octopi.local/static/webassets/packed_libs.js?3339d949:11356:482)
    at Object.a.m.a.B (http://octopi.local/static/webassets/packed_libs.js?3339d949:11355:39)
    at http://octopi.local/static/webassets/packed_libs.js?3339d949:11378:273
    at Object.q (http://octopi.local/static/webassets/packed_libs.js?3339d949:11317:244)
callViewModelIf @ packed_core.js?3514a079:16553
packed_libs.js?3339d949:11378 Uncaught TypeError: Unable to process binding "html: function(){return $parent.formatBarTemperature(name(),actual(),target()) }"
Message: self.settings.useShortNames is not a function
    at NavbarTempViewModel.self.formatBarTemperature (packed_plugins.js?8ec07a83:2496)
    at html (eval at parseBindingsString (packed_libs.js?3339d949:11374), <anonymous>:3:115)
    at update (packed_libs.js?3339d949:11398)
    at a.B.i (packed_libs.js?3339d949:11378)
    at Function.Pc (packed_libs.js?3339d949:11357)
    at Function.Qc (packed_libs.js?3339d949:11357)
    at Function.aa (packed_libs.js?3339d949:11356)
    at Object.a.m.a.B (packed_libs.js?3339d949:11355)
    at packed_libs.js?3339d949:11378
    at Object.q (packed_libs.js?3339d949:11317)
Cosik commented 4 years ago

@ScottWell1 please create new issue, with additional information as web browser, full log and python version. I will try dig into this issue.

ScottWell1 commented 4 years ago

Closing issues that have clearly not been resolved is NOT COOL, especially when code hasn't been released and attempted resolution has just caused additional problems. Your choice. I am not going to waste more time here. I will just take existing released code and make simple visibility changes. Good luck.

Cosik commented 4 years ago

@ScottWell1 I don't agree with you. Good practice is to create ticket per each issue. It's not good to resolve a lot of issues in one ticket. I didn't write that I will not fix it. I just want to have new ticket for it.