Announcement

Collapse
No announcement yet.

Polling Pi Sensors For GreenHouse Monitoring

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Polling Pi Sensors For GreenHouse Monitoring

    I'm looking for some input regarding polling sensors connected to a Raspberry Pi 2 and populating HS devices. I have been working with a local succulent plant grower for the past year on full systems integration. The application is as follows: Customized greenhouse control solution for 14 production greenhouses. The commercially available specific options are well into the 5 figures and cost prohibitive at this time. The current system utilizes individual Pi 2 controllers (per greenhouse) on Windows 10 IoT with an array of remote hygrometers, thermistors, light meters, and soil moisture sensors to logically control ventilation fans, overhead irrigation, zoned table heating, environmental controls, HID lighting, alarming, etc...all the way to generator control and monitoring upon power failure. Values are written to an SQL Server instance for statistics. The control systems all work flawlessly and reliably and we have, quite literally, under $1000 in monitoring and control hardware, a small fraction of what dedicated commercial systems cost. These production houses maintain well into the six figure product population consistently, making internet dependency impractical. The web interface that I have built is impractical as well, as it requires 15 different web servers and individual logins for each pi. Not to mention, it is tedious and non-user friendly. The house is currently automated with HomeSeer using 7 HSTouch displays and we want to expand integration to cover everything. I have already customized a plug-in for the home system to monitor and control a Generac Guardian series generator via RS-232. Now I need to customize a plug-in to monitor and control all of the greenhouses on the property on the same HS3 server, which inherently seems pretty easy and cheap, as all of the infrastructure already exists. Here's my hang-up...

    I need a reliable way to retrieve and control the Pi IO from within HomeSeer excluding the IoT internet dependency. Initially, I decided a modularized system would be most beneficial and started writing a plug-in for a remote instance of each Pi to make it easy to temporarily disable a dysfunctional unit as a plug-in, however quickly figured out that the dependencies cannot be imported into Windows IoT, giving me no access to the necessary classes for the plug-in. Any great c# ideas? It's not worth changing all of the Pis over to Raspbian, as the rework would be very time consuming. I need to keep it within Windows IoT platform. Thanks for looking.

  • #2
    I know you say sensor data but is this all you wish to populate in HS or a full two way control system with HS taking on tasks? If the former then have you considered an app or whatever you run on IoT (I have not so far introduced myself to it) that updates devices in HS by using the JSON API. I would think that would be the less risky of all options (considering the money at stake) because if the HS server is not available then you can simply handle it as a failed web connection gracefully.
    My Plugins:

    Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
    Yeelight 3P | Nanoleaf 3P

    Comment


    • #3
      JSON

      I think you're right...That hadn't even occurred to me. I think it's time to learn JSON.

      To answer your question, I would like the ability to integrate full operability...populating values (calculated remotely by averaging arrays) and to set desired conditions. For example, there is an exhaust fan which activates when the humidity reaches a specific threshold, as averaged among the sensor array to recycle the air in the structure, removing humidity and decreasing condensation and precipitation. That desired value can currently be set only by logging in to the Pi's web server and setting it. Invalid or null HS connection exceptions can be handled remotely, either setting to standard settings or the last valid set points. Each of the 15 systems will continue to run as they do now irrespective of HS failures...just as they do now if an exception occurs writing data to the DBMS.

      So, in essence, I just need a remote input and output to the currently running algorithms. If a valid command is received, a set point can be changed. If a connection is not null, the current values will be sent to HS (all within the LAN). A remote instance of a plug-in would make this perfect, but, as is, would require a remote windows machine in each GH (still feasible if absolutely necessary). Some of the mini's are <$100. However, then I have to rework the entire physical IO currently running on the Pi.

      Comment


      • #4
        Can this be of any help ?

        Comment


        • #5
          Absolutely....

          I looked everywhere for something like that. I think that one has a significantly different application (running HS on the local Pi), but I can certainly use the connection and JSON information to wiggle through it. Thanks for the time you put into that.

          Comment


          • #6
            Originally posted by JosephQHughes View Post
            So, in essence, I just need a remote input and output to the currently running algorithms. If a valid command is received, a set point can be changed. If a connection is not null, the current values will be sent to HS (all within the LAN).
            While you are looking into utilizing JSON responses, based on the fact you have web interfaces for each PI, it would appear that another option may be to leverage your existing web interface.

            Deploy a common web service to each web server on each Pi. The web service should have access to the required classes/algorithms/GPIO/etc on the Pi. HS can programmatically call the web service on each web server. The web service will return the device/values pairs to HS. Clearly you would have to parse the returned information and update each HS device.

            You will know if a Pi is unresponsive or dysfunctional if the web call fails connecting.

            Len

            Comment


            • #7
              Originally posted by JosephQHughes View Post
              I looked everywhere for something like that. I think that one has a significantly different application (running HS on the local Pi), but I can certainly use the connection and JSON information to wiggle through it. Thanks for the time you put into that.
              It should work with a remote HomeSeer server as well, it does not have to be on the same PI/PC. Just change the ip address in the code.

              Comment

              Working...
              X