I need advice with brainstorming my farm project



  • I have had great success with OpenHAB. If you're not afraid of learning a scripting language, it can be very powerful and flexible.



  • @peterrr
    As a wet-behind-the-ears but reasonably successful novice with MySensors etc., I recommend first thing that you get something, anything, up and running that will cover the whole range of sensor->transport->controller working in a very simple way. This will dramatically help you figure out the parts and pieces. It can be very frustrating and time consuming getting your "hello world" first example of having sensor data appear on some device, as you really don't know which pieces are working and which aren't until you are there.

    Specific suggestions:

    Controller: Start with Domoticz as your controller. Vastly simpler than OpenHAB to get running, and surprisingly useful. Install it on a RPi connected to your LAN.

    Sensor Node: If you have any practical use for wifi as the transport for some of your sensors (i.e. areas with wifi coverage) the simplest sensor/transport is ESP Easy on a ESP8266 such as WeMos Pro Mini or NodeMCU hardware, with any supported temperature sensor such as NRF24L01 or DHT22 (AM2302). These will talk over WiFi directly to Domoticz on a RPi. No code to write or modifiy with ESP Easy.

    In a fraction of a day you can have a controller and working sensor up and running. Knowing your controller actually works is a much easier place to start from with MySensors radios etc.

    Next steps: MySensors sensor nodes can be run on an ESP8266 client gateway without separate radios where Wifi is available, so you can get ahead on how MySensors code works out of the way before tackling radio hardware.

    Finally, for long range/out of wifi scenarios, you can then start messing around with radio transport, which means you need sensors attached to one or many Arduinos which host one or more sensors. To get at the sensor data, you need a controller (Domoticz etc.) to receive the sensor data and make it available on your LAN with a web browser.

    Domoticz is able to forward data to cool things like Grafana/InfluxDB or other dashboards for graphing, consolidating, presentation, etc.

    None of these parts or pieces are too tough for someone with your background. But working on all of them at the same time is a pretty tough learning/debugging process.

    Have fun,

    Tim



  • @Carywin thanks, it's now in the top 3 of my controller options at this stage. So you can see this for managing some sensors and relays on a farm?



  • @Grubstake this is exactly the type of advice I was hoping for, thank you for your response!
    I have Domoticz in my top 3 options for controller, the other 2 OpenHAB and MyController.

    Controller: I will give Domoticz a try. Will one of my older Raspberry Pi's be sufficient?

    Sensor Node: I have some NodeMCU boards with sensors, currently connected to my Wifi. I can try your suggested procedure from simple to more complex, just to get a feel... but yes ultimately I need to make the node network separate from the wifi network with radios etc.

    The Grafana and InfluxDB dashboard sound interesting, I will have a look 🙂



  • @peterrr Yes absolutely. I have it mixing up RFM69 wireless sensors and actuators with MySensors, MQTT sensors on WiFi ESP8266 via PubSubClient and Sonoff-Tasmota, Zigbee lights via Belkin Wemo, and locally-attached sensors on RPi GPIO and RS485 links. It smashes them all together in a very flexible and adaptable way.



  • 0_1503926240560_farm sensors.jpg

    So if this was your farm, what would you do?
    Thus 11 Arduino projects currently and I would like to turn them into nodes. I have a Raspberry Pi to use that I can place of at any one of the Wifi AP's.

    1 sensing when the gate opens
    2 irrigation controller
    3 water level sensor
    4 weather station
    5 hothouse controller
    6 greenhouse controller
    7 - 11 soil and environment sensors

    • all above is Arduinio


  • @peterrr Now that is more interesting but missing one essential, power distribution v battery power... If you can bridge the range with a power supply (with backup) you could relay your nodes to a gateway at that central point, and collate and re-transmit to your controller possibly? 500m is way easier than 1000m... If you have a sheet metal facing to a building at HQ facing the direction of the nodes or can make a reflective facade, perhaps you could dispense with the remote gateway and combine at the receive end ?
    Thoughts ?



  • @peterrr
    My take:
    Put a RFM69-Ethernet MQTT MyS gateway somewhere central like the greenhouse, with a nice 10+db whip up high, and plug the Ethernet into a WiFi AP. Put RFM69s on the other arduino nodes with MyS. Your OpenHAB controller can go anywhere that has a network or WiFi connection, and talk to the sensor net via MQTT. Monitoring and control via the OpenHAB app on a smartphone will work anywhere there's WiFi. Automation is via the Xtend-based rules language which has plenty of examples to work from.



  • @zboblamont
    Power options as follow:
    1 sensing when the gate opens (mains available)
    2 irrigation controller (mains available)
    3 water level sensor (solar/battery power)
    4 weather station (solar/battery power)
    5 hothouse controller (mains available)
    6 greenhouse controller (mains available)
    7 - 11 soil and environment sensors (solar/battery)

    I would say the most central point is the greenhouse (mains available). I have a Wifi AP there that connects with the main Wifi AP and ADSL station. Thus the greenhouse is probably the ideal location for a gateway and controller. This should bring most distances closer, bringing the maximum distances perhaps down to 500-700m.

    The whole farm is pretty much covered with Wifi but I would have liked to keep the nodes -> gateway off our wifi, and only use the wifi for the controller...
    Do you consider the amplified (and slightly optimised) NRF24L01s sufficient for the node network? Or RFM69HW?



  • @peterrr said in I need advice with brainstorming my farm project:

    0_1503926240560_farm sensors.jpg

    So if this was your farm, what would you do?
    Thus 11 Arduino projects currently and I would like to turn them into nodes. I have a Raspberry Pi to use that I can place of at any one of the Wifi AP's.

    What functionality are you looking for when you say "turn them into nodes"? Receiving/logging data from multiple supported sensors for remote display is the simplest and a controller like Domoticz cat be a hub for many types whether DIY or commercial. Controlling remote switches/lights is fairly straightforward. Controlling custom built projects in an interactive way is not so easy. Having a remote node is not like having your Arduino plugged in to your computer (serial monitor, software updates). If you are trying to integrate monitoring and control of multiple devices the controller and its capabilities become the big issue.

    My experience so far is mostly monitoring sensors and simple controllers (DIY thermostat/humidistat). RPi works fine but is somewhat fragile IMHO with write fatigue on the card storage. If you want something a lot faster and more robust an inexpensive headless desktop computer works well. I got up to speed on a single RPi 3 running domoticz, with a MySensors radio gateway, InfluxDB and Grafana. Once I found it would work I moved it to an Intel NUC computer with SSD storage running Ubuntu Server. Way faster and easy to back up on my LAN.

    If you are a software developer type itching to learn a complex system for maximum flexibility OpenHAB has a good reputation (and steep learning curve). If you want to get get something working quickly and get your bearings Domoticz is a lot closer to plug and play, who knows it may suit your needs.

    I like to try to find the simplest/fastest way to get the job done as I'd rather be using this stuff rather than fussing around under the hood all the time...I already have other hobbies.



  • @peterrr said in I need advice with brainstorming my farm project:

    The whole farm is pretty much covered with Wifi but I would have liked to keep the nodes -> gateway off our wifi, and only use the wifi for the controller...

    I felt the same and monkeyed around with radios for quite a while. (I have a much smaller place, 3 buildings, good wifi everywhere.) Then I tested out the ESPEasy on ESP8266 sensor nodes and it was so straightforward that I haven't gotten past some prototype radio nodes. As has been said you can mix wifi and radio nodes to a single controller. Are you sure more devices on your wifi will create even the slightest problem and you aren't making it more complicated than needed for a good reason?

    Many of my sensor nodes run a handful of sensors on a single ESP8266 (no Arduino needed, but runs code via Arduino IDE), the hardware couldn't be simpler. In this scenario with MySensors nodes the sensor node IS the gateway...no fussing with radios outside the builtin wifi.

    Do you consider the amplified (and slightly optimised) NRF24L01s sufficient for the node network? Or RFM69HW?

    I messed a lot with the NRF radios and for the most part the market is full of dirt cheap clones mostly with counterfeit chips and the consistency and reliability is all over the map. Some radios work OK, but a huge pain sorting them out The RFM radios do not appear to suffer from this problem and I suggest starting with them.

    Tim



  • @Grubstake I suspect @carwywin pretty much ticked all my particular boxes.. Comms is not really the issue even though perceived as such, a central comms link will certainly work, if you can direct link off the side of a sheet clad side of a shed so be it, or make a reflector.
    It is all down to reliable acquisition of the data which informs the system. I would have to agree that the RFM69 solution would be my own personal preference, only because I settled on that as my particular solution after much chewing over options, YMMV. Wifi, here I have 6 different competing signals, on 430MHz only my car fob on a quick scan, but have no idea yet if the node will cause chaos if the local gypsies decide to camp in the car (as the remote locking is de-activated, time will tell 🙂 ... It is a Citroen car, already an electrical and programming challenge as most modern cars are, my lot in life for loving hydropneumatic suspension, the last of their kind I understand...
    I suggest keep an open mind on comms, the 1km range is not insurmountable, concentrate on the what, develop the how later...


Log in to reply
 

593
Online

7.0k
Users

7.9k
Topics

84.8k
Posts

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.