Embed data from FarmOS in VLE?

Hiya,

I am involved with a college that has a small farm. We would like to use our VLE - Moodle, to embed ‘live’ farm data into our farm course pages. Is it possible to embed elements from FarmOS into another web site using an iframe etc?

Thank you,

Nigel.

1 Like

Hi @barnabythebear! Welcome to the farmOS forum! :smiley:

There are lots of possibilities!

The big consideration is: farmOS data is private. It requires authentication to be viewed. So embedding an iframe would only work if anyone who was viewing the iframe was also logged into the farmOS instance.

Another possibility would be: write a server-side script that connects to farmOS via it’s API (using farmOS.py, for instance), and pull the data you want to display. Then wrap that up into something you can embed in Moodle.

Or, if you don’t need it to be embedded, you could simply link to the farmOS site, and provide some public login credentials (eg: guest / guest) which only have the “Farm Viewer” role (this allows the user with that role to view the farmOS data, but they can’t make changes).

In the future, we’d like to add an option to make farmOS publicly viewable (without a login). That wouldn’t be too hard. It isn’t something we have on our active sponsored roadmaps at the moment though.

Hiya,

Thanks for your reply. I did think the sign in element would be an issue. The public view option would be great :slightly_smiling_face:

Thanks

Nigel

1 Like