< 212020-07-22⋎23 >

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:12*JustTB has quit (Ping timeout: 240 seconds)
00:31*JustTB has joined
03:07*JustTB has quit (Ping timeout: 265 seconds)
03:22*JustTB has joined
04:35*JustTB has quit (Quit: Leaving.)
05:13*JustTB has joined
08:44*martha[m] has joined
12:38*tcmah[m] has quit (*.net *.split)
12:38*paul121[m] has quit (*.net *.split)
12:38*samrose[m] has quit (*.net *.split)
12:38*gunter[m] has quit (*.net *.split)
12:38*pllagn[m] has quit (*.net *.split)
12:40*friedrich[m]1 has quit (Write error: Connection reset by peer)
12:40*martha[m] has quit (Write error: Connection reset by peer)
12:40*jgaehring[m] has quit (Read error: Connection reset by peer)
12:40*calbasi_matrix has quit (Read error: Connection reset by peer)
12:40*botlfarm[m] has quit (Read error: Connection reset by peer)
12:40*andifi[m] has quit (Read error: Connection reset by peer)
12:40*ghpstudent[m] has quit (Read error: Connection reset by peer)
12:40*cekerber[m] has quit (Remote host closed the connection)
12:40*skipper_is[m] has quit (Read error: Connection reset by peer)
12:40*lpuro[m] has quit (Read error: Connection reset by peer)
12:40*canadrian[m] has quit (Read error: Connection reset by peer)
12:40*Dorn[m] has quit (Read error: Connection reset by peer)
12:40*laurademmel[m] has quit (Read error: Connection reset by peer)
12:40*mstenta[m] has quit (Remote host closed the connection)
12:40*symbioquine[m] has quit (Read error: Connection reset by peer)
12:40*anashaddad[m] has quit (Remote host closed the connection)
12:40*getic[m] has quit (Remote host closed the connection)
12:40*germarsh[m] has quit (Read error: Connection reset by peer)
12:40*spitz234[m] has quit (Write error: Connection reset by peer)
12:40*tool172[m] has quit (Remote host closed the connection)
12:40*ddsh[m] has quit (Read error: Connection reset by peer)
12:40*dazinism has quit (Remote host closed the connection)
12:40*scrdcow[m] has quit (Write error: Connection reset by peer)
12:40*ringo[m]2 has quit (Read error: Connection reset by peer)
12:40*peter[m]3 has quit (Write error: Connection reset by peer)
12:40*donblair[m] has quit (Read error: Connection reset by peer)
12:40*munjoma[m] has quit (Read error: Connection reset by peer)
12:40*leogaggl[m] has quit (Read error: Connection reset by peer)
12:40*kunigunde[m] has quit (Read error: Connection reset by peer)
12:40*farmtech[m] has quit (Remote host closed the connection)
12:40*jsauma[m] has quit (Read error: Connection reset by peer)
12:40*mindcls[m] has quit (Write error: Connection reset by peer)
12:40*komatek[m] has quit (Read error: Connection reset by peer)
12:40*jack_monty[m] has quit (Write error: Connection reset by peer)
12:40*stefanie[m] has quit (Read error: Connection reset by peer)
12:40*kirsten-mc[m] has quit (Remote host closed the connection)
12:40*abinash[m] has quit (Write error: Broken pipe)
12:40*olaf[m] has quit (Write error: Connection reset by peer)
12:40*michail[m] has quit (Write error: Connection reset by peer)
12:40*antoine[m] has quit (Write error: Connection reset by peer)
12:40*petra[m] has quit (Write error: Broken pipe)
12:40*frederike[m] has quit (Write error: Broken pipe)
12:40*rafaeltcc[m] has quit (Remote host closed the connection)
12:48*abinash[m] has joined
12:50*getic[m] has joined
12:57*JustTB has quit (Ping timeout: 256 seconds)
13:12*JustTB has joined
13:13*antoine[m] has joined
13:13*calbasi_matrix has joined
13:13*friedrich[m]1 has joined
13:13*frederike[m] has joined
13:13*gunter[m] has joined
13:13*jack_monty[m] has joined
13:13*kunigunde[m] has joined
13:13*martha[m] has joined
13:13*michail[m] has joined
13:13*mindcls[m] has joined
13:13*norbert[m] has joined
13:13*olaf[m] has joined
13:13*petra[m] has joined
13:13*phantomse[m] has joined
13:13*pllagn[m] has joined
13:13*ringo[m]2 has joined
13:13*scrdcow[m] has joined
13:13*stefanie[m] has joined
13:13*ghpstudent[m] has joined
13:13*ddsh[m] has joined
13:13*andifi[m] has joined
13:13*jgaehring[m] has joined
13:13*Dorn[m] has joined
13:13*cekerber[m] has joined
13:13*anashaddad[m] has joined
13:13*germarsh[m] has joined
13:13*farmtech[m] has joined
13:13*donblair[m] has joined
13:13*komatek[m] has joined
13:13*jsauma[m] has joined
13:13*botlfarm[m] has joined
13:13*kirsten-mc[m] has joined
13:13*canadrian[m] has joined
13:13*munjoma[m] has joined
13:13*mstenta[m] has joined
13:13*laurademmel[m] has joined
13:13*symbioquine[m] has joined
13:13*spitz234[m] has joined
13:13*tcmah[m] has joined
13:13*peter[m]3 has joined
13:13*samrose[m] has joined
13:13*rafaeltcc[m] has joined
13:13*skipper_is[m] has joined
13:13*tool172[m] has joined
13:13*paul121[m] has joined
13:13*lpuro[m] has joined
13:30*dazinism has joined
13:30*leogaggl[m] has joined
14:25*JustTB has quit (Ping timeout: 240 seconds)
14:41*JustTB has joined
15:15*norbert[m] has left ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days")
15:16*phantomse[m] has quit (Quit: Idle for 30+ days)
15:17*getic[m] has left ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days")
16:07*JustTB has quit (Ping timeout: 240 seconds)
16:21*JustTB has joined
17:21paul121[m]hey mstenta just came across the issue for generalizing sensor listener code: github.com/farmOS/farmOS/issues/174
17:23paul121[m]In addition the Arable sensor module I've been working on, I might need to create another sensor module for a custom integration
17:24paul121[m]the integration might be able to just be a `farm_sensor_listener` module but still thinking it though...
17:24paul121[m]either way, curious if I might be able to contribute to generalizing the sensor listener code in the process!
17:25mstenta[m]paul121: cool!
17:25paul121[m]seems like the main motivation is generalizing the notifications that listener sensors have?
17:26mstenta[m]yes, when i created that issue i had a very specific set of things in mind
17:26mstenta[m](the issue also has some other discussions in it)
17:26mstenta[m]> What we can do in farmOS, if it would be helpful, is to generalize some of the code in the farm_sensor_listener module (which provides the simple "Listener" sensor type) out to the farm_sensor module (which provides the general sensor features, and pluggable sensor type system). For example, the sensor alerts code is currently in farm_sensor_listener, which means it only works with that type. There may be other code that
17:26mstenta[m]would be useful to other sensor types as well, so it might be useful to split some of it out. I think that can be done on a case-by-case basis, so we probably don't need a dedicated issue for it, now that I think more about it. And we may find that some things are just too tightly coupled to the way farmOS stores simple sensor data anyway, so it doesn't make sense to try to generalize it. I guess we'll see.
17:26mstenta[m]github.com/farmOS/farmOS/issues/174#issu
17:27mstenta[m]But... it might need some more thought...
17:27mstenta[m]The "notifications" are tightly linked currently to the listener type
17:27mstenta[m]They are triggered when a data point is received by the listener endpoint
17:27paul121[m]yea looking at that code now
17:28mstenta[m]So it might make sense to actually create a new issue specifically for generalizing the notification logic, and setting it up in a way that other sensor types can leverage
17:29paul121[m]right..
17:29paul121[m]does Drupal have any "core" support for notifications/alerts?
17:29paul121[m]I'm thinking similar to `drupal_set_message` but maybe something a bit more persistent?
17:30mstenta[m]no, not really
17:31mstenta[m]one thing I would love to see is a transition to using something like Rules
17:31mstenta[m]drupal.org/project/rules
17:31paul121[m]perhaps allowing module to provide notification "callbacks" would be handy
17:31paul121[m]ohh yeah keep needing to play with Rules
17:31mstenta[m]but we definitely won't be adopting Rules in 7.x-1.x
17:32mstenta[m]still - you could consider using it for your specific needs
17:32paul121[m]one use case: set a "Needs attention" flag on a Planting asset when sensor values are "high"
17:32mstenta[m]ah cool yea - Rules could do that
17:32mstenta[m]Rules is really powerful
17:33paul121[m]sweet I'll look into that!
17:33mstenta[m]it basically lets you set up automated actions with a "Trigger", "Conditions", and "Actions"
17:33mstenta[m]it's easy to write your own plugins for each of those too
17:33mstenta[m]so we would probably need a new "Trigger" plugin, for example, to fire when data is received, which then pipes it into Rules
17:34mstenta[m]git.drupalcode.org/project/rules/-/blob/
17:35mstenta[m]> The module has to invoke the event when it occurs using rules_invoke_event(). This function call has to happen outside of MODULENAME.rules.inc, usually it's invoked directly from the providing module but wrapped by a module_exists('rules') check.
17:35mstenta[m]So.... we *could* consider adding OPTIONAL support for Rules in the `farm_sensor` module... without actually using or depending on it ourselves
17:36paul121[m]hmmm
17:36mstenta[m]Thing is... Rules has it's own UI where all rules are defined... it's not necessarily tied to specific assets
17:36mstenta[m]So that's another angle to it
17:37paul121[m]sorta like Views?
17:37mstenta[m]But definitely ways to go about that... passing extra info into the event, etc
17:37mstenta[m]Yes
17:37mstenta[m]So ideally, I think there would be a single "sensor notification" Rule, which all individual sensor assets feed details/conditions into somehow
17:38mstenta[m](As opposed to having to configure a new Rule for each sensor)
17:38mstenta[m]That's how I would do it IF WE WERE SUPPORTING RULES in farmOS haha
17:38paul121[m]yeah that makes sense
17:38mstenta[m]but yea I'm also wary of setting expectations i ncore
17:38mstenta[m]at least before 2.x
17:39paul121[m]and I think that is prob too much to bite off for this little project anyways
17:39mstenta[m]notably from the Rules project page:
17:39mstenta[m]> Rules cannot be compatible with Drupal 9 until www.drupal.org/project/drupal/issues/312 is fixed.
17:39mstenta[m]oh and:
17:39mstenta[m]> Rules will also not sacrifice compatibility with the currently-supported versions of Drupal core, so Drupal 9 will not be supported until Drupal 8.8 is the lowest-supported version of Drupal core. The issues that are postponed because of this are listed in www.drupal.org/project/rules/issues/3089
17:39paul121[m]what would be handy..... being able to extend `farm_sensor_listener`
17:40mstenta[m]I had been following Rules' D8 upgrade progress for a while, and it's been SLOW
17:40mstenta[m]ah hmm yea that's another option
17:40paul121[m]basically just need to add additional `sensor_settings`
17:40mstenta[m]in what ways do you imagine? what requirements are you htinking about ?
17:40mstenta[m]oh ok - well that's easy! (iirc)
17:40mstenta[m]you can just use hook_form_alter()
17:40mstenta[m]but I think any fields you add to that form will be saved to the db settings automatically
17:41paul121[m]yup that is correct
17:42paul121[m]I guess I could use `hook_form_alter()`
17:42paul121[m]but I also don't want these additional settings to appear on ALL listener sensors
17:43paul121[m]basically, want a new sensor type, with the "listener" pub/private key logic
17:44mstenta[m]ah yes
17:45mstenta[m]i suppose you could provide a new type, but then just reuse all the functions from `farm_sensor_listener`
17:45mstenta[m](adding what you need on top)
17:45mstenta[m]So just kind of a wrapper around the listener code
17:46paul121[m]ahhh yes
17:47paul121[m]and `hook_form_alter` or just re-create parts of that form that are needed
17:48mstenta[m]yea if you make a wrapper you can probably just provide your own form function that delegates to the listener form function
17:52paul121[m]right
17:53paul121[m]that might be what I do!
17:53paul121[m]last thing I was curious about...
17:54paul121[m]this sensor really just needs to be associated with an individual planting asset
17:54paul121[m]not an area
17:55paul121[m](its a dendrometer measuring plant stem growth)
17:56mstenta[m]ah
17:56paul121[m]but... the only way to do this would be creating another field on that "custom sensor type" asset, yea?
17:56mstenta[m]not that this helps you now, but my thinking for the future is: when "areas" become "assets" themselves, we will essentially allow any asset to be located on any other asset
17:56paul121[m](or a bit messier, adding it as a `sensor_setting` ?)
17:57paul121[m]oohhh yes
17:57mstenta[m]what is your desired result? that the sensor shows up when you are looking at the planting?
17:57paul121[m]yep
17:58mstenta[m]a very simple (not very good UX) solution would be to add an "asset ID" setting to the sensor, and then use `hook_entity_view_alter()` to add stuff to the asset page
17:58mstenta[m]kinda hacky, but it would work
17:59paul121[m]yea, already doing something similar
17:59paul121[m]graphing observations associated with an area, on all plantings in that area
17:59mstenta[m]the other question there is: what happens next year?
17:59mstenta[m]make a new planting, update the ID in the sensor?
18:00mstenta[m]you don't really get to keep track of the old planting data that way
18:00mstenta[m]idea: maybe we should start thinking about the data itself being associated with an area/asset, rather than with the sensor
18:00paul121[m]true
18:01mstenta[m]so... you could have a sensor associate with a planting, but then you could associate it with something else, and all the old data would stay associated with the old planting
18:01mstenta[m]something to think about for 2.x perhaps...
18:01paul121[m]well, you could use movement logs to associate when/where/what data was associated with
18:01paul121[m]but its sorta complicated
18:01mstenta[m]yup true... because you can move sensor assets
18:01paul121[m]definitely something to think about!
18:02mstenta[m]well what about this: keep the sensor associated with the area, but put some logic in custom module that, when you are looking at a planting, it looks for sensors in the same area and shows data from that
18:03mstenta[m](back to your specific case right now)
18:03mstenta[m]so it's not technically associated with the planting, but you see the data on the planting page
18:03mstenta[m]so you get the end result you want
18:03mstenta[m]and that logic could in theory take into account the sensor movement logs to make sure it was actually in that area at the same time as the planting... more complicated but possible
18:04paul121[m]yeah I think that will be best
18:05paul121[m]associating it with the planting ID would work too
18:05paul121[m]and just archive + recreate the sensor
18:06paul121[m]still need to figure out how I'll be sending data to the farmOS listener....
18:06paul121[m]have to pull data off an FTP server....
18:08mstenta[m]:-P
23:50*JustTB has quit (Quit: Leaving.)

< 212020-07-22⋏23 >