| 01:19 | * | jonasbits has quit (Ping timeout: 240 seconds) |
| 05:14 | * | jonasbits has joined |
| 05:56 | * | farmBOT has joined |
| 15:14 | * | DanielAshcraft[m has joined |
| 15:16 | DanielAshcraft[m | Hello everyone! The company i cofounded centers around open sourcing sensors and iot devices, i am going through and picking a handful of... (full message at libera.ems.host/_matrix/media/r0/downloa) |
| 15:20 | mstenta[m] | 1. yes! |
| 15:20 | mstenta[m] | 2. this depends on who is hosting farmOS and how they have it configured (to allow http or not), but generally speaking it *should* always be https (and Farmier SaaS hosting is 100% HTTPS fwiw) |
| 15:20 | mstenta[m] | 3. There has been some discussion re: MQTT yes! farmos.discourse.group/search?q=mqtt |
| 15:21 | mstenta[m] | the HTTPS question is a good one, though, and one that some friends and I have talked a lot about |
| 15:21 | mstenta[m] | the idea if a "gateway" device seems to be the best option |
| 15:21 | mstenta[m] | where all sensors send to the gateway, and the gateway forwards to farmOS |
| 15:21 | mstenta[m] | and it can be beefier, like a Raspberry Pi or something |
| 15:21 | DanielAshcraft[m | Yeah we can do https, but depending on cert response size, we have to throttle our normally 500-800ms sensor push to around 8 seconds on average |
| 15:22 | mstenta[m] | yea, we've done some stuff with Lora sensors too... where they aren't connected to the internet at all... but push to a gateway that is |
| 15:22 | mstenta[m] | that feels like the most scalable approach |
| 15:22 | mstenta[m] | (but i'm not a hardware expert) :-) |
| 15:23 | mstenta[m] | also... if you are considering integration, definitely go for farmOS 2.x, not 1.x |
| 15:23 | DanielAshcraft[m | Yeah we have plans for an intermediate device as a controller. We're trying to avoid it, because it's mostly unnecessary (depends on who you ask). |
| 15:23 | DanielAshcraft[m | But the esp32 base we're working with can port forward and mesh, so the idea of adding another device to work around https is a headache haha |
| 15:23 | mstenta[m] | 1.x is going to be deprecated soon |
| 15:23 | mstenta[m] | and 2.x has a whole new and improved system for managing "data streams" |
| 15:24 | mstenta[m] | yea understood... my friend ran into the https issue with esp8266, but i think he actually had success with esp32 |
| 15:24 | mstenta[m] | (again, i'm speaking outside my expertise here) |
| 15:24 | mstenta[m] | (just recalling old conversations) |
| 15:25 | DanielAshcraft[m | 100% i gotcha. Mqtt seems like it might be a good fit, it's what i've used to integrate with Home Assistant and it's worked wonderfully thus far. |
| 15:25 | mstenta[m] | My understanding of Mqtt is that it requires another service to be running alongside farmOS |
| 15:25 | mstenta[m] | farmOS is basically just Apache, so http server only |
| 15:26 | DanielAshcraft[m | Correct, hassio uses a mosquito broker i believe |
| 15:26 | mstenta[m] | but it's dockerized, so you could run an mqtt broker alongside it i assume |
| 15:27 | mstenta[m] | Daniel Ashcraft: we have weekly farmOS dev calls if you want to hop on one - can give you an intro to some things in farmOS if that would be useful |
| 15:27 | mstenta[m] | thursdays at noon eastern |
| 15:27 | DanielAshcraft[m | Does farmio have a plugin based architecture we could potentially extend? |
| 15:27 | mstenta[m] | meet.jit.si/farmos-dev |
| 15:27 | DanielAshcraft[m | I might be able to meet that call, i'll need to check my schedule and double check |
| 15:27 | mstenta[m] | yes! you can write modules that extend it |
| 15:28 | mstenta[m] | farmOS is a Drupal distribution, so they would basically be Drupal modules |
| 15:29 | mstenta[m] | we have some 2.x docs developing here: docs.farmos.org/development/module/ |
| 15:29 | DanielAshcraft[m | Sweet, i'm not a python person, but i could def brush up and try to get some open source commitment. We're both on open-collective |
| 15:29 | DanielAshcraft[m | so might be able to get some crossover from SPEC. |
| 15:29 | mstenta[m] | PHP actually |
| 15:29 | DanielAshcraft[m | Ooof |
| 15:29 | mstenta[m] | (the farmOS Aggregator is Python., but that's different) |
| 15:30 | DanielAshcraft[m | gotcha gotcha |
| 15:30 | mstenta[m] | haha like I said, it's Drupal |
| 15:30 | DanielAshcraft[m | i mentally switch drupal with django, i haven't written a line of php in 7 years lol |
| 15:31 | mstenta[m] | easy mixup :-) |
| 15:31 | mstenta[m] | i'm trying to get a link you can use to try out 2.x... |
| 15:31 | mstenta[m] | but if you have docker you can also just spin up a quick dev environment |
| 15:31 | mstenta[m] | docs.farmos.org/development/environment/ |
| 15:32 | mstenta[m] | paul121: is there an easy way to spin up a tugboat of latest 2.x outside of issue queues? |
| 15:32 | DanielAshcraft[m | Good to go on docker, i might have to hit some friends up to develop a mqtt integration through drupal, but it can likely be done. |
| 15:32 | DanielAshcraft[m | Interface for passing in mqtt creds, topic construction and the corresponding internal api hooks. |
| 15:34 | mstenta[m] | Yea... or I wonder: would it make sense to have a separate Dockerized service that receives data via MQTT and then just reformats it into an HTTP API request for farmOS? |
| 15:34 | mstenta[m] | then you could just use existing API and wouldn't need to build anything extra in farmOS/Drupal |
| 15:35 | DanielAshcraft[m | That's actually doable and much more within my skillset |
| 15:35 | DanielAshcraft[m | Are there any current sdk's for farmos or api wrappers in various languages? |
| 15:35 | mstenta[m] | cool! |
| 15:36 | mstenta[m] | yes we have a python library and a JS library: github.com/farmOS/farmOS.py / github.com/farmOS/farmOS.js |
| 15:37 | DanielAshcraft[m | Excellent, i see oauth2, is there an option for a long lived token? |
| 15:37 | mstenta[m] | check the forum link i posted above too... might be some good ideas in there or things people have already done |
| 15:37 | mstenta[m] | farmos.discourse.group/search?q=mqtt |
| 15:37 | mstenta[m] | if you're self-hosting you can customize the token lifespan |
| 15:38 | mstenta[m] | but might be fragile to depend on others doing that |
| 15:38 | mstenta[m] | there are other authorization flows available too besides refresh token |
| 15:39 | mstenta[m] | i think paul121 experimented with JWT |
| 15:39 | mstenta[m] | and there's the username/password authorization too, with security considerations of course |
| 15:40 | mstenta[m] | but you could create a dedicated user for receiving sensor data, and block them if need be |
| 15:40 | mstenta[m] | (lots of considerations) :-) |
| 15:40 | DanielAshcraft[m | 100% |
| 16:26 | paul121[m] | <mstenta[m]> "paul121: is there an easy way to..." <- When you create a tugboat account you would connect it to your own fork of farmOS |
| 16:28 | paul121[m] | <mstenta[m]> "i think paul121 experimented..." <- actually, all of our 2.x oauth uses JWT - that's more of a "lower level" tech |
| 16:28 | paul121[m] | all of the OAuth tokens are JWT! |
| 16:29 | paul121[m] | OAuth doesn't have a good solution for long lived tokens :-/ (not really what it is designed for) |
| 16:30 | paul121[m] | BUT also worth nothing that our farmOS sensors (data streams in 2.x) use a public/private key for authentication |
| 16:33 | paul121[m] | Daniel Ashcraft: I've done a little bit of preliminary work integrating some sensors & third party data apis with 2.x farmOS data streams |
| 16:34 | paul121[m] | I had explored trying to tie farmOS directly to MQTT in the past, but there definitely needs to be something between the two |
| 16:35 | paul121[m] | here is my latest thinking: dump all sensor data into a separate Influxdb time series database, and make 1 integration with farmOS to Influxdb |
| 16:38 | paul121[m] | an early start on this here: github.com/Vital-Agronomics/farm_influxd |
| 16:39 | mstenta[m] | > BUT also worth nothing that our farmOS sensors (data streams in 2.x) use a public/private key for authentication |
| 16:39 | mstenta[m] | Oh right! I forgot! 😅 |
| 16:40 | mstenta[m] | We did that for this very reason |
| 16:40 | mstenta[m] | And to be able to revoke individual sensor push access if necessary |
| 16:40 | mstenta[m] | Not tied to users |
| 16:42 | paul121[m] | what really makes Influxdb so cool is actually a separate service called Telegraf: github.com/influxdata/telegraf |
| 16:42 | paul121[m] | This is what I would use to pull/push data to Influxdb....but Telegraf can be used separate from Influxdb! I think it could be fairly trivial to use it as an MQTT->HTTP POST intermediary |
| 16:43 | paul121[m] | so you could do sensor -> MQTT broker -> telegraf MQTT input -> telegraf HTTP output -> farmOS |
| 16:44 | paul121[m] | I'd like to try that out myself, but really see some benefits of using Influxdb for storage + querying so I'm investing my efforts there :-) |
| 23:30 | * | willinux has joined |
| 23:41 | * | willinux has left (Leaving) |