Developing own plugin

Hello,
I want to make some changes to Octoprint. What I'm trying to achieve is add an option to configure the printer eeprom (Z offset, Steps per mm) based on the extruder type. There will be a button in Octoprint main window, clicking it will show some other buttons like Ceramic Head, Filament Head, Syringe Pump etc.. Clicking on certain head will load printer EEPROM with certain Gcodes

I'm not a developer, I have some basic python knowledge (Made a small GUI once) and intermediate C. so first question first. Is it possible to create a plugin to do this ?? or Do I have to modify the source code ?

I'm little confused about the development documents available

I'm on windows, If I want to develop a plugin which document should I follow to install octoprint

This one
https://community.octoprint.org/t/setting-up-octoprint-on-windows/383
or this one
https://docs.octoprint.org/en/master/plugins/gettingstarted.html

There is a small difference between both
First one doesn't have this $ pip install -e .[develop,plugins]

I have tried the second link (development), This is what I did
Created a folder named Octoprint in C
Opened terminal inside it

$ git clone https://github.com/foosel/OctoPrint
$ cd OctoPrint
$ virtualenv venv
$ venv\Scripts\activate.bat
$ pip install -e .[develop,plugins]

Run the Octoprint using
octoprint serve

I had to run this because there was no folder named Octoprint in %APPDATA%

I was able to access OctoPrint at http://localhost:5000/

The I created the helloworld.py file in desktop, copied it to %APPADAT%\OctoPrint\plugins

