< 082019-04-09⋎10 >

farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Feature requests and bug reports: github.com/farmOS/farmOS/issuesSet by ChanServ on 2018-08-16 at 14:32
00:36*JustTB has quit (Quit: Leaving.)
07:29*JustTB has joined
08:44*JustTB has quit (Ping timeout: 244 seconds)
09:08*JustTB has joined
15:16*mbconsultinguk[m has joined
15:20mbconsultinguk[mHey folks, only just discovered farmos but it looks amazing. I run a rural IoT company so I'm particularly interested in being able to stream data from our platform into FarmOS, but for now I'm going to lurk here and on Github to learn more about how it all hangs together!
15:54mstenta[m]Hi mbconsultinguk ! Welcome!
15:58mbconsultinguk[mThanks! :)
15:58mstenta[m]Have you seen this page?
15:59mstenta[m]farmos.org/guide/assets/sensors/
15:59mstenta[m]farmOS provides a basic "Sensor" asset type out-of-the-box, which can accept data posted to it over HTTP
16:00mstenta[m]It's also possible to build more complex sensor integrations by writing your own module
16:00mstenta[m](each sensor asset has a "type" - the type that farmOS provides for listening to HTTP data is called the "Listener" type)
16:00mstenta[m]it's pretty simple... but useful for a lot of basic streaming data
16:01mstenta[m]and if you need something more complex, you can study that module to figure out how to implement your own, potentially
16:02mbconsultinguk[mOh, that's fantastic, thanks. We use LoRaWAN which has a range of about 10 - 15 miles depending on terrain etc, but the server that the sensors report the data to can easily send to an HTTP backend, or we can write something to pull the data direct from the stats backend/message queue to send it in.
16:02mstenta[m]Great! Yea donblair is working with Lora also - sending it to a gateway device that can post HTTP
16:02mbconsultinguk[mI'll take a look over the next couple of days and see what I need to do - this isn't top of our list to be honest, I just happened to find FarmOS and thought it would be something that would be quite cool to integrate with
16:02mstenta[m]He's also got a cool custom board called the Quahog that can do everything
16:03mstenta[m]edgecollective.io/quahog.html
16:03mbconsultinguk[moooooh, sounds shiny! :D
16:03mstenta[m]Yea! Fun stuff! :-)
16:05mstenta[m]Whereabouts are you? US?
16:06mstenta[m](I'm northeast US - and so is donblair )
16:20paul121[m](That Quahog looks neat.....)
16:25mbconsultinguk[mNope, UK, but one of our customers is in the Koonwarra region of Australia, so we're not restricted to country
16:59*sent a long message: < matrix.org/_matrix/media/v1/download/mat >
17:05paul121[m]jgaehring: great!
18:28jgaehring[m]mstenta: I've been thinking more again about what we discussed on the train, extending the farmOS API libraries with corresponding "sync" libraries in each language. To recap, it would be a way of propagating the farmOS data and its overall schema to local machines, along with mechanisms for tracking changes/discrepencies from the farmOS server... I think it could have a LOT of utilty, although I'm still scratching my
18:28jgaehring[m]head a bit to think of how to implement it in JS, let alone how to generalize it to libraries that could be implemented in any language, potentially
18:29mstenta[m]jgaehring: Awesome! I had a call earlier today with paul121 and mentioned the ideas briefly.
18:29mstenta[m]In the Aggregator project, we're going to need something similar (in Python)
18:30mstenta[m]I think we'd essentially just want to define the schema in a cross-platform way, somehow (eg: YAML?)
18:31mstenta[m]And then translate that into SQLAlchemy models (python), IndexDB models (JS browser), and something else for node.js...
18:31mstenta[m](IndexDB is not available in node.js, correct? Or is it?)
18:31mstenta[m](I know node.js can also do sqlite3, so that's an option too)
18:32jgaehring[m]correct, IDB is not available in node.js
18:32mstenta[m](i wonder if node.js has something like sqlalchemy (generalized ORM library that can be used with different db backends like sqlite3, postgresql, etc0
18:33jgaehring[m]> (i wonder if node.js has something like sqlalchemy (generalized ORM library that can be used with different db backends like sqlite3, postgresql, etc0
18:33jgaehring[m]huh, i'm not sure
18:34jgaehring[m]see what I've been thinking about is how something like a sync library could be applied to pulling the schema into something like Vuex or Redux, which are JS stores for keeping state in memory
18:36jgaehring[m]and then whether it's possible to make a library generic enough to work in BOTH Vuex and Redux, or whether you'd need a specific implementation for each, or whether it would just make sense to implement our own store (which wouldn't be too hard, but would result in sacrificing some of the tools and middleware that already come with Vuex/Redux)
18:36mstenta[m]oh yea, good thoughts... those are two other potential use-cases
18:37mstenta[m]so we've got: python, browser storage, JS memory, node.js (server)
18:37jgaehring[m]or maybe we only publish a schema?
18:38mstenta[m]and JS memory can be split into Vuex, Redux (and maybe more?)
18:38mstenta[m]yea... i think just publishing a schema is the most realistic... and leave it to libraries to stick to it
18:38mstenta[m]similar to the API libs
18:38jgaehring[m]yea, possibly
18:38mstenta[m]versioned
18:39jgaehring[m]perhaps publish a schema, and then also extract a Vuex library, which Field Kit can consume, as an example of how to implement the schema
18:40mstenta[m]mm yea
18:41mstenta[m]i wonder if it would make sense to include any of that in the farmOS.js/farmOS.py libraries themselves
18:41mstenta[m]as an optional local store
18:41mstenta[m]or if it should be kept separate
18:42jgaehring[m]that way, if there is a community which grows to find it useful to have a specific Redux or React Context implementation available, then that community can roll its own, but with some guidance
18:43mstenta[m]yea
18:43jgaehring[m]> i wonder if it would make sense to include any of that in the farmOS.js/farmOS.py libraries themselves
18:43jgaehring[m]> as an optional local store
18:43jgaehring[m]> or if it should be kept separate
18:43jgaehring[m]that could be useful
18:43mstenta[m]it could certainly be helpful in Python
18:43mstenta[m]but JS might be vue/react specific, like you said... which farmOS.js is currently agnostic of
18:44jgaehring[m]right
18:49paul121[m]I'm following... I think. We decide on a schema and follow that design in our APIs
18:49paul121[m]It looks like there are schema validators which could help enforce this
18:50paul121[m]BUT the prob is JS might need different schemas depending on the library?
18:51mstenta[m]yea, or rather: slightly different implementations... the schema itself would be the same
18:51jgaehring[m]> yea, or rather: slightly different implementations... the schema itself would be the same
18:51jgaehring[m]exactly
18:52mstenta[m](by "schema" i mean the tables/fields)
18:52jgaehring[m]> It looks like there are schema validators which could help enforce this
18:52jgaehring[m]i like that idea, "schema validators", a lot
18:52mstenta[m]and by "tables/fields" i mean whatever that translates to in a non-SQL db ;-)
18:52jgaehring[m]haha
18:52mstenta[m]objects and properties
18:53jgaehring[m]for more background, I thought of "tables/fields" as the concept of a "state tree" in Redux
18:53mstenta[m]i gotta run... but wanted to share this also (unrelated but thought you might like it): www.drupal.org/project/farm/issues/30469
18:53mstenta[m]added a `data` field to all assets and logs
18:53mstenta[m]hidden in the farmOS UI
18:53mstenta[m]which can be used to store arbitrary JSON/XML/YAML/etc
18:54mstenta[m]it should allow for some interesting possibilities :-)
18:54mstenta[m](imagine third-party apps storing extra data in there, for it's own specific needs... stuff that doesn't necessarily fit somewhere else in farmOS)
18:55paul121[m]> added a `data` field to all assets and logs
18:55paul121[m]Neat!
18:55mstenta[m](at least as a testing ground and place to experiment... then if it makes sense, create more fields in farmOS)
18:55jgaehring[m]oh neat indeed!
19:08paul121[m]Related, would be a schema for our API. I came across github.com/OAI/OpenAPI-Specification
19:08paul121[m]Swagger became openAPI with v3.0. Didn't know much about any of this, but soaking it up now!
19:13jgaehring[m]oh cool!
19:17mbconsultinguk[mSwagger is great, it's got libraries for pretty much every language and gives you a really nice set of documentation without much effort
19:45mstenta[m]Sounds promising!
19:48mbconsultinguk[mSee console.ourdata.network/api for an example of the output
19:49mbconsultinguk[m(that's from the Loraserver.io project, which is written in golang)

< 082019-04-09⋏10 >