Enclusure Plugin Not Working

Encluseure Plugin Not Working.

I connected the SSR to pin 18. And it works normally in the console command.

pi@octopi:~ $ gpio export 18 out
pi@octopi:~ $ gpio -g write 18 1
pi@octopi:~ $ gpio -g write 18 0
pi@octopi:~ $

However, it does not work with octoprint's web service command.

Advanced Options setting "Use SUDO" checked.

What is the problem?

THANK!

The -g flag specifies BCM pin numbering. Are you using BCM mode in the plugin?

Logs also help.

Where do I set the -g flag? Below is the log.

2021-02-19 12:35:28,114 - octoprint.plugins.detailedprogress - INFO - OctoPrint-DetailedProgress loaded!
2021-02-19 12:35:28,117 - octoprint.plugins.enclosure - INFO - Setting GPIO pin 18 as OUTPUT with initial value: 0
2021-02-19 12:35:28,127 - octoprint.plugins.octolight - INFO - --------------------------------------------
2021-02-19 12:35:28,128 - octoprint.plugins.octolight - INFO - OctoLight started, listening for GET request
2021-02-19 12:35:28,141 - octoprint.plugins.octolight - INFO - Light pin: 13, inverted_input: False
2021-02-19 12:35:28,141 - octoprint.plugins.octolight - INFO - --------------------------------------------
2021-02-19 12:35:28,143 - octoprint.plugins.stats - INFO - Printer Stats
2021-02-19 12:35:28,689 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2021-02-19 12:35:29,149 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'base_url': 'http://192.168.0.177/', 'path': '/', 'query_string': 'l10n=en'}
2021-02-19 12:35:31,123 - octoprint.server.util.sockjs - INFO - User winchild logged in on the socket from client ::ffff:192.168.0.114
2021-02-19 12:35:49,007 - octoprint.server.preemptive_cache - INFO - ... done in 19.86s
2021-02-19 12:35:49,007 - octoprint.server.preemptive_cache - INFO - Preemptively caching / (ui _default) for {'base_url': 'http://192.168.0.178/', 'path': '/', 'query_string': 'l10n=en'}
2021-02-19 12:35:49,410 - octoprint.server.preemptive_cache - INFO - ... done in 0.40s
2021-02-19 12:39:11,534 - octoprint.server.util.flask - INFO - Passively logging in user winchild from ::ffff:192.168.0.114
2021-02-19 12:39:11,535 - octoprint.access.users - INFO - Logged in user: winchild
2021-02-19 12:39:11,705 - octoprint.server.util.sockjs - INFO - Client connection closed: ::ffff:192.168.0.114
2021-02-19 12:39:12,437 - octoprint.server.util.sockjs - INFO - New connection from client: ::ffff:192.168.0.114
2021-02-19 12:39:12,534 - octoprint.server.util.flask - INFO - Passively logging in user winchild from ::ffff:192.168.0.114
2021-02-19 12:39:12,535 - octoprint.access.users - INFO - Logged in user: winchild
2021-02-19 12:39:15,650 - octoprint.server.util.sockjs - INFO - User winchild logged in on the socket from client ::ffff:192.168.0.114
2021-02-19 12:39:26,455 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2021-02-19 12:39:26,493 - octoprint.util.comm - INFO - Serial detection: Performing autodetection with 7 port/baudrate candidates: /dev/ttyUSB0@115200, /dev/ttyUSB0@250000, /dev/ttyUSB0@230400, /dev/ttyUSB0@57600, /dev/ttyUSB0@38400, /dev/ttyUSB0@19200, /dev/ttyUSB0@9600
2021-02-19 12:39:26,493 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyUSB0, baudrate 115200
2021-02-19 12:39:26,494 - octoprint.util.comm - INFO - Connecting to port /dev/ttyUSB0, baudrate 115200
2021-02-19 12:39:26,518 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2021-02-19 12:39:26,523 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-02-19 12:39:27,603 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting serial connection" to "Operational"
2021-02-19 12:39:27,663 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-02-19 12:39:27,667 - octoprint.plugins.firmwareupdater - INFO - Got CONNECTED event
2021-02-19 12:39:27,667 - octoprint.plugins.firmwareupdater - INFO - Run postflash flag is not set
2021-02-19 12:39:27,668 - octoprint.plugins.stats - INFO - Printer Stats - on_event
2021-02-19 12:39:27,675 - octoprint.plugins.firmware_check - WARNING - Your printer's firmware is known to lack mandatory safety features (e.g. thermal runaway protection). This is a fire risk.. More information at https://faq.octoprint.org/warning-firmware-unsafe
2021-02-19 12:39:33,333 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin 1.1.0 From Archive"
2021-02-19 12:50:03,840 - octoprint.server.heartbeat - INFO - Server heartbeat <3

He was referring to your working command lines gpio -g write 18 1, which means you need to use BCM mode. But looking at the plugin's wiki, it seems that should already be the case?

By default the plugin uses BCM pin numbers.

I couldn't find the cause anyway, so I initialized the whole system and it works normally.

SHELL to estimate. It seems that the execution of the octoprint side was affected by the gpio command, which was issued by testing in.

Thank you.