2023 Aug 26, 12:40 AM
Dan,
I know it has been a while. I have been taking another look at the rain sensor function when I'm "faking" it from my weather station. When I look at helpers.py function check_rain() it only works if I have GPIO module loaded so I can't see how the u"rst = 1, u"rst=0 toggle can "fake" a rain sensor. Can you explain so I understand what I'm missing.
If that really doesn't work, my ubuntu system has no GPIO, but I can fake that with fake_rpigpio module installation. However, for GPIO.input statements in check_rain it sends a random 1 or 0 output.
Anyway, I think I can get around that if I'm able to determine that I have the proper plugin loaded and can pass that plugin info as a global to helpers.py check_rain to use an if so that if fake_gpio and the plugin are loaded go aroung the gpio. How would I determine if a certain plugin is loaded in helpers.py I have tried "import plugins" but that doesn't work due to circular imports with sip.py. Is there a gv variable that shows the installed plugins that I can check?
Thanks for the help.
Best,
Bryan
I know it has been a while. I have been taking another look at the rain sensor function when I'm "faking" it from my weather station. When I look at helpers.py function check_rain() it only works if I have GPIO module loaded so I can't see how the u"rst = 1, u"rst=0 toggle can "fake" a rain sensor. Can you explain so I understand what I'm missing.
If that really doesn't work, my ubuntu system has no GPIO, but I can fake that with fake_rpigpio module installation. However, for GPIO.input statements in check_rain it sends a random 1 or 0 output.
Anyway, I think I can get around that if I'm able to determine that I have the proper plugin loaded and can pass that plugin info as a global to helpers.py check_rain to use an if so that if fake_gpio and the plugin are loaded go aroung the gpio. How would I determine if a certain plugin is loaded in helpers.py I have tried "import plugins" but that doesn't work due to circular imports with sip.py. Is there a gv variable that shows the installed plugins that I can check?
Thanks for the help.
Best,
Bryan