Remote power (Light)

Hi, thanks for letting me join your forum. I am new to Octoprint, so please excuse my ignorant mistakes :smile:
I had no issues getting things working in a basic way using a RPI 3b and its own camera, but then I realised that I needed to be able to turn on the light in the enclosure, if I wanted to see how things were going at night.
I thought I would make one of the I/O pins on my PI go high, connect that to a solid state relay and thence to the AC power for the light.
I found a power supply switching plugin for Octoprint (PSU Control 0.1.7) and installed it with Octoprint via my laptop. It seemed to work software wise (the lightning bolt icon went green/gray when I clicked it), so I proceeded to configure the hardware.
At this point I moved to the shed, where my printer is, and using the PC there (win 10), I connected to Octoprint. The power plugin was in the list of plugins, but the lightning bolt icon was missing.
In the end, I removed and reinstalled the Power plugin from Octoprint, which created the lightning bolt icon, but this time it didn't go green when I clicked it.
It now won't go green on my laptop either :frowning:
The pin I have selected on the PI is GPIO2, which is what I have selected in the configuration for the power plugin. GPIO2 stays at 3.3V when measured with a DMM.
Sorry about the long winded explanation, I'm sure I am missing something.

You mention the laptop and PCs and such, but all along Octoprint was on your Pi, right? I mean, GPIO on PCs is a different beast.

It should work, independent of your browser. Share your octoprint.log.

Thanks for the reply. Yes Octoprint is on my PI, and I connect to the PI from a webbrowser on a PC on my lan. I found the issue, it was simply my choice of GPIO. I used pin 40 as the GPIO and everything worked as expected. My initial choice must have been in use by something else. Thanks again for the reply.
Dave

Sounds like you may have been on Pin 1.

No, I was definitely using GPIO2, although your diagram of the pinouts differs from mine.

I was measuring between GPIO2 and GND.

Just from curiosity, what does BCM stand for?

I guess I should have just given you the link: https://pinout.xyz

  • BCM - Broadcom pin number, commonly called "GPIO", these are the ones you probably want to use with RPi.GPIO and GPIO Zero

All clear now, thanks for that. My Pi is a B+, so it has more pinouts, but basically the same.