Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Details for how Rain Sensor works
#9
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
Reply


Messages In This Thread
Details for how Rain Sensor works - by tutqiunnh - 2022 Oct 25, 09:25 PM
RE: Details for how Rain Sensor works - by dan - 2022 Oct 25, 09:57 PM
RE: Details for how Rain Sensor works - by dan - 2022 Oct 26, 03:29 PM
RE: Details for how Rain Sensor works - by dan - 2023 May 28, 01:45 PM
RE: Details for how Rain Sensor works - by tutqiunnh - 2023 Aug 26, 12:40 AM
RE: Details for how Rain Sensor works - by dan - 2023 Aug 26, 02:58 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)