Pi_plates relayplate support - Printable Version +- SIP (https://nosack.com/sipforum) +-- Forum: SIP (Sustainable Irrigation Platform) (https://nosack.com/sipforum/forumdisplay.php?fid=1) +--- Forum: Feature requests (https://nosack.com/sipforum/forumdisplay.php?fid=4) +--- Thread: Pi_plates relayplate support (/showthread.php?tid=259) |
Pi_plates relayplate support - hugie - 2021 Sep 24 pi_plates makes stackable 7 relay HATs for raspberry pi. The relays are activated by simple python calls such as RELAY.relayON(platenumber,relaynumber). What would be involved in implementing a plugin for this? Has anyone tried? RE: Pi_plates relayplate support - dan - 2021 Sep 24 It looks like it would be very easy to modify the cli_control plugin for this. You would just need to install the pi_plates Python modules with pip and add a line to the cli_control.py file: Code: import piplates.RELAYplate as RELAY However, the Pi_plates RELAYplate seems a bit pricey. You can get an 8 or 16 channel relay board from Amazon for about 6 to 15 dollars and use the relay_16 plugin with just some jumper wires. Also astrogerard is working on a I2C plugin that will allow a very large number of relays to be connected to the pi with just a couple of wires. Take a look at his early docs: [url=https://nosack.com/sipforum/member.php?action=profile&uid=310][/url]https://gitlab.com/seventer/pcf857x_plugin_sip/-/blob/main/doc/pcf857x-doc.md Those i2c IO extender boards only cost about $2.00. Dan RE: Pi_plates relayplate support - hugie - 2021 Sep 24 (2021 Sep 24, 02:47 PM)dan Wrote: It looks like it would be very easy to modify the cli_control plugin for this. Thanks so much Dan! I will follow your directions. One thing you do get with the pi-plates relay plate is what looks to be built in protection for working with dangerous voltages, and they are nicely stackable. But I agree with you, they are much more in cost. I will look at astrogerard's page. John RE: Pi_plates relayplate support - hugie - 2021 Oct 01 (2021 Sep 24, 07:04 PM)hugie Wrote:(2021 Sep 24, 02:47 PM)dan Wrote: It looks like it would be very easy to modify the cli_control plugin for this. Thanks again, Dan. I have made a good start at a pi_plates specific module. One issue is that the pi-plate library wants to put the gpio mode into it's own mode. Is there any way to prevent SIP from making GPIO calls? I have for now temporarily commented out lines in gpio_pins.py, but this is not very elegant. Do you have any suggestions? RE: Pi_plates relayplate support - dan - 2021 Oct 01 If you have imported the "gv" module which gives you access to SIP's settings you can just say Code: gv.use_gpio_pins = False Dan |