IRC logs for #farmOS, 2024-08-05 (GMT)

2024-08-04
2024-08-06
TimeNickMessage
[12:43:51]<symbioquine[m]>https://github.com/farmOS/farmOS/pull/864 should be ready for review!
[12:44:39]<symbioquine[m]>Resulting tags/manifests: https://hub.docker.com/repository/docker/symbioquine/farmos/tags
[12:47:26]<symbioquine[m]>For those following along at home, docker run -p 80:80 --rm symbioquine/farmos works on X86_64 and Arm32v7/Arm64v8 architectures (I plan on deleting Docker hub symbioquine/farmos once the PR is merged, so don't depend on it for anything.)
[14:20:08]* middyeasy[m] has joined #farmos
[14:22:39]<middyeasy[m]>Hello All. First time on and so hope i have the right forum to ask my question. In regards to FarmOS and Android based survey apps. I was wondering if you all knew which Android APP GPS GNSS survey app could export to FarmOS with no manipulation. I was experiment with SW MAPS and exported to KML but when i went to import it threw an OPPS error and would not parse. Turns out once i stripped the layer color and font information from the KML
[14:22:39]<middyeasy[m]>it imported perfectly. As there is no way to remove this output that i can find i was wondering if you all knew of a good alternative. Thanks
[15:07:26]<mstenta[m]>Welcome middyeasy! The forum is a good place for questions like this too! https://farmOS.discourse.group - It's a little better in the sense that others might chime in over time (chat is a bit more ephemeral)
[15:07:48]<mstenta[m]>I'm not sure if I have any suggestions personally, although I'd be curious if we could fix the KML import issue so that it "just worked"
[15:13:00]<middyeasy[m]>it should be fairly simple. If the parse function could just ignore the following lines.
[15:13:02]<middyeasy[m]><Placemark>... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/hRMwNPHZFycmebFY...)
[15:13:26]<middyeasy[m]>So that it sees the file input like this.
[15:13:27]<middyeasy[m]><Placemark>... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/etlqTxnXEWCoJgLD...)
[15:14:08]<middyeasy[m]>Ie JUST ignore this info
[15:14:09]<middyeasy[m]><name>Layer1 1</name>
[15:14:09]<middyeasy[m]><description> <![CDATA[<h4>Layer: Layer1</h4><h4>Feature ID: 1</h4><p>Remarks: </p><p>Fix Quality: DGPS</p>]]></description>
[15:14:09]<middyeasy[m]><styleUrl>#Layer1-Style</styleUrl>
[15:14:34]<mstenta[m]>Question: was it the bulk kml importer or the "import from file" on an individual asset/log?
[15:14:46]<middyeasy[m]>then SW MAPS would be 100% compatible and Survey Android APP that is free with FarmOS.. all i do is just just delete those lines.
[15:14:59]<middyeasy[m]>I am using the import from file as a KML
[15:15:11]<middyeasy[m]>I have not expertiment with KMZ or the bulk one.
[15:15:53]<middyeasy[m]> * Ie JUST ignore the following lines:
[15:16:50]<middyeasy[m]> * then SW MAPS would be 100% compatible and Survey Android APP that is free with FarmOS would work really well. All i do is just just delete those 3 lines.
[15:17:00]<mstenta[m]>We use the GeoPHP library for parsing KML in that case
[15:17:07]<mstenta[m]>So it might be a bug with that upstream library
[15:17:26]<mstenta[m]>https://github.com/itamair/geoPHP
[15:17:29]<middyeasy[m]>I dont know.. my cats name is fluffy!
[15:20:03]<middyeasy[m]>So maybe i need to reach out to them about getting that updated first then.
[15:21:14]<paul121[m]><middyeasy[m]> "Hello All. First time on and..." <- Can you share what the OPPS error is?
[15:21:15]<middyeasy[m]>But I am developing a robot that will tap into FarmOS and use precise data to do its job and I need FarmOS to be able to import precise data from something to do so and I can just manually edit these using something like find and replace with Notepad++ in the meantime.
[15:21:32]<middyeasy[m]>sure
[15:22:26]<middyeasy[m]>ACTION uploaded an image: (176KiB) < https://matrix.org/_matrix/media/v3/download/matrix.org/bddQRcogVumZcZwU... >
[15:24:27]<paul121[m]>Thanks! There should be a more detailed error message in Administration -> Reports -> Recent log messages
[15:24:49]<paul121[m]>Unfortunately the browser console won't have useful information here
[15:25:04]<middyeasy[m]>JUST FYI. I bought a Sparkfun Torch .. it in theory is supposed to have 16mm accuracy with just a WIFI survey. I am curious to find out how far OFF the manually set GPS coordinates are in real like to the ones I placed using just the FARMOS drawing tools. And if they are way off.. Is there a way to adjust the image to match the actually coordinates?
[15:25:29]<middyeasy[m]>i can recreate it easily one sec let me try.
[15:27:08]<middyeasy[m]>Type php... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/GPrlYBBWLTiGXZIg...)
[15:27:56]<middyeasy[m]>Here is the KML file i am trying to import
[15:27:56]<middyeasy[m]><?xml version="1.0" encoding="UTF-8"?>... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/CUKlXhHnvOnCrjhI...)
[15:28:35]<middyeasy[m]>one should if so inclined be able to just put that into a notepad and name it test1.kml and see the same error in theory.
[15:31:23]<middyeasy[m]>s/like/life/
[15:32:33]<middyeasy[m]> * if one should be so inclined, one could just put that into a notepad and name it test1.kml and see the same error in theory.
[15:36:07]<mstenta[m]>> Message Exception: Serialization of 'SimpleXMLElement' is not allowed in serialize()
[15:36:07]<mstenta[m]>I've seen this error pop up from time to time in Farmier server logs - but never had a chance to dig into it. Maybe we can get to the bottom of it.
[15:36:55]<mstenta[m]>middyeasy: Would you mind opening a bug report in github.com/farmOS/farmOS/issues and posting this info and screenshot? Then we at least have a tracking issue to work from
[15:37:27]<mstenta[m]>> Is there a way to adjust the image to match the actually coordinates?
[15:37:27]<mstenta[m]>Best bet is probably to make your own image layers and use that in the map instead of the default MapBox layer
[15:37:57]<paul121[m]>Yeah. Seems like a bug in upstream XML serialization or maybe this is just invalid XML? Not quite sure.
[15:38:02]<mstenta[m]>I've heard MapBox/Google layers can be off by quite a bit, depending on where on the earth it is. Sometimes you can find more regional maps that are more accurate.
[15:39:17]* farmBOT has joined #farmos
[15:39:40]<middyeasy[m]>Is there a tutorial on how make your own image layer available?
[15:39:46]<middyeasy[m]>Yes ic an post on there for sure.
[15:45:13]<mstenta[m]>farmOS doesn't host map imagery itself, but if you have imagery available via a standard GeoServer (or a third-party service), it's relatively easy to add it to farmOS
[15:45:39]<mstenta[m]>This module allows you to add custom layers of various types via URL: https://www.drupal.org/project/farm_map_custom_layers
[15:47:07]<middyeasy[m]>Ok thank you I will look into that now!
[15:48:01]<middyeasy[m]>OK new bug report given.
[15:51:30]<mstenta[m]>Thanks!
[15:52:08]<mstenta[m]>Based on your screenshot, this is actually the "bulk KML importer", not the individual Land asset importer... so it's actually slightly different code involved
[15:52:58]<middyeasy[m]>oh how do i do the other one?
[15:53:48]<mstenta[m]>Add a new land asset, upload the file to the asset, and then go to the Location tab and there's a button to import geometry from the uploaded file(s)
[15:53:57]<mstenta[m]>I would be curious if that works, but the bulk import doesn't
[15:54:51]<mstenta[m]>Here is the code we have for decoding KML in the bulk uploaded (notably NOT geophp)
[15:54:52]<mstenta[m]>https://github.com/farmOS/farmOS/blob/3a73ccf6360ba309ee657e2d645d29c239...
[15:55:01]<mstenta[m]>I bet the bug is in there somewhere...
[15:55:10]<middyeasy[m]>ACTION uploaded an image: (1120KiB) < https://matrix.org/_matrix/media/v3/download/matrix.org/pNpGcRzqxlEPclwL... >
[15:55:13]<middyeasy[m]>My button appears to be greyed out
[15:55:13]<mstenta[m]>It's a rather custom implementation 😅
[15:56:14]<mstenta[m]>Hmm that's weird
[15:56:22]<mstenta[m]>Maybe try saving the asset first, and then edit again?
[15:56:43]<middyeasy[m]>Maybe you can try with my original code file put into a notepad and see if works?
[15:56:48]<middyeasy[m]>ok let me try that
[15:57:14]<mstenta[m]>Sorry I have to run right now... but please put any clues you find in your github issue!
[15:57:17]<mstenta[m]>I'll try to check back in later
[15:57:29]<middyeasy[m]>OK thank you nope still greyed out
[15:57:36]<middyeasy[m]>ACTION uploaded an image: (1078KiB) < https://matrix.org/_matrix/media/v3/download/matrix.org/svAvZFNFTrXMLGWz... >
[15:58:14]<mstenta[m]>Wonder if it's a hosting issue... you could try creating a demo farmOS instance via https://farmos-demo.rootedsolutions.io/ to see if it works differently
[15:58:22]<mstenta[m]>Although I'm not sure if demos allow file uploads...
[15:58:42]<middyeasy[m]>OK thanks Ill play around with it for a whil.e
[15:59:34]<mstenta[m]>Just checked... looks like that button is disabled if there are no files uploaded to the file field:
[15:59:34]<mstenta[m]>https://github.com/farmOS/farmOS/blob/3a73ccf6360ba309ee657e2d645d29c239...
[16:00:06]<mstenta[m]>Make sure you upload a file with a .kml extension to the "Files" field on the asset first
[16:15:46]<middyeasy[m]>Dudes that worked!!!!
[16:16:04]<middyeasy[m]>When adding to file first. it ungreyed and uploaded!
[16:17:12]<mstenta[m]>Oh good!
[16:17:56]<mstenta[m]>Thats probably a better option for you anyway. The other one is mainly for creating a bunch of land assets in bulk (eg: for initial farm setup)
[16:18:14]<mstenta[m]>But KML filea can be uploaded to individual asset and logs of any type
[16:19:16]<middyeasy[m]>Sweet OK well now you can say you all have a known working Survey Android App called SW MAPS! thanks for the help!