| [23:00:04] | * JustTB has quit (Ping timeout: 276 seconds) |
| [23:15:01] | * JustTB has joined #farmos |
| [05:39:35] | * permagriculture has joined #farmos |
| [05:39:41] | <permagriculture> | hi anyone here? |
| [05:52:07] | * permagriculture has quit (Quit: Page closed) |
| [08:23:16] | <svenn> | always lurking |
| [08:28:08] | * mstenta has quit (Ping timeout: 260 seconds) |
| [08:37:56] | * mstenta has joined #farmos |
| [08:51:42] | <mstenta> | svenn: same :-) |
| [08:52:07] | <mstenta> | if only they would hang around and wait for an answer... |
| [08:52:18] | <mstenta> | i wasn't awake yet |
| [08:54:53] | * trentf has quit (Remote host closed the connection) |
| [08:57:19] | <svenn> | there's a new serious kid on the precision farming block: agopengps |
| [08:57:40] | <svenn> | I have now bought my first ever windows10 tablet to test it out |
| [08:58:05] | <mstenta> | oh neat, it's open source? https://github.com/farmerbriantee/AgOpenGPS |
| [08:58:14] | <svenn> | the soft itself is open source |
| [08:58:30] | <svenn> | and I just downloaded the zip to the tablet and it runs |
| [08:58:42] | <svenn> | I just got to connect my gps when I get back home |
| [08:58:59] | <mstenta> | what are you using it for? reading the readme now... |
| [08:59:39] | <svenn> | I will use it for guidance on my second tractor |
| [09:00:40] | <svenn> | I will test out the features of self-driving, but I have to build the hardware first |
| [09:01:41] | <svenn> | but like all farm guidance stuff, it needs a back-end to collect all the works for later reference |
| [09:02:04] | <svenn> | that is where farmos comes in. |
| [09:29:37] | * permagriculture has joined #farmos |
| [09:30:19] | <mstenta> | hi permagriculture |
| [09:30:28] | <permagriculture> | Hi mstenta |
| [09:30:39] | <mstenta> | welcome to #farmOS :-) |
| [09:31:12] | <permagriculture> | I was just wondering with the hosted service, is there a way to get automated backups? Dropbox/ Google Drive etc? |
| [09:31:55] | <mstenta> | permagriculture: with Farmier you mean? no, not yet - but that's a great idea... i will add that to my todo list... |
| [09:32:12] | <permagriculture> | OK great.. |
| [09:32:31] | <mstenta> | one thing that i already plan to do is make it possible for users to export their database so that they can set it up locally for testing or development |
| [09:32:37] | <permagriculture> | Assuming it's a fairly standard Drupal install are there RSS feeds? |
| [09:33:17] | <mstenta> | permagriculture: farmOS comes with the RESTful Web Services module |
| [09:33:28] | <mstenta> | so you can use that to pull data in JSON or XML format |
| [09:34:04] | <mstenta> | but you need to authenticate, it doesn't make that data available to the public |
| [09:34:32] | <permagriculture> | OK will google that a bit.. |
| [09:34:51] | <permagriculture> | people i'm working with want spreadsheets (god knows why) |
| [09:35:15] | <mstenta> | here is the module page, which has documentation for it: https://www.drupal.org/project/restws |
| [09:35:42] | <mstenta> | we have an outstanding todo in the queue to add more farmOS-specific documentation on farmOS.org: https://github.com/farmOS/farmOS.org/issues/4 |
| [09:35:50] | <mstenta> | permagriculture: spreadsheets of what? |
| [09:36:07] | <mstenta> | the most recent release (7.x-1.0-beta13) has CSV exports |
| [09:36:17] | <permagriculture> | I don't think it matters, more of a cargo cult worship.. |
| [09:36:30] | <permagriculture> | but movements/ plantings etc would be good |
| [09:37:00] | <permagriculture> | If there was RSS was going to write to google sheet via https://ifttt.com/ |
| [09:37:28] | <mstenta> | the data stored in farmOS is not publicly visible, so RSS isn't really an option |
| [09:38:05] | <mstenta> | you can manually download CSVs of plantings (and other assets), and movements (and other logs) |
| [09:38:25] | <mstenta> | i'm going to be building a CSV importer very soon |
| [09:39:41] | <permagriculture> | could I wget the csv? |
| [09:41:23] | <mstenta> | no, it's generated dynamically when you click the CSV button |
| [09:41:44] | <mstenta> | JSON or XML via the RESTWS module is your best bet for programatically accessing the data |
| [09:43:18] | <permagriculture> | OK will have a look into it.. |
| [09:47:27] | <mstenta> | permagriculture: there is a way to use HTTP Basic Authentication to access the restws endpoints, so you don't have to program the authentication and cookie storage and all that yourself |
| [09:47:39] | <mstenta> | i could enable that module on your hosted site if you want to try that out |
| [09:47:54] | <permagriculture> | yes please that would be good |
| [09:48:04] | <permagriculture> | https://nibleyleaves.farmos.net |
| [09:49:32] | <mstenta> | permagriculture: done. |
| [09:49:54] | <permagriculture> | so something like https://nibleyleaves.farmos.net/node.json?type=plantings should work? |
| [09:50:22] | <mstenta> | here is the readme for the restws module: http://cgit.drupalcode.org/restws/tree/README.txt |
| [09:50:35] | <mstenta> | and here is the readme for the basic auth submodule: http://cgit.drupalcode.org/restws/tree/restws_basic_auth/README.txt |
| [09:50:55] | <permagriculture> | Thanks |
| [09:51:41] | <mstenta> | permagriculture: almost... |
| [09:51:46] | <mstenta> | farmOS doesn't use nodes |
| [09:52:07] | <mstenta> | the entity type for plantings is "farm_asset" |
| [09:52:08] | <mstenta> | https://nibleyleaves.farmos.net/farm_asset.json |
| [09:52:34] | <mstenta> | similarly, logs would be https://nibleyleaves.farmos.net/log.json |
| [09:52:57] | <permagriculture> | OK will will have a look |
| [09:52:58] | <mstenta> | i'm not sure about filtering... the ?type=planting doesn't seem to work... looking to see how to do that... |
| [09:53:29] | <mstenta> | oh wait yes it does... |
| [09:53:29] | <mstenta> | https://nibleyleaves.farmos.net/farm_asset.json?type=planting |
| [09:54:18] | <mstenta> | similar for logs, except note that log types are prefixed with "farm_" |
| [09:54:23] | <mstenta> | so for observations, it would be: |
| [09:54:24] | <mstenta> | https://nibleyleaves.farmos.net/log.json?type=farm_observation |
| [09:54:26] | <mstenta> | and harvests: |
| [09:54:29] | <mstenta> | https://nibleyleaves.farmos.net/log.json?type=farm_harvest |
| [09:55:51] | <mstenta> | regarding basic auth... you will need to create a new user (probably with the Farm Worker role) in your site with a name that starts with "restws" |
| [09:55:56] | <mstenta> | (per the readme: http://cgit.drupalcode.org/restws/tree/restws_basic_auth/README.txt) |
| [09:56:15] | <mstenta> | that's a good way to do it... in case you ever need to revoke access from that user |
| [09:56:35] | <mstenta> | if you want read-only access, create a user with the Farm Viewer role (that is probably the safest, if you only need to retrieve data, and don't need to create data) |
| [09:57:09] | <permagriculture> | OK back in a second.. |
| [09:57:40] | <mstenta> | permagriculture: FYI not many people are using the REST API in farmOS yet, that i'm aware of, so you might be one of the first to debug things... so let me know if you hit issues, it will be good to learn from the process and maybe document findings on farmOS.org |
| [09:57:45] | <mstenta> | ok, i'll brb too |
| [10:48:45] | * permagriculture has quit (Ping timeout: 260 seconds) |
| [11:44:39] | * trentf has joined #farmos |
| [13:45:10] | * mstenta has quit (Ping timeout: 240 seconds) |
| [13:55:03] | * mstenta has joined #farmos |
| [14:25:27] | * JustTB has quit (Ping timeout: 240 seconds) |