kantlivelong / OctoPrint-PSUControl

Smart control of your power supply via GPIO, GCODE Command, System Command, or variety of sub-plugins.
GNU Affero General Public License v3.0
203 stars 113 forks source link

HTTP Error, got 403 Client Error #241

Open zockol opened 2 years ago

zockol commented 2 years ago

Hello, i am currently working on my octoprint docker-compose setup and tried to manually start psucontrol via terminal. therefore i looked up where i am in the console by using "pwd", it returned /run/s6/services/octoprint. Then i moved back the directories and tried to start psucontrol "cd ../../../../bin/ | octoprint plugins psucontrol:on". When using this command it gives me

Initializing settings & plugin subsystem... HTTP Error, got 403 Client Error: FORBIDDEN for url: http://127.0.0.1:5000/api/plugin/psucontrol?command=turnPSUOn

and nothing happens afterwards.

  1. start terminal of the docker image
  2. use pwd to get your path
  3. locate the octoprint executable
  4. execute the octoprint with parameter plugins psucontrol:on -> "octoprint plugins psucontrol:on"
  5. getting the error

OS: Currently running on a Raspbian with docker-compose setup.

docker-compose.yaml: services: octoprint: container_name: octoprint image: octoprint/octoprint restart: always environment:

OctoPrint Version 1.8.1, PSU Control 1.0.6 running with PSUControl-Tapo 0.1.2

Ender 3 v2 with JyersUI and compatible GCode

octoprint.log https://gist.github.com/zockol/ba3b6c0d75c1ebeab20efa7d2c7ead9c

kantlivelong commented 2 years ago

You likely need to specify the config directory in your octoprint command.

Usage: octoprint [OPTIONS] COMMAND [ARGS]...

Options:
  -b, --basedir PATH  Specify the basedir to use for configs, uploads,
                      timelapses etc.