Beiträge von tohlefawi

    Unfortunately I just don't know enough about MQTT or anything else needed to send the reset_totals message to the Shelly EM

    Can anyone tell me the best way to do this? I've tried all sorts of online resources and just can't seem to figure it out.

    I ran across this thread while searching how to do this myself, then figured it out after digging into https://shelly-api-docs.shelly.cloud/gen1/#http-dialect and https://shelly-api-docs.shelly.cloud/gen1/#shelly-em-emeter-index. Plopping http://ip-address-of-your-shelly/emeter/0?reset_totals=1 into a web browser will reset the totals for the 1st input, and same for http://ip-address-of-your-shelly/emeter/1?reset_totals=1 will reset for the 2nd input.

    Thank you, that's generally what I was thinking with the 3rd option I came up with. I'm deciding between that and the 2nd option i.e. using the Shelly to switch AC line current provided to separate DC supplies, one for the printer and another for the Pi. I didn't note it in that response but another advantage of that approach is I wouldn't have to source or deal with any external relays whereas I do have a spare 5V/2.5A USB supply.

    3dpRpiV3 (1).png

    Thanks, attached pic is what I was trying to do. The bottom part in red shows that when the Raspberry Pi was connected by serial to the 3DPrinter, it coupled their grounds together, even if e.g. O2 providing DC supply ground to the 3D printer is off/open circuit (red dashed line). Therefore even then the 3D Printer still gets a DC supply ground connection through the raspberry Pi serial and buck converter, as long as O1 is on/closed circuit. 3dpRpiV1.png

    Presume my options are one of...

    • Use 2 Shelly 1's in place of the Shelly 2.5 (Cons: expensive; overkill/complex from a management perspective)
    • Use the Shelly 2.5 to control AC line voltage to separate DC supplies: 24V for the printer, 5V for the OctoPi (could kill myself working with line voltage unless I keep this in the wall, which I don't want to do; 2nd AC/5vDC supply likely less efficient than the 24V->5V buck converter)
    • Use the Shelly 2.5 outputs to drive ports on an external relay module like https://www.amazon.com/dp/B00LW2G7V6 which then drives the two loads with common ground (extra component adds cost; might not be as reliable or efficient)

    I'm trying to let a Shelly 2.5 control power for my 3D printer mainboard on one port and for the printer's Octoprint Raspberry Pi on the other. My 3D printer's 24V DC supply is powering the Shelly 2.5, whose port 1 switches the 24V printer's mainboard, and port 2 switches a 24V->5V buck converter driving the OctoPi. I wired it as documented with the V+ (DC 24V) directly connected to the mainboard and buck converter, and the V- (DC 0V/Gnd) to the Shelly's L ports. Thus the Shelly wants to control power to each device by controlling presence of 0V/ground to each device.

    The problem is the OctoPi needs a serial connection to the printer's mainboard, and using either USB or GPIO for serial means connecting their grounds together. Thus with the above wiring, when the Shelly turns on say O1 but not O2, both of the loads come on anyway because the serial ground still completes the power circuit for the 2nd load bypassing the fact that the Shelly is not connecting O2 to L.

    It would be nice if I could invert the polarity of the DC+ and DC- connections, as that would solve the problem as 24V would be controlled to each rather than 0V. But I assume the Shelly doesn't support that. Appreciate any suggestions, thanks.