Day view of calendar doesn't display any tasks

Copy that. I guess there are other ways to view the tasks through filtering logs. I would vote for a calendar UI within the app because our farmOS calendar will be our “these tasks have to happen for anything to work, it’s non-negotiable” calendar and we just want to stay within one system for that. My personal calendar is cluttered enough. Also data privacy is a concern.

I quite like the calendar as it is, at least from what I can tell from only the monthly view working at the moment. I think it would always be more powerful within farmOS because it can utilize data throughout farmOS. What if you’re using an external calendar to complete a planting task and you need more details to carry it out? If it’s within farmOS, you can just click into the asset to see everything you need (like plant spacing and equipment to use).

Also, you can use the filter to view a number of different calendars and it shows a check mark next to tasks that are done. For example, we’re planting, we filter for a planting calendar and focus on that. I suppose filtering logs sort of achieves the same functions but I personally like to be able to visualize tasks in a calendar with monthly, weekly and day views. And imagine if you could drag tasks around the calendar and they would reschedule automatically in farmOS! :drooling_face:

As far as debugging and a patch, I don’t even know what that means let alone where to begin :sweat_smile: (although I like the idea of learning how to code a bit to contribute to farmOS and to modify it to perfectly suit our needs)

But maybe my best way to contribute is to make videos and blog posts showing other farmers how to set it up and use it in different contexts.

3 Likes

These are all really good points @texasecofarms !

I think it would always be more powerful within farmOS because it can utilize data throughout farmOS.

Yea I can imagine doing fun things with weather data, or plant lifecycle visualization!

I doubt we’d be able to do that stuff with the old Drupal Calendar module we were using in v1. Probably the best approach (from a programming perspective) would be to build our own custom calendar library specifically for what we need - similar to the way that we built farmOS-map for our mapping needs (based on OpenLayers). So maybe we need a farmOS-calendar!!! :smiley:

Maybe someone in the community wants to take this on?? Wink wink nudge nudge… :wink:

maybe my best way to contribute is to make videos and blog posts showing other farmers how to set it up and use it in different contexts.

YES! These would be sooo helpful! @jgaehring has been excited to set up a sort of “Community blog” for things like this on farmOS.org! If you want to write anything up go for it! If we have some content it will inspire us to do the farmOS.org work on our end!

1 Like

Absolutely! As @mstenta mentioned, I’m going to discuss this at our next monthly call, in fact I was just logging in to write up a little more about that plan, when I saw your post. I’ll tag you in that topic when I post it.

2 Likes

Hey folks, I was just updated into 2.0. I’ve been spending the winter months putting all of our tasks for this year on FarmOS, and we’ve been using the calendar view for everything. I’m trying not to have a heart attack not being able to see it. It was the main way I had workers view their tasks. Anyway, will it be viewable on FarmOS, or will it only be an integration into calendars now? I’m fine with the google calendar integration, but this would be huge for us this year since we have fully adopted FarmOS for daily operational scheduling.

1 Like

Hey Kyle! Sorry your instance was part of the group hosted by Our Sci, so it got swept up in the automated process I have going… I can switch you back to v1 if you’re interrupted by this! I’ll send you an email…

Oh just remembered @Farmer-Ed’s work with NodeRed: farmOS, NodeRed, Home Assistant etc - #11 by Farmer-Ed

Specifically:

So, I’ve been experimenting with reading and searching logs with Node Red and so far it’s going well, I created a flow that searches observations for the term “Due Date” and updates a Google calendar with the dates. Some thing simple to start with.

The flow is here: FarmOS-Node-Red-Flows/Calving-Calendar-Flow.json at main · Farmer-Eds-Shed/FarmOS-Node-Red-Flows · GitHub

Perhaps that could be an alternative to explore, in lieu of (or while waiting for) iCal integration in farmOS itself…

@kyle I got your PM but I think it would be more useful for anyone else looking for a similar solution to answer here.

My solution requires Node Red which can be installed on the same server as farmOS (possibly not if your using Farmier? @mstenta?) or on a separate server even your local PC/Laptop. You also need to sign up for a Google Developer account.

Node Red passes messages between the farmOS API and Google API and can work in both directions if needed, so as well as filling the calendar from farmOS I can also create logs in farmOS by recording events in Google Calendar.

There is a small bit of javascript needed also, but nothing too complicated for a simple calendar export. I was considering doing a farmOS Node Red tutorial for my blog, the calendar one may be a good choice to start with.

If this is something you want to try out and need some more detail let me know and I will do my best to help.

1 Like

@Farmer-Ed Yes, I do use Farmier, so I don’t know if that will be a problem. I’m not savvy in javascript nor in using APIs, so any tutorial help would be much appreciated. Thanks!

1 Like

It shouldn’t be a problem, you can run it on your local machine obviously it will only work when your PC/Laptop is on then, but that should be fine if you just want your upcoming events added to the calendar in batches.

1 Like

