Open jminardi opened 8 years ago
Uhm never had such a problem. Sounds weird, but possible. I try to investigate this when I have a little bit more time.
Is there anything I can do to help debug? We have about 15 machines running this now and we probably see the issue on one machine a week.
Well you could check what gets transmitted on a Save click while the settings haven't been fully loaded.
EDIT: on a short check I guess you could be right with your assumption. I guess the settings part needs a little refactoring on my side.
I know it is pretty much two years ago, but I just started, and where I love this plugin settings are still not saving. Actually these are saved, but then after page refresh are wiped.
Same here ... can save (working) system commands ... after refresh they are gone :-( (Love this plugin ... the only chance to shut down my printer after a job with my TPLink HS100.)
I'm also having this issue with my commands getting deleted. Hardware is a Raspberry Pi 3, RPi Ver1 Camera with Octoprint 1.3.6 connected to my network via WiFi, with the following additional plugins: CR-10 Leveling (2.0.0) Detailed Progress (0.1.4) FullScreen (0.0.4) PortLister (0.1.7) System Command Editor (0.3.1) TP-Link Smartplug (0.9.3) WebCam Tab (0.1.2)
The two commands I want are "sudo service webcamd start" and "sudo service webcamd stop". As for TP-Link, I have two WiFi plugs, one for the printer(CR-10s) and one for a LED light bar. I have also tried using a Raspberry Pi 2 and/or a IR Nightvision Pi Camera without success. After I add the commands into plug-in interface, I can terminal into the Pi and they are added to the ~/.octoprint/config.yaml file, but typically on restart of the device, they will be deleted or the file gets reverted back to stock configuration. really annoying.
Here is what i discovered, every time I click Save in the SystemCommandEditor interface after writing commands, it updates ~/.octoprint/config.yaml. But when I restart OctoPrint either from a terminal or OctoPrint Menu, during boot up it rewrites the config.yaml back to a factory default and time stamps it with the last bootup of octoprint without the new user entered commands. this also happens when you do a shutdown and fire it back up from scratch.
O.o that sounds strange.
@4RnrRick what you're describing sound like a completely different bug. @foosel do you know any recent changes to the OctoPrint Core which could cause the problem of @4RnrRick?
To behonest I completely forgot about the initial bug -.-
@Salandora not really recent. But a long long time ago (in a galaxy far away) the restart/shutdown commands became something special and there's migration code in there that will extract those from the system commands if detected. That shouldn't touch any other defined system commands however.
Log files might help. I also think I made it create a backup in such a migration case (config.system_command_migration.yaml
in the same folder), so that would allow debugging this further if it's indeed caused by that migration.
I can confirm the same symptom/problem @4RnrRick has reported. I created commands and they work/behave correctly. Once Octoprint restarts (e.g. choosing to restart from the menu), the commands disappear/are removed from the config.yaml.
I can confirm that I am still seeing this issue.
Having the same issue all the time. Quite annoying :(.
I do face the same issue. Commands disappear after refresh on the browser or on re-loading.
I use mac pro and Pi 3 B+
And the same here...
This happend thrice in a row here last week. Any updates on this?
@MathijsG do you use the TPLinkSmartplug plugin? Also which of both bugs appead to you?
the one @jminardi mentioned or the one @morthimor, @fchansa and @4RnrRick mentioned.
@Salandora No I'm not using that plugin. I'm using Domoticz with an RFLink and a 433 Mhz switch, but that doesn't matter, I only use an HTTP URL with it via CURL. Which works, until it somehow randomly is away again.
I am getting this issue as well. When I restart OctoPrint the commands I added are gone and I have to add them again.
I lost them 4 times, I just put them in again & restarted by sudo /etc/init.d/octoprint stop & then start. Now it seems to be staying, restarted again from web iface 4x and its still there. Maybe that helps you figure it out.
Same here, plugin still deleting my commands ;(
Same here. Any commands I set up will disappear after a while.
Also would like to report the same issue.
Any updates to that issue?
Same issue here, System commands loosen periodically. I used also Tasmota plugin and each time I use the Tastmota UI button, System commands are loosen. I found an alternative solution by disabling the System Commands Editor plugin at once I have created my commands. Now my commands don't disappear anymore !
Same problem here. The configuration of the plugin is often overridden by "system: {}" in config.yaml when an other plugin write in this file. In my case, it's when "bed visualizer" plugin write the mesh data.
@lvillanne exactly what I'm experiencing. After running Bed Visualizer everything created in System Commands is gone.
do de do... same issue here, seems to be any time octoprint restarts or i use the bolt icon to power on or off my printer using MQTT tasmota plugin by @jneilliii
I've been testing this relative to my plugins and the system commands being entered in config.yaml without the System Command Editor plugin installed/enabled and I have not been able to recreate the issue. The system commands I have entered have been persistent and are not disappearing. Of course, I don't think @Salandora is actively developing anymore, so maybe if you try using the plugin to configure your system commands, disable the plugin, and then restart OctoPrint.
@jneilliii well actually I'm about to "try" a restart on my plugins. This will also include a complete rewrite of the system controls and custom controls editors backends.
I'm aware of a few bugs and I think I can get around those bugs with a better more reliable backend implementation.
So if I'm not loosing interest again expect a partial rewrite of this plugin and the custom controls editor plugin.
Alright I just released a pre-release v0.4.0 in there both bugs should be removed. Maybe someone wants to test it and report back here?
Easiest way to install the pre-release (at least in my opinion) is by installing it through octoprints plugin manager.
Plugin Manager -> Get more -> ... from URL
https://github.com/Salandora/OctoPrint-SystemCommandEditor/archive/pre-0.4.0.zip
Install -> Restart OctoPrint -> Enjoy
Oh awesome, will cheak it out later tonight and report back, thanks salandora!
I wouldn't @grantpeterwilliamson that release isn't quite ready... I've done extensive testing.
I was also experiencing the issue with commands being lost which I attributed to shutdown/restart actions.
For my use-cases, the issues with lost commands have been resolved with pre-0.4.0
While I have not done extensive testing, here is what I did and tested...
pre-0.4.0
version from URLThe commands were not lost after:
@jabend can you edit a command now? That was broke prior when I was testing.
Editing is still a problem, I haven'T pushed my fixes yet, because I'm actually moving places and it is more time consuming then I would like to acknowledge so I haven'T done anything on the plugins last few weeks. Maybe I can push my actual state at the weekend and make a second pre-release for you guys to test.
This issue still exists. Do we think there will be an update anytime soon that resolves it?
Just want to add my desire for the revamp. Hope the move went well during COVID.
Just experienced the issue. Is anyone looking into this ?
I put together a script that backs up and restores lost entries from config.yaml Use at your own risk. No warranty whatsoever. The file is attached. Tested and works with plugin version 0.3.4 sce.zip
@lmcbmai it seems that the pre-release version linked prior has worked for fixing the issue for some.
@jneilliii There was one report of the issue still being present after posting pre-release link, so I was not sure... Anyway, it was a good chance for me to learn Python :) Thanks
Still have the issue was going to try @lmcbmai back up util
This is also still an issue, too bad this is not fixed :(
I upgraded to 0.4.0 and I still have this problem.
Unfortunately, the plug-in has become completely unusable for me. Uninstalling now...
apologies for being so late to the party.... I have a functional version of this plugin (based on the master branch) here: https://github.com/synman/OctoPrint-SystemCommandEditor/archive/refs/heads/master.zip
Every once in a while all system commands get deleted.
I suspect this happens when the request to get the current system commands from octoprint hangs, and the user clicks save before any are loaded. This causes the system command editor plugin to save the now empty list of system commands, overwriting everything. This is just a suspicion based on the fact that I sometimes see the system commands take 10+ seconds to be listed in the plugin.
Let me know if there is anything I can do to help debug/fix this issue.
A quick workaround would be to implment a confirmation dialog any time all system commands are deleted.