< 232019-04-24⋎25 >

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:05*ludwa6_ has joined
00:07*ludwa6 has quit (Ping timeout: 255 seconds)
00:07*ludwa6_ is now known as ludwa6_
02:50*JustTB1 has quit (Ping timeout: 276 seconds)
03:04*JustTB has joined
04:03*JustTB has quit (Ping timeout: 258 seconds)
08:19*JustTB has joined
08:42*JustTB has quit (Ping timeout: 246 seconds)
08:58*JustTB has joined
10:18*sent a long message: < matrix.org/_matrix/media/v1/download/mat >
10:19MockingbirdConsuoh, immediately prior to this in the drupal logs, I have this:
10:19MockingbirdConsuNotice: Undefined index: 1.000000000000000000000000 in Polygon->area() (line 32 of /srv/farm-7.x-1.1/profiles/farm/modules/contrib/geophp/geoPHP/lib/geometry/Polygon.class.php).
10:19MockingbirdConsuNot sure if that makes a difference or not either :)
11:35mstenta[m]Mockingbird Consulting: hmm haven't seen that before. Can you create a bug report on GitHub so we can look into it together?
11:36mstenta[m]Not at my computer right now
11:36MockingbirdConsuSure, I've managed to break my installation, so let me reset it and I'll log a bug a bit later on :D
11:36mstenta[m]Ok
11:37mstenta[m]Also make sure your server has the minimize requirements
11:37mstenta[m]Minimum*
11:37MockingbirdConsuWill do, thanks :)
11:38mstenta[m]farmos.org/hosting/installing/
11:38mstenta[m]I wonder if it might actually be an optional dependency that's missing
11:39MockingbirdConsupossibly, as I say, I'll go back to a base install again and then I'll see if I can recreate it.
11:43mstenta[m]Perfect thanks! Good luck
12:26MockingbirdConsumstenta: I've created github.com/farmOS/farmOS/issues/161 for this
13:51*uploaded an image: Screen Shot 2019-04-24 at 6.44.51 AM.png (84KB) < matrix.org/_matrix/media/v1/download/mat >
13:51*uploaded an image: Screen Shot 2019-04-24 at 6.45.46 AM.png (170KB) < matrix.org/_matrix/media/v1/download/mat >
13:51paul121[m]mstenta: So I tried to start up farmOS in docker on my mac last night. I succeeded when I used `dlite`, but keep getting an error otherwise (screenshots above)
13:51paul121[m]I'm running `sudo docker-compose up -d`
13:53paul121[m]That log is from the `farmos_db` container
13:55paul121[m]I also added `:delegated` to these containers
14:26mstenta[m]Hi paul121 - is this using your existing docker environment that was set up previously?
14:26mstenta[m]Or a new one, using the new approach? (I just published it yesterday)
14:29mstenta[m]I don't think the changes I made will break existing environments...
14:30mstenta[m]So let's talk to make sure it didn't break it for you...
14:32paul121[m]I did a `git pull` then noticed you had already updated to the new approach!
14:33mstenta[m]ok, did you do `git pull` in the base directory (where you originally checked out farmOS repo)? or in `.data/www/profiles/farm`?
14:33paul121[m]But...it's basically a new environment. On my dlite, I had to install farmOS from the browser again
14:33paul121[m]Ahh.....Base directory.....
14:33mstenta[m]ok that's fine
14:34mstenta[m]what that means is that the `docker-compose.yml` is no longer there
14:34paul121[m](I wasn't worried about losing anything)
14:34mstenta[m]i removed that, and instead, put some example docker compose yml files in the `docker` subdir
14:34mstenta[m]so the new recommended approach is....
14:34mstenta[m]INSTEAD of checking out the farmOS repo... you just create a new directory on your computer called `farmOS` (wherever you want)
14:35mstenta[m]and then run:
14:35*sent a long message: < matrix.org/_matrix/media/v1/download/mat >
14:35mstenta[m]then you can run `sudo docker-compose up` to start the containers
14:36mstenta[m]in your case, on mac... you can also edit `docker-compose.yml` to add the `:delegated` piece to the two volume mount lines
14:36mstenta[m]when you run `sudo docker-compose up` it will create a `db` and a `www` directory, which is where the database and farmOS codebase files reside, respectively
14:37mstenta[m]jgaehring: FYI^
14:37paul121[m]Ah okay. I did download that `docker-compose.development` file, but it wasn't in a "clean" folder
14:37paul121[m]I will doing in a clean folder tonight!
14:37paul121[m]I will try**
14:38mstenta[m]ok cool! let me know how it goes
14:39mstenta[m]paul121: if you do want to keep your old site (eg: if there was stuff in there you want to save) let me know and I can walk you through migrating it over to the new setup
14:40mstenta[m]otherwise, you can just delete it and continue forward with the new one
18:59MockingbirdConsuHey folks, me again, I've just logged github.com/farmOS/farmOS/issues/163 to talk about how we might integrate LoRaWAN devices into FarmOS more easily. I've started to play with FarmOS and it looks amazing, so if I can get the sensor data from the LoRaWAN kit I'm running in there as well, then that would be the icing on the cake for me!
18:59mstenta[m]donblair: ^
19:00mstenta[m]Mockingbird Consulting: Awesome! I'll take a look at the issue
19:00mstenta[m]@donblair is currently using lora nodes to send data to a gateway device (based on arduino) which then forwards it to farmOS's sensor module via normal HTTP request
19:01mstenta[m]I like your idea of creating a new sensor type in farmOS too!
19:01mstenta[m]That's exactly what the sensor "type" option was designed for
19:04MockingbirdConsucool. I've put up a PR, but PHP really isn't my primary language any more (last time I used it in anger was just as PHP4 became PHP5! :D ) so it will need a lot of work, but I'm happy to provide infrastructure to test it on
19:13MockingbirdConsuFWIW, the sensor that I'd like to get up and running most is www.elsys.se/en/lora-elt-2/ - it's IP-67 rated, can take a range of external sensors, and is ~$160USD with a battery life of up to 7 years...
19:13mstenta[m]whoa neat!
19:14MockingbirdConsubut I've got a range of sensors from home-brew to commercial that we can play with, including (if/when we get to that part) LoRaWAN enabled relay switches, so you could turn on a light from 20 miles away (or do something a lot more useful like operate the sluice gats for a drainage ditch based on the water levels detected downstream etc)
19:14MockingbirdConsubut I've got a range of sensors from home-brew to commercial that we can play with, including (if/when we get to that part) LoRaWAN enabled relay switches, so you could turn on a light from 20 miles away (or do something a lot more useful like operate the sluice gats for a drainage ditch based on the water levels detected downstream etc) just by clicking on the sensor in the UI
19:15MockingbirdConsuheh, I guess editing in here doesn't work in the same way it does in Slack :D
19:15mstenta[m]yea... so we've been giving that idea some thought (triggering relays)
19:16mstenta[m]the main challenge of a client/server architecture like this is that the server (farmOS) can't easily send a request to the client (eg: raspberry pi)
19:16mstenta[m]at least not without a bunch of custom configuration to get through firewalls etc
19:17mstenta[m]so: we've been playing around with flipping it around, so that you could (for example) flip a switch inside farmOS, and the device is checking that on a regular basis - so that if it sees that the switch was flipped, it can act upon that
19:17mstenta[m]obviously means that it isn't instantaneous though
19:17mstenta[m]but for most use-cases that's probably ok
19:18mstenta[m]but also, bigger picture: i don't think devices should ever RELY on farmOS for knowledge
19:18mstenta[m]eg: a device that turns on fans in the greenhouse should not depend on farmOS
19:18mstenta[m]it should have whatever logic it needs internally... so that it doesn't break if it can't connect to farmOS for whatever reason
19:18mstenta[m]resiliency, in other words
19:18MockingbirdConsuah, ok, yeah, makes sense
19:19mstenta[m]but, farmOS can still serve as a dashboard to view the data, and to flip those switches (knowing that they won't actually happen until the device reads it again)
19:20MockingbirdConsuI'm used to building out fault-resilient clusters for web applications, so to my mind it's more likely the device fails to check in than the cluster goes down, but I've had the luxury of employers paying for the hosting costs, which I guess isn't always an option :D
19:20mstenta[m]so there's still a lot of value in connecting them
19:21MockingbirdConsuok, so what if "device-based polling" was the default, but for something like loraserver.io, where there's an API available for this stuff already, we have the option of pushing data to that API to trigger the device?
19:23mstenta[m]ah yes!
19:23mstenta[m]exactly
19:23mstenta[m]that could be a great option!
19:23mstenta[m]so how does loraserver.io send data to a device, i wonder?
19:23MockingbirdConsuconsole.ourdata.network/api#!/DeviceQueu
19:23MockingbirdConsuYou ping that endpoint with some JSON
19:24MockingbirdConsuLoRaServer converts the JSON into a base64-encoded blob and sends that over the wire, the device decrypts it and acts accordingly
19:24*sent a long message: < matrix.org/_matrix/media/v1/download/mat >
19:25mstenta[m]> and sends that over the wire
19:25mstenta[m]How does it do that, though?
19:25mstenta[m]How does the server send a request to the client, in other words?
19:25mstenta[m]client/device
19:25MockingbirdConsusorry, yes, so the LoRaServer sends a message to the LoRaWAN gateway, the gateway then transmits the packet
19:25MockingbirdConsuand the device picks up the packet and acts accordingly
19:26mstenta[m]Oh ok, sorry i'm not very familiar with lorawan architecture... so the gateway essentially acts as a server that can take requests from the outside world?
19:26mstenta[m]And then passes them to devices it manages?
19:26MockingbirdConsuKind of, it's closer to a WiFi Router, let me find my architecture diagram...
19:27mstenta[m]Ok that makes sense
19:27mstenta[m]It's a device that is public-facing though, yes?
19:27mstenta[m](or you set up port forwarding on your router to send traffic to it, i imagine)
19:28*uploaded an image: MBCTTNSetup (2).png (69KB) < matrix.org/_matrix/media/v1/download/mat >
19:29MockingbirdConsuIn this case, you're replacing the "Analytics Cluster" with FarmOS, but the gateway can sit happily behind a home router or even a corporate firewall, and as long as it can talk to the LoRaServer via MQTT, it's all good.
19:29MockingbirdConsuThe devices are "private" in the sense that the only thing they connect to is the LoRaWAN Gateway
19:30mstenta[m]gotcha
19:30MockingbirdConsuand the traffic is encrypted between the LoRaWAN device and the LoRaWAN server, so even if you own a gateway, you can't see what the payload is, only that there was a device sending data through your gateway
19:30mstenta[m]thanks for the explanation!
19:31MockingbirdConsuno worries, it's good for me to revisit it on a frequent basis, I always get slightly different questions depending on my audience!
19:40*JustTB has quit (Ping timeout: 276 seconds)
19:54*JustTB has joined
22:42*JustTB has quit (Ping timeout: 258 seconds)
22:42*JustTB has joined

< 232019-04-24⋏25 >