Hello, and thank you for this amazing distribution.
What I think would be really great is to be able to assign a sensor to a piece of equipment. It would be nice if I could set up my raspberry pi on my truck, and send message payloads of:
{ "timestamp": 1539060333, "temperature": 76.5, "humidity": 60, "latitude": 34.0522, "longitude": -118.243683, "speed": 59 } etc...
Then show the values on a map, to show say the last 10 json payloads on a map bubble, sort of like a geo tracker, and sensor logger all in one? I'm sure views can do this. Just need to be able to reference my sensor to a piece of equipment.
Thanks again for this great work.
Comments
Comment #2
m.stentaThis is a great idea @tm541 - it's something that has come up before but was never officially documented/requested.
The use case you described specifically could be broken down into a few different feature requests, I think...
1) Ability to "attach" sensors to equipment. This would mean you could say that a sensor asset is "located" in/on the equipment asset. I've actually been thinking about this idea in a general context too: allowing for assets to be located in other assets, instead of areas. This would allow you to say, for example, that a particular tractor attachment is located on a particular tractor. And you could record when you attach/remove it. When it's attached, the equipment is located on the tractor. When it is detached, it's location is whatever area it is being stored in. This ability is also relevant to this: #2363393: Make "Area" into a type of Farm Asset (where areas would become a type of asset).
@BruceDawson also had some related thoughts in this issue: #2757061: Equipment could use relations
2) Map of sensor values. If we had a sensor that was collecting GPS coordinates (in addition to sensor readings), we could create a custom map display for that. We would want it to be a new type of map, instead of the map that is currently based on movements, because it would probably be collecting way more GPS coordinates than we would want to store in separate movement logs. This could also serve as a basis for representing a lot of the data that the modern tractors are collecting already.
All fun things to think about... I love the idea of using a Raspberry Pi for this too. A great alternative (or addition) to the proprietary sensors inside tractors. :-)
Comment #3
m.stentaAlso related: I've wondered in the past if "Sensor" assets should really just be a type of "Equipment" asset. Does it need to be its own asset type? I don't really think so. The only benefit currently is that it puts all your sensors in one place under the main menu. But that could be achieved with some kind of "sensor dashboard" too, which filters down equipment to only show ones that have sensor data. Then you could also say that your tractor is a sensor (if it collects data itself, which many do).
Comment #4
tm541 commentedHello, and thanks for the fast response. Setting up sensors as a piece of equipment definitely seems to make sense to me. Then if you could reference one piece of equipment to another. Like if you are going to add an implement like a plow or a swather to a tractor, these are separate pieces of equipment but are related to each other during the time they are joined together. Or a truck hauling a load off the farm has a tractor and a trailer. We can assign different trailers to tractors, and people to drive them.
Adding the ability to put a sensor on board and be able to log all the data to the cloud as well as locally to the pi would be the icing on the cake.
Then if you could say assign that equipment to an area, then send an alert if the equipment arrives or leaves the area. Sort of like geofencing? I guess....
I have something similar set up on my Raspberry Pi using a UbloxGPS Module and NodeRed' WorldMap nodes for the programming.
Please let me know if there is anything I can do to help with this project, It is an amazing build and I am very happy to be working with it.
Comment #5
mbconsultinguk commentedThis sounds like a good idea to me as well, definitely something I'd be interested in working on. I've just logged https://www.drupal.org/project/farm/issues/3053674 to look at how we deal with metrics in FarmOS, so this work might feed into that.
Comment #6
m.stentaRelated: https://github.com/farmOS/farmOS/issues/358
Comment #7
m.stentaJust realizing we can close this because it's now possible in farmOS v2 for a "data stream" to reference an asset! Thanks to @paul121! :-)