I've created a plugin, followed the tutorial and manually deployed it to Raspberry Pi. It works great - after some messing around. But I have a few questions.
Folder structure-wise my plugin is nearly identical to the helloworld sample.
So to deploy the plugin, I copied octoprint_lifxswitch folder to the /home/pi/.octoprint/plugins directory on the PI. That didn't work: it would show the plugin in the Settings screen, but wouldn't do anything once I clicked on it. By looking at the logs, I realized that it was looking for octoprint.plugins.octoprint_lifxswitch plugin, rather than just octoprint.plugins.lifxswitch. Therefore, OctoPrint is getting the name of the plugin based on the name of the directory. I changed the folder from octoprint_lifxswitch to lifxswitch, restarted the PI and everything worked fine.
My questions are as follows:
I have plugin_identifier = "lifxswitch" at the bottom of init.py file. Shouldn't that tell OctoPrint to look for octoprint.plugins.lifxswitch?
The same init.py file has the following line: plugin_name = "Lifx Switch". However, OctoPrint settings screen still shows the plugin as lifxswitch in the sidebar. Why is that and what do I have to do to show the proper plugin name?
Finally, did I go about deploying it correctly?
P.S. I should mention that I am completely new to Python so it is probable that I have made some rookie mistakes.