Farmier only supports farmOS hosting currently - but maybe it would be fun to offer some kind of hosted NodeRed service in the future! Or maybe something like that already exists??

In either case, I just tried the command on this page and got it running locally lickety-split!

https://nodered.org/docs/getting-started/docker

docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red

First time I’ve run NodeRed, so I have no idea what to do next… but now I’m excited to try things!

I have a Raspberry Pi zero hooked up to a soil temperature sensor and heating pad on a relay, currently running via a bash script to germinate seeds… maybe I’ll try rewiring that as a NodeRed flow…

Anyway, that’s an aside. @kyle maybe we can help you get something up and running on your local computer? The main thing you’ll need is a computer that is running 24/7, so it can sync things up automatically between your farmOS and your Google Calendar. (Although I suppose it could also work on a laptop that isn’t on 24/7… it might just require a manual button press to sync from time to time? @Farmer-Ed might know better what the options are…)

@Farmer-Ed oh I just had an idea… have you played with GitHub Actions at all? It can be used to run a Docker container on a schedule… so if we made a GitHub Action that ran NodeRed, plugged in a custom flow (for calendar syncing), stored @kyle’s API credentials (in GitHub Secrets), and ran nightly, it could sync the calendar…

The development/deployment process would be:

  1. Run NodeRed locally to develop a flow for syncing calendar (could perhaps be very generic and useful for anyone!) - which expects API credentials from environment variables (is that possible in NodeRed?)
  2. Create a template GitHub repository that has the NodeRed flow and a GitHub Actions workflow, which runs the NodeRed container with the custom flow on a nightly basis.
  3. For anyone who wants to use this, they could create a new GitHub repo from the template, add their API credentials, and voila! Syncing calendars!

(of course, running NodeRed via GitHub Actions isn’t the most direct way to do this… but could be a fun one to experiment with… since NodeRed provides a nice UI for building logic, which lowers the barrier to entry)

IBM do as part of their cloud services, they had a free option until recently but I believe this is now gone. Oracle have a free cloud offering that would suite but will require a bit more configuring Free Node-RED Hosting in the Cloud - General - Node-RED Forum

loads of options for a “button” inject node or button node for Node Red Dashboard would be the simplest options.

I’m not familiar, but that does sound very interesting. And node Red can indeed load environment variables. I’d be interested in exploring that option a bit more.

1 Like

@kyle I’m adding some videos to Youtube on using Node-Red if you are interested farmOS - YouTube also posting updates in this thread, farmOS, NodeRed, Home Assistant etc - #50 by Farmer-Ed.

2 Likes

@mstenta I could definitely use my laptop with a manual sync button. From that option, I could then easily share that calendar with other people. That sounds like the easiest. @Farmer-Ed thanks for the video tutorials…I’ll check them out. I’m afraid, I’m gonna need a lot of hand-holding on this…

2 Likes

Sure, lets see how it goes…

I’m sure if you can get as far as installing and Authenticating with your farmOS instance then the rest can be built on.

1 Like

@Farmer-Ed I got Node Red installed and running, but it looks like I did something wrong for getting the FarmOS nodes (external nodes are not showing up at the bottom of the side bar) Here is a screenshot of when I followed your instructions from your video…

Any ideas here? Sorry, this is probably an “well-duh” problem.

Looks OK…

I presume you’ve refreshed the browser after restarting nod-red?

In my video I ran npm i @farmer-ed/node-red-4-farmos outside of the .node-red directory which strictly speaking I probably shouldn’t have as this created a new node_modules directory outside of .node-red but the windows version didn’t seem to have any issue with this. For my production machine which is Linux and more like the MacOS install I ran it inside the .node-red directory.

Presuming you installed Node-Red with npm, I would run the following.

npm uninstall @farmer-ed/node-red-4-farmos
cd .node-red
npm i @farmer-ed/node-red-4-farmos

If you installed with docker it might be a slightly different issue involving your bind mount.

1 Like

@Farmer-Ed Success. I’ve got the FarmOS nodes available now. I looked at your second video, and I’m not sure how to get the FarmOS credentials node. Am I supposed to follow the directions on that video for calendar syncing? I’m guessing that video is just for demonstration on how to use node-red. At this stage, if there would be some directions on how to proceed with the Google API and calendar syncing that would be awesome. Thanks for all the help so far!

1 Like

Great, you are getting there so.

The credentials node is not one of the farmOS nodes I created, but I put links in the description of the video for any extra nodes I used.

npm install node-red-contrib-credentials

In the video it says farmOS credentials, but that’s just a label you can apply when configuring it.

I haven’t done a video for calendar syncing yet, but I have some examples in GitHub you can import. But I can do a video too.

Edit: actually I’ll do a new calendar flow at some stage this week as the one currently on GitHub doesn’t use my new farmOS nodes.

1 Like

@Farmer-Ed Morning! Wanted to touch base and see if you had the chance to provide any further instructions for a calendar syncing option. Also, do I have to keep the Terminal open all the time when running the NodeRed? Sorry for the ignorant questions!

1 Like