Then I shut down the Octoprint (Ctrl+C, I don't know restart command), Started it again using octoprint serve

I could find something like this

2019-08-29 22:37:41,361 - octoprint.plugin.core - INFO - 15 plugin(s) registered with the system:
|  Action Command Prompt Support (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\action_command_prompt
|  Announcement Plugin (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\announcements
|  Anonymous Usage Tracking (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\tracking
|  Application Keys Plugin (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\appkeys
|  Backup & Restore (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\backup
|  Core Wizard (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\corewizard
|  Discovery (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\discovery
|  Error Tracking (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\errortracking
|  Force Login (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\forcelogin
|  Hello World (1.0.0) = C:\Users\New User\AppData\Roaming\OctoPrint\plugins\helloworld.py
|  Logging (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\logging
|  Plugin Manager (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\pluginmanager
|  Printer Safety Check (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\printer_safety_check
|  Software Update (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\softwareupdate
|  Virtual Printer (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\virtual_printer

If I want to continue working on this tutorial, not today, and shut the Octoprint down, where should I start when I come back

Should I go to the Octoprint folder where I cloned from github
Then

$ cd OctoPrint
$ venv\Scripts\activate.bat
$ pip install -e .[develop,plugins]

and continue with the rest of the tutorial.

Or do I have to do everything again ??

Also what are commands for shutdown, restart etc ??

Thanks

Welcome to my life. Each morning I wake up, boot up the Pi computer then I run...

cd ~
source oprint/bin/activate
octoprint serve

Mine is slightly different than yours but this should answer your question.

Just make sure at the end of a session you:

# Ctl-C to exit OctoPrint
sudo poweroff # to make sure that the Pi is stopped gracefully

You might want to take a look at the existing set of plugins. I see an EEPROM editor for both Marlin and Repetier, for what it's worth. Review the author's code for loadEeprom() and saveEeprom() if you were curious.

1 Like

Those commands are for pi, it looks like he's developing in Windows. For that I use the following in a batch file and then just double-click it when I want to start up my local deve OctoPrint. I got this script on this forum somewhere. What I did is save the file in C:\OctoPrint\venv\Scripts\ as restart.bat and then in OctoPrint's server settings I set the restart command to the script as C:\OctoPrint\venv\Scripts\restart.bat. That way you can also restart the server from the web interface.

@if octoprint.==. (goto error) ELSE (goto restart)

:restart
@taskkill /f /im octoprint.exe >nul
@timeout /t 3 /nobreak >nul
@start octoprint.exe serve >nul
@echo restart complete
@goto exit

:error
@echo Oops... something went wrong!
@goto exit

:exit

To kill the server when I'm done I just do the ctrl+c thing, but you could create another shutdown script using the first part of the script above.

@if octoprint.==. (goto error) ELSE (goto shutdown)

:shutdown
@taskkill /f /im octoprint.exe >nul
@echo shutdown complete
@goto exit

:error
@echo Oops... something went wrong!
@goto exit

:exit
1 Like

To be honest, I have some aliases installed in my ~/.bashrc file.

alias begin='source ~/oprint/bin/activate && cd ~/OctoPrint-MyPlugin'
alias fistory='history | grep '
alias octocat='cat ~/.octoprint/logs/octoprint.log'
alias octotail='tail -f ~/.octoprint/logs/octoprint.log'

And I have a script /usr/local/bin/cycle:

#!/bin/sh

clear
cd ~/OctoPrint-MyPlugin
python setup.py develop
sudo service octoprint restart
tail -f ~/.octoprint/logs/octoprint.log

So my routine is...

begin
cycle

Each time I do an rsync of the code from my workstation to the Pi then...

# Ctl-C, up cursor, enter (to run cycle again)

The rsync is triggered by a Visual Studio macro with Shift-Ctl-T.


By the way, you can add one @echo off to the top of your batch file and you don't have to prepend @ for every line. You can drop the ELSE clause from the first line since it will go there if the test isn't true.

1 Like

Thanks for the replies,

@if octoprint.==. (goto error) ELSE (goto restart)

:restart
@taskkill /f /im octoprint.exe >nul
@timeout /t 3 /nobreak >nul
@start octoprint.exe serve >nul
@echo restart complete
@goto exit

:error
@echo Oops... something went wrong!
@goto exit

:exit

Sorry for the stupid question but what language is this ? Shell script ?

I have tried your scripts and saved it in the location you mentioneda. It starts the server, but one doubt,
I'm not seeing any

$ venv\Scripts\activate.bat
$ octoprint serve

in this. Isn't this necessary ??
I think $ octoprint serve is same as running octoprint.exe

What should I put here ?

Also which instructions should I follow for development in windows ? One in the community forum or one in plugin tutorial. The reason I'm asking this is, before this I tried the one in community forum and in Octoprint folder there was only venv folder. But after doing one in plugin tutorial it has all the files of octoprint.

@jneilliii
If I start octoprint by running your script, I get following message of Octoprint

I think it's not detecting the Plugin tutorial helloworld plugin and installed EEPROM plugin

Here's the log

2019-08-30 15:22:11,793 - octoprint.startup - INFO - ******************************************************************************
2019-08-30 15:22:11,793 - octoprint.startup - INFO - Starting OctoPrint 1.3.11
2019-08-30 15:22:11,793 - octoprint.startup - INFO - Starting in SAFE MODE. Third party plugins will be disabled!
2019-08-30 15:22:11,793 - octoprint.startup - INFO - Reason for safe mode: problem during last startup
2019-08-30 15:22:11,793 - octoprint.startup - INFO - ******************************************************************************
2019-08-30 15:22:11,934 - octoprint.util.connectivity_checker - INFO - Connectivity changed from offline to online
2019-08-30 15:22:11,950 - octoprint.startup - INFO - Blacklist processing done, adding 1 blacklisted plugin versions: roomtemp (any)
2019-08-30 15:22:12,043 - octoprint.plugin.core - INFO - Loading plugins from c:\octoprint\octoprint\src\octoprint\plugins, C:\Users\New User\AppData\Roaming\OctoPrint\plugins and installed plugin packages...
2019-08-30 15:22:15,059 - octoprint.plugin.core - INFO - Plugin Pi Support Plugin did not pass check, not loading.
2019-08-30 15:22:15,371 - octoprint.plugins.octoprint.plugins.discovery - INFO - pybonjour is not installed, Zeroconf Discovery won't be available
2019-08-30 15:22:15,388 - octoprint.plugin.core - INFO - Found 16 plugin(s) providing 14 mixin implementations, 22 hook handlers
2019-08-30 15:22:15,466 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2019-08-30 15:22:16,825 - octoprint.server - INFO - Intermediary server started
2019-08-30 15:22:16,825 - octoprint.plugin.core - INFO - Loading plugins from c:\octoprint\octoprint\src\octoprint\plugins, C:\Users\New User\AppData\Roaming\OctoPrint\plugins and installed plugin packages...
2019-08-30 15:22:16,841 - octoprint.plugin.core - INFO - Plugin Pi Support Plugin did not pass check, not loading.
2019-08-30 15:22:16,982 - octoprint.plugin.core - INFO - Found 16 plugin(s) providing 14 mixin implementations, 22 hook handlers
2019-08-30 15:22:17,013 - octoprint.filemanager.storage - INFO - Initializing the file metadata for C:\Users\New User\AppData\Roaming\OctoPrint\uploads...
2019-08-30 15:22:17,013 - octoprint.filemanager.storage - INFO - ... file metadata for C:\Users\New User\AppData\Roaming\OctoPrint\uploads initialized successfully.
2019-08-30 15:22:17,559 - octoprint.plugins.softwareupdate - INFO - Loaded version cache from disk
2019-08-30 15:22:20,061 - octoprint.util.pip - INFO - Using "c:\octoprint\octoprint\venv\scripts\python.exe -m pip" as command to invoke pip
2019-08-30 15:22:22,483 - octoprint.util.pip - INFO - Version of pip is 19.2.3
2019-08-30 15:22:22,483 - octoprint.util.pip - INFO - pip installs to c:\octoprint\octoprint\venv\Lib\site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2019-08-30 15:22:22,483 - octoprint.util.pip - INFO - ==> pip ok -> yes
2019-08-30 15:22:22,499 - octoprint.plugin.core - INFO - Initialized 14 plugin implementation(s)
2019-08-30 15:22:22,513 - octoprint.plugin.core - INFO - 16 plugin(s) registered with the system:
|  Action Command Prompt Support (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\action_command_prompt
|  Announcement Plugin (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\announcements
|  Anonymous Usage Tracking (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\tracking
|  Application Keys Plugin (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\appkeys
|  Backup & Restore (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\backup
|  Core Wizard (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\corewizard
|  Discovery (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\discovery
| !EEPROM Marlin Editor Plugin (1.2.1) = c:\octoprint\octoprint\venv\lib\site-packages\octoprint_eeprom_marlin
|  Error Tracking (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\errortracking
|  Force Login (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\forcelogin
| !Hello World (1.0.0) = c:\octoprint\octoprint-helloworld\octoprint_helloworld
|  Logging (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\logging
|  Plugin Manager (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\pluginmanager
|  Printer Safety Check (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\printer_safety_check
|  Software Update (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\softwareupdate
|  Virtual Printer (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\virtual_printer
2019-08-30 15:22:22,513 - octoprint.environment - INFO - Detected environment is Python 2.7.12 under Windows (win32). Details:
|  hardware:
|    cores: 4
|    freq: 2201.0
|    ram: 8505569280
|  os:
|    id: windows
|    platform: win32
|  python:
|    pip: 19.2.3
|    version: 2.7.12
|    virtualenv: c:\octoprint\octoprint\venv
2019-08-30 15:22:22,529 - octoprint.server - INFO - Reset webasset folder C:\Users\New User\AppData\Roaming\OctoPrint\generated\webassets...
2019-08-30 15:22:22,529 - octoprint.server - INFO - Reset webasset folder C:\Users\New User\AppData\Roaming\OctoPrint\generated\.webassets-cache...
2019-08-30 15:22:23,296 - octoprint.server - INFO - Shutting down intermediary server...
2019-08-30 15:22:23,811 - octoprint.server - INFO - Intermediary server shut down
2019-08-30 15:22:23,811 - octoprint.events - INFO - Processing startup event, this is our first event
2019-08-30 15:22:23,811 - octoprint.events - INFO - Adding 1 events to queue that were held back before startup event
2019-08-30 15:22:23,826 - octoprint.filemanager - INFO - Adding backlog items from all storage types to analysis queue...
2019-08-30 15:22:23,842 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2019-08-30 15:22:23,842 - octoprint.filemanager - INFO - Added 0 items from storage type "local" to analysis queue
2019-08-30 15:22:23,858 - octoprint.server.util.watchdog - INFO - Running initial scan on watched folder...
2019-08-30 15:22:23,858 - octoprint.server.util.watchdog - INFO - ... initial scan done.
2019-08-30 15:22:23,921 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance on Defualt for SSDP
2019-08-30 15:22:23,983 - octoprint.server - INFO - Listening on http://0.0.0.0:5000 and http://[::]:5000
2019-08-30 15:22:24,138 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2019-08-30 15:22:25,936 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2019-08-30 15:22:25,967 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2019-08-30 15:22:26,826 - octoprint.util.pip - INFO - Using "c:\octoprint\octoprint\venv\scripts\python.exe -m pip" as command to invoke pip
2019-08-30 15:22:26,826 - octoprint.util.pip - INFO - pip installs to c:\octoprint\octoprint\venv\Lib\site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2019-08-30 15:22:26,826 - octoprint.util.pip - INFO - ==> pip ok -> yes
2019-08-30 15:22:27,029 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'query_string': 'l10n=en', 'path': '/', 'base_url': 'http://localhost:5000/'}
2019-08-30 15:22:27,687 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 11}
2019-08-30 15:22:28,483 - octoprint.plugins.tracking - INFO - Sent tracking event startup, payload: {'python': '2.7.12', 'ram': 8505569280L, 'version': '1.3.11', 'pip': '19.2.3', 'cores': 4, 'freq': 2201.0, 'os': 'windows'}
2019-08-30 15:22:33,835 - octoprint.server.util.sockjs - INFO - New connection from client: ::1
2019-08-30 15:22:33,936 - octoprint.server.util.flask - INFO - Passively logging in user Makercity from ::1
2019-08-30 15:22:33,967 - octoprint.server.util.sockjs - INFO - User Makercity logged in on the socket from client ::1
2019-08-30 15:22:35,694 - octoprint.server.preemptive_cache - INFO - ... done in 8.67s
2019-08-30 15:23:08,552 - octoprint.server.util.flask - INFO - Passively logging in user Makercity from ::1
2019-08-30 15:23:08,822 - octoprint.server.util.sockjs - INFO - Client connection closed: ::1
2019-08-30 15:23:10,411 - octoprint.server.util.sockjs - INFO - New connection from client: ::1
2019-08-30 15:23:10,490 - octoprint.server.util.flask - INFO - Passively logging in user Makercity from ::1
2019-08-30 15:23:12,769 - octoprint.server.util.sockjs - INFO - User Makercity logged in on the socket from client ::1

But if start ocotprint by going in to Octoprint folder (C:\Octoprint\OctoPrint)
running

venv\Scripts\activate.bat
octoprint serve

Everything loads properly

019-08-30 15:27:44,954 - octoprint.startup - INFO - ******************************************************************************
2019-08-30 15:27:44,970 - octoprint.startup - INFO - Starting OctoPrint 1.3.11
2019-08-30 15:27:44,970 - octoprint.startup - INFO - ******************************************************************************
2019-08-30 15:27:45,079 - octoprint.util.connectivity_checker - INFO - Connectivity changed from offline to online
2019-08-30 15:27:45,079 - octoprint.startup - INFO - Blacklist processing done, adding 1 blacklisted plugin versions: roomtemp (any)
2019-08-30 15:27:45,174 - octoprint.plugin.core - INFO - Loading plugins from c:\octoprint\octoprint\src\octoprint\plugins, C:\Users\New User\AppData\Roaming\OctoPrint\plugins and installed plugin packages...
2019-08-30 15:27:48,657 - octoprint.plugin.core - INFO - Plugin Pi Support Plugin did not pass check, not loading.
2019-08-30 15:27:49,197 - octoprint.plugins.octoprint.plugins.discovery - INFO - pybonjour is not installed, Zeroconf Discovery won't be available
2019-08-30 15:27:49,213 - octoprint.plugin.core - INFO - Found 16 plugin(s) providing 16 mixin implementations, 23 hook handlers
2019-08-30 15:27:49,457 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2019-08-30 15:27:50,967 - octoprint.server - INFO - Intermediary server started
2019-08-30 15:27:50,967 - octoprint.plugin.core - INFO - Loading plugins from c:\octoprint\octoprint\src\octoprint\plugins, C:\Users\New User\AppData\Roaming\OctoPrint\plugins and installed plugin packages...
2019-08-30 15:27:50,986 - octoprint.plugin.core - INFO - Plugin Pi Support Plugin did not pass check, not loading.
2019-08-30 15:27:51,121 - octoprint.plugin.core - INFO - Found 16 plugin(s) providing 16 mixin implementations, 23 hook handlers
2019-08-30 15:27:51,148 - octoprint.filemanager.storage - INFO - Initializing the file metadata for C:\Users\New User\AppData\Roaming\OctoPrint\uploads...
2019-08-30 15:27:51,151 - octoprint.filemanager.storage - INFO - ... file metadata for C:\Users\New User\AppData\Roaming\OctoPrint\uploads initialized successfully.
2019-08-30 15:27:51,608 - octoprint.plugins.softwareupdate - INFO - Loaded version cache from disk
2019-08-30 15:27:53,576 - octoprint.util.pip - INFO - Using "c:\octoprint\octoprint\venv\scripts\python.exe -m pip" as command to invoke pip
2019-08-30 15:27:56,134 - octoprint.util.pip - INFO - Version of pip is 19.2.3
2019-08-30 15:27:56,137 - octoprint.util.pip - INFO - pip installs to c:\octoprint\octoprint\venv\Lib\site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2019-08-30 15:27:56,138 - octoprint.util.pip - INFO - ==> pip ok -> yes
2019-08-30 15:27:56,145 - octoprint.plugin.core - INFO - Initialized 16 plugin implementation(s)
2019-08-30 15:27:56,158 - octoprint.plugin.core - INFO - 16 plugin(s) registered with the system:
|  Action Command Prompt Support (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\action_command_prompt
|  Announcement Plugin (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\announcements
|  Anonymous Usage Tracking (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\tracking
|  Application Keys Plugin (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\appkeys
|  Backup & Restore (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\backup
|  Core Wizard (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\corewizard
|  Discovery (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\discovery
|  EEPROM Marlin Editor Plugin (1.2.1) = c:\octoprint\octoprint\venv\lib\site-packages\octoprint_eeprom_marlin
|  Error Tracking (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\errortracking
|  Force Login (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\forcelogin
|  Hello World (1.0.0) = c:\octoprint\octoprint-helloworld\octoprint_helloworld
|  Logging (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\logging
|  Plugin Manager (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\pluginmanager
|  Printer Safety Check (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\printer_safety_check
|  Software Update (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\softwareupdate
|  Virtual Printer (bundled) = c:\octoprint\octoprint\src\octoprint\plugins\virtual_printer
2019-08-30 15:27:56,174 - octoprint.environment - INFO - Detected environment is Python 2.7.12 under Windows (win32). Details:
|  hardware:
|    cores: 4
|    freq: 2201.0
|    ram: 8505569280
|  os:
|    id: windows
|    platform: win32
|  python:
|    pip: 19.2.3
|    version: 2.7.12
|    virtualenv: c:\octoprint\octoprint\venv
2019-08-30 15:27:56,188 - octoprint.server - INFO - Reset webasset folder C:\Users\New User\AppData\Roaming\OctoPrint\generated\webassets...
2019-08-30 15:27:56,405 - octoprint.server - INFO - Reset webasset folder C:\Users\New User\AppData\Roaming\OctoPrint\generated\.webassets-cache...
2019-08-30 15:27:57,177 - octoprint.server - INFO - Shutting down intermediary server...
2019-08-30 15:27:57,479 - octoprint.server - INFO - Intermediary server shut down
2019-08-30 15:27:57,483 - octoprint.events - INFO - Processing startup event, this is our first event
2019-08-30 15:27:57,484 - octoprint.events - INFO - Adding 1 events to queue that were held back before startup event
2019-08-30 15:27:57,492 - octoprint.filemanager - INFO - Adding backlog items from all storage types to analysis queue...
2019-08-30 15:27:57,517 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2019-08-30 15:27:57,519 - octoprint.server.util.watchdog - INFO - Running initial scan on watched folder...
2019-08-30 15:27:57,519 - octoprint.filemanager - INFO - Added 0 items from storage type "local" to analysis queue
2019-08-30 15:27:57,532 - octoprint.server.util.watchdog - INFO - ... initial scan done.
2019-08-30 15:27:57,592 - octoprint.plugins.discovery - INFO - Registered OctoPrint instance on Defualt for SSDP
2019-08-30 15:27:57,598 - octoprint.server - INFO - Listening on http://0.0.0.0:5000 and http://[::]:5000
2019-08-30 15:27:57,812 - octoprint.plugins.pluginmanager - INFO - Loaded plugin repository data from disk, was still valid
2019-08-30 15:28:00,154 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2019-08-30 15:28:00,187 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2019-08-30 15:28:01,513 - octoprint.util.pip - INFO - Using "c:\octoprint\octoprint\venv\scripts\python.exe -m pip" as command to invoke pip
2019-08-30 15:28:01,516 - octoprint.util.pip - INFO - pip installs to c:\octoprint\octoprint\venv\Lib\site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2019-08-30 15:28:01,517 - octoprint.util.pip - INFO - ==> pip ok -> yes
2019-08-30 15:28:01,565 - octoprint.plugins.helloworld - INFO - Hello World!
2019-08-30 15:28:01,770 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'query_string': 'l10n=en', 'path': '/', 'base_url': 'http://localhost:5000/'}
2019-08-30 15:28:02,377 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 12}
2019-08-30 15:28:02,868 - octoprint.server.util.sockjs - INFO - New connection from client: ::1
2019-08-30 15:28:03,063 - octoprint.server.util.flask - INFO - Passively logging in user Makercity from ::1
2019-08-30 15:28:03,095 - octoprint.server.util.sockjs - INFO - User Makercity logged in on the socket from client ::1
2019-08-30 15:28:03,184 - octoprint.plugins.tracking - INFO - Sent tracking event startup, payload: {'python': '2.7.12', 'ram': 8505569280L, 'version': '1.3.11', 'pip': '19.2.3', 'cores': 4, 'freq': 2201.0, 'os': 'windows'}
2019-08-30 15:28:13,234 - octoprint.server.preemptive_cache - INFO - ... done in 11.47s
2019-08-30 15:29:41,020 - octoprint.server.util.flask - INFO - Passively logging in user Makercity from ::1
2019-08-30 15:29:41,265 - octoprint.server.util.sockjs - INFO - Client connection closed: ::1
2019-08-30 15:29:42,924 - octoprint.server.util.sockjs - INFO - New connection from client: ::1
2019-08-30 15:29:42,986 - octoprint.server.util.flask - INFO - Passively logging in user Makercity from ::1
2019-08-30 15:29:45,165 - octoprint.server.util.sockjs - INFO - User Makercity logged in on the socket from client ::1

Not sure what's going wrong with that one, it's always worked for me. I'll go through the steps again this weekend and see what might be happening. To answer your other questions though bat files are dos batch scripts, the windows equivalent of linux shell (.sh) scripts. I followed the instructions here in the forum to set-up my OctoPrint on windows, but don't remember if I did anything special when compiling OctoPrint specifically for development environment. I typically use the plugin manager to install my plugins using zip files rather than editing within the plugins folder. I know it's probably not the most efficient but allows me to see the whole process from install to running.

So I just installed on my work machine using the following commands, as outlined mostly in the forum post. The one caveat is that I have Python3 installed as well, so you have to make sure you're running the commands from within the right directory when creating your virtualenv. Here are the steps.

cd \Python27\Scripts
pip install virtualenv
mkdir c:\OctoPrint
virtualenv c:\OctoPrint\venv
cd \OctoPrint
venv\Scripts\activate.bat
pip install https://get.octoprint.org/latest
  • Add restart.bat file to the C:\OctoPrint\venv\Scripts\ folder.
  • Double-click restart.bat file in file explorer.
  • Open browser to http://localhost:5000

Add the command C:\OctoPrint\venv\Scripts\restart.bat into the server commands for restart OctoPrint.

I think the difference that you are seeing is that the instructions on the dev docs are if you are gong to dev OctoPrint itself, and therefore you get all the source code, etc. of OctoPrint itself. For plugin development you don't necessarily need that, so the program is compiled into octoprint.exe in the Scripts sub-folder.