Using any GPIO on any Shelly?

  • I recently purchased a shelly 1 to use with my garage door and was pleased that I could power it with 12v DC and use the switch terminal along with the 12v+ to read the state of a magnetic reed relay and see if my garage door was open or shut.

    I want to do something similar with a motion PIR sensor that runs on 3.3v, but I've been getting conflicting reports on what pins back there actually connect to. I would imagine that the 3.3v pin is only connected to the 3.3v rail that powers the ESP8266 and I would imagine that the GND likewise is connect to the same GND that the ESP8266 is connected to. I've seen some people claim that the GND is wired to the N or L terminal, but surely not, right? The ESP8266 needs a ground source and that couldn't be connected to L or N without frying it.

    My working assumption here is that GPIO-0 is the dangerous pin, but I have zero idea in reality. Can someone confirm exactly which GPIO pins connect directly to the ESP8266 and which ones connect up to O, I, SW, L, or N?

  • Matthew Bennett 16. Juni 2022 um 03:35

    Hat das Label von Shelly 1L auf Shelly 1 geändert.
  • GPIO GND is internally linked with pin L (at almost all Shelly actors). Exception: Shelly 1L - GPIO GND is linked with Sx. Another exceptions are Shelly RGBW2 and Shelly UNI due to low voltage supply…

    Addendum: In every situation a Shelly is linked with low voltage accessories, low voltage supply of the whole application or a sophisticated prevention against electric shock is mandatory! The lives of your family and yours deserve such a precaution!

    „Habt Geduld. Alle Dinge sind schwierig, bevor sie einfach werden!“ (aus Frankreich)

    „Nothing in life is to be feared, it is only to be understood.“ (Marie Curie, 1867-1934)

    „Es reicht nicht“, rief Schiller, „Gedankenfreiheit zu fordern, man muß auch denken können, sonst fordert man Gedankenlosigkeitsfreiheit und die ist die Freiheit zur Dummheit, welche wiederum die schlimmste Unfreiheit überhaupt ist!“
    (Aus „Besuch aus Weimar“ von Gert Heidenreich, Schriftsteller, *1944 in Eberswalde)

    3 Mal editiert, zuletzt von thgoebel (16. Juni 2022 um 19:20)

  • GPIO GND is internally linked with pin L (almost all Shelly actors). Exception: Shelly 1L - GPIO GND is linked with Sx. Another exceptions are Shelly RGBW2 and Shelly UNI due to low voltage supply…

    Hmmm... That's a little disappointing that so many of their line up is designed this way. I get that L is ground when in 12v mode on the shelly 1, but it feels like a significant and dangerous oversight to have created a setup where there average person would reasonably assume GND meant GND in any situation. Still that's good to know that the rest of it is low voltage, I could cut the trace leading to the GND pin on the programming header and add a jumper wire to an actual GND and have everything in a safe configuration.

    Conversely, the Shelly 1L is configured correctly from the get go and would be the better option. I can use SW1 and SW2 to control my light and ceiling fan and used 3.3v, GND, and GPIO-0 to read the status of my PIR. And use 1.27mm spaced header pins. The trade off here being that the shelly-1L can't handle as much current as the Shelly-1, but since it's just controlling a light switch and ceiling fan, it should be well within tolerances

  • I could cut the trace leading to the GND pin on the programming header

    …and this would be absolutely dangerous! Flashing a Shelly is possibly without mains supply only! The ESP8266 must be supplied by the adapter and with 3,3V DC. There are some adapters delivering 5V, which will kill the ESP immediately.

    In a perspective of security, the Shelly 1L isn’t much better than other Shellies. Have a look at the innards and you’ll understand:

    thgoebel
    1. Februar 2022 um 19:06

    „Habt Geduld. Alle Dinge sind schwierig, bevor sie einfach werden!“ (aus Frankreich)

    „Nothing in life is to be feared, it is only to be understood.“ (Marie Curie, 1867-1934)

    „Es reicht nicht“, rief Schiller, „Gedankenfreiheit zu fordern, man muß auch denken können, sonst fordert man Gedankenlosigkeitsfreiheit und die ist die Freiheit zur Dummheit, welche wiederum die schlimmste Unfreiheit überhaupt ist!“
    (Aus „Besuch aus Weimar“ von Gert Heidenreich, Schriftsteller, *1944 in Eberswalde)

  • …and this would be absolutely dangerous! Flashing a Shelly is possibly without mains supply only! The ESP8266 must be supplied by the adapter and with 3,3V DC. There are some adapters delivering 5V, which will kill the ESP immediately.

    In what world would that be dangerous? I have a pin labeled ground that is in fact connected to 120V Line THAT'S what is dangerous! By cutting that trace at the pin header and adding a jumper to the actual DC ground it's much safer, not more dangerous.

    And yes obviously this programming header is connected directly to the ESP and not going through a regulator so attention has to be given to the power provided it. But I'm not talking about flashing the Shelly. I'm talking about using the 3.3v pin, GND pin (actually connected to ground), and GPIO-0 to be used with a sensor.

    Looking at the the electrical drawing in the post you linked it looks like Sx is a pseudo-ground for DC created by two mosfets? Well I'd prefer a transformer with an isolated ground on the DC side, but clearly when wired CORRECTLY it's safe enough to not blow up the ESP so I'm not certain what your overall point is?

  • Dieses Thema enthält 15 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind, bitte registrieren Sie sich oder melden Sie sich an um diese lesen zu können.