| [00:38:19] | * farmBOT has joined #farmos |
| [06:12:02] | * JustTB has joined #farmos |
| [06:48:28] | * JustTB has quit (Quit: Leaving.) |
| [08:10:50] | * falcon has joined #farmos |
| [08:13:46] | * falcon has quit (Remote host closed the connection) |
| [14:23:35] | * dahfors has joined #farmos |
| [15:04:10] | * dahfors has quit (Ping timeout: 260 seconds) |
| [15:51:45] | * dahfors has joined #farmos |
| [16:19:49] | * dahfors has quit (Quit: Page closed) |
| [16:32:25] | * dahfors has joined #farmos |
| [16:54:45] | <mstenta> | dahfors: let's move the conversation over here ok? |
| [16:56:08] | <mstenta> | so yea... i wrote a python web app that installs on a raspberry pi for monitoring temperature and humidity with Adafruit sensors |
| [16:56:16] | <mstenta> | http://github.com/mstenta/atmospi |
| [16:56:36] | <mstenta> | it stores the data locally in a sqlite database |
| [16:56:51] | <mstenta> | it doesn't push to farmOS yet, but I plan to do that in the future |
| [16:57:12] | <mstenta> | in the meantime, i wrote a simple farmOS Sensor module for it that just shows the Atmospi dashboard as an iframe within farmOS |
| [16:57:21] | <mstenta> | http://github.com/mstenta/farm_sensor_atmospi |
| [16:57:56] | <mstenta> | but ultimately, I think I will probably migrate all my sensors to use Open Pipe Kit instead, and just let them be passive observers that send the data to the farmOS Sensor module directly |
| [16:58:09] | <mstenta> | rather than having separate web apps on each Pi |
| [16:58:23] | <mstenta> | collect it all in one place (farmOS) associated with the actual area it is in... |
| [16:58:34] | <mstenta> | and handle the graphing and other UI within farmOS itself |
| [17:10:37] | <dahfors> | that makes a lot of sense |
| [17:11:35] | <dahfors> | I've been using MQTT with my sensors... run super simple code on cheap ESP8266 chips and send to a mosquito mqtt server running on the raspberry pi |
| [17:12:50] | <dahfors> | been playing with homeassistant home automation software for the user interface to that sensor info and for creating automations... I was thinking that forking homeassistant and creating "farm assistant" for farm sensors and automation might be a fun project |
| [17:13:07] | <dahfors> | don't know if something like that could be tied into farmos... or replicated within it... |
| [17:19:27] | <mstenta> | cool! i've never heard of mqtt - what is it? |
| [17:19:49] | <mstenta> | yea, that could be a farmOS module! |
| [17:21:13] | <mstenta> | we did some proof-of-concepting at Dorn's farm this past summer for using farmOS to "trigger" things to happen when a sensor value crosses a threshold |
| [17:21:59] | <mstenta> | i forget exactly where that left off... but the basic concept was: |
| [17:22:13] | <mstenta> | a simple sensor would push data to farmOS |
| [17:22:47] | <dahfors> | mqtt is a very lightweight open source messaging protocol |
| [17:22:58] | <mstenta> | farmOS would have some logic to flip a switch - in the form of an artificial sensor reading - and then there would be a raspberry pi that would be reading that switch periodically, and if it changed it would do something |
| [17:23:40] | <dahfors> | cool |
| [17:24:01] | <dahfors> | check out homeassistant as they may have code that could be repurposed for that functionality in farmos |
| [17:24:07] | <dahfors> | "MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model." |
| [17:24:25] | <mstenta> | ultimately i'd love to put together some kind of framework in farmOS for that - but for now it's easy enough to write a simple custom module that does specifically what you want |
| [17:24:31] | <mstenta> | cool - i will |
| [17:24:52] | <dahfors> | I like it because it's SUPER easy (so easy I can do it) and super lightweight... takes almost no resources to run the server on a rasp pi 1 and the client can run on tiny microcontrollers |
| [17:24:59] | <mstenta> | ok interesting... |
| [17:25:29] | <mstenta> | so it has a central server that other sensors communicate with? |
| [17:25:56] | <dahfors> | correct |
| [17:26:06] | <mstenta> | does the central server trigger events in the other devices too? |
| [17:26:06] | <dahfors> | but that "central" server can be very decentralized |
| [17:26:20] | <mstenta> | oh? |
| [17:26:21] | <dahfors> | apparently a raspberry pi is capable of many 1,000s of MQTT client connections... |
| [17:27:20] | <dahfors> | Homeassistant (home automation software written, I believe, in Python) "listens" to the MQTT server.... it subscribes to certain "channels" and when it receives a message, it triggers state changes and Home Assistant takes care of all that |
| [17:27:40] | <mstenta> | oh ok awesome |
| [17:28:11] | <dahfors> | home assistant python scrips handle the if then statements... MQTT is just a VERY lightweight method of moving messages from pt a to pt b |
| [17:28:19] | <mstenta> | ok |
| [17:28:29] | <mstenta> | i'm going to have to look into MQTT and see if farmOS could use it somehow |
| [17:29:03] | <dahfors> | yeah. let me know if there's anything I can do to help with that. |
| [17:29:07] | <mstenta> | hmm so i wonder... is MQTT similar in goal to Open Pipe Kit? |
| [17:29:15] | <dahfors> | that's what I was wondering... |
| [17:29:24] | <dahfors> | just opened up opk to check it out |
| [17:29:24] | <mstenta> | OPK is essentially a framework for setting up Pis that "pipe" data from one place to another |
| [17:29:52] | <dahfors> | I suspect it is similar... the thing I like about mqtt is that it seems to be becoming a standard in the IoT world... |
| [17:29:53] | <mstenta> | so basically you can tell it to "pull" from a sensor and "push" to a database |
| [17:30:03] | <dahfors> | and the fewer reinventions of the wheel... the better... |
| [17:30:06] | <mstenta> | ie: "pull from a yoctopuce USB temperature sensor and push to farmOS" |
| [17:30:13] | <mstenta> | interesting |
| [17:30:52] | <mstenta> | maybe we could write a farmOS module that could accept data from an MQTT server |
| [17:30:59] | <mstenta> | that would allow MQTT to "push" to farmOS, right? |
| [17:31:44] | <mstenta> | does it use it's own protocol, do you know? or is it HTTP or another standard? |
| [17:32:11] | <mstenta> | (i'm reading https://en.wikipedia.org/wiki/MQTT now... sounds like it has it's own) |
| [17:32:25] | <dahfors> | with opk... does the sensor have to be on the same piece of hardware as opk is running on? Can it run on tiny microcontrollers? As I see those as key to keeping sensor costs super low and making battery power usable... for instance, you can run an esp8266 for months on a few aa batteries with the right low energy states and waking periodically (once an hour to get sensor dddata and transmit to mqtt) |
| [17:32:44] | <dahfors> | mqtt uses its own protocol |
| [17:32:51] | <dahfors> | the MQTT 3.1 protocol |
| [17:33:06] | <mstenta> | OPK essentially acts as a gateway between sensors and databases |
| [17:33:08] | <dahfors> | http://mqtt.org/ |
| [17:33:19] | <mstenta> | it is all based on simple bash scripts |
| [17:33:49] | <mstenta> | so if you can write a bash script that can "pull" data from a collection of tiny microcontrollers, then OPK can push them to a database |
| [17:34:00] | <dahfors> | What kinds of sensors? oh ok. that's what it looked like. So does that mean the smallest/cheapest sensor node is a raspberry pi? or can it run on arduinos? |
| [17:34:40] | <mstenta> | no, you can have the raspberry pi with OPK separate from the sensor nodes themselves |
| [17:34:50] | <mstenta> | they just need some way of communicating with one another |
| [17:34:54] | <dahfors> | oh yeah.. forgot about another key feature of mqtt... it's extremely bandwidth efficient... the messages themselves are tiny |
| [17:35:19] | <mstenta> | (i'm not speaking from a lot of experience here... i haven't worked with it a lot... but i've been around others who were hacking on it so i picked up some of the concepts) |
| [17:35:49] | <dahfors> | got it |
| [17:35:51] | <mstenta> | at Dorn's farm we were testing with Motinos |
| [17:36:06] | <mstenta> | the Motinos had the sensor attached to them |
| [17:36:19] | <mstenta> | and they were communiating with the Pi via Lorawan |
| [17:36:42] | <dahfors> | what's a motino? didn't get anything in my google search just now |
| [17:36:53] | <mstenta> | oops i might have spelled it wrong... let me see... |
| [17:37:09] | <mstenta> | moteino* |
| [17:37:49] | <mstenta> | i've never worked with arduino myself, so i can't really speak to any of those details or how they compare to other options |
| [17:38:01] | <mstenta> | i guess moteino's are a low-power arduino clone |
| [17:38:19] | <dahfors> | oh cool. they look promising |
| [17:38:24] | <dahfors> | yeah.. exactly |
| [17:38:28] | <mstenta> | the guys i was hacking with were experimenting with soil sensors that could be deployed with small solar panels |
| [17:38:35] | <dahfors> | the esp8266 chips do much the same thing |
| [17:38:38] | <mstenta> | ok cool |
| [17:38:53] | <dahfors> | can be programmed with arduino, or several other things like python... and are wireless |
| [17:38:58] | <mstenta> | i've heard of esp8266 (moslty on hackaday) - is that arduino also? |
| [17:39:00] | <dahfors> | and half the cost of the moteinos |
| [17:39:01] | <mstenta> | oh cool |
| [17:39:04] | <mstenta> | very cool |
| [17:39:18] | <dahfors> | yeah.. they are really revolutionary |
| [17:39:36] | <mstenta> | so i think the main reason they were using moteinos was because they wanted to use lorawan |
| [17:39:55] | <dahfors> | you can buy the chip for $2 and embed it into any device to have a microcontroller with wireless and now they have one that also includes bluetooth for like $6 |
| [17:39:57] | <mstenta> | which from what i gather is a very low power, extremelly long distance wireless radio frequency protocol |
| [17:40:33] | <dahfors> | it is. lorawan is awesome. moteinos may be ideal for some use cases. I'm definitely going to check them otu |
| [17:41:03] | <mstenta> | yea! pretty exciting for deployments that are too big for wifi |
| [17:41:15] | <mstenta> | we did a test where we walked around and i think we got 1km range on it |
| [17:42:32] | <dahfors> | nice. slap on a directional antenna and I bet you could get 10x that... based on some things I've heard about lorawan |
| [17:42:45] | <mstenta> | awesome :-) |
| [17:43:17] | <mstenta> | exciting stuff... i hope to see some more cool sensor stuff start making its way into farmOS in the near future |
| [17:43:46] | <mstenta> | my aim is to just keep it as general as possible, so it can support whatever needs to be built |
| [17:44:17] | <dahfors> | perfect |
| [18:01:27] | <dahfors> | Hey, am I missing something? I can't find the actual open pipe kit code... |
| [18:02:37] | <mstenta> | so... i believe it is essentially just a collection of various "pull" and "push" "drivers" |
| [18:02:44] | <mstenta> | "drivers" == bash scripts |
| [18:03:01] | <mstenta> | and then you use the unix pipe to run them in a command line |
| [18:03:25] | <mstenta> | RJ made a tutorial video for pushing to farmOS... lemme find it |
| [18:03:32] | <mstenta> | https://www.youtube.com/watch?v=fCflGeOpTqk |
| [18:04:53] | <dahfors> | ok thanks. That'll help |
| [18:08:37] | <mstenta> | gotta run - time to fix some dinner |
| [18:08:40] | <mstenta> | great talking to you! |
| [18:08:48] | <mstenta> | more soon i hope |
| [18:09:11] | <dahfors> | you too! |
| [18:09:12] | <dahfors> | thanks |
| [18:09:13] | <dahfors> | ttyl |