v1.40: Nothing can stop automation

Posted by Davide 

Menu Plan 1.40 introduces a few features that will benefit most users, and some extra bonuses that will be very welcomed by the geekiest of you folks.

The main focus of this release is, you guessed right, automation.

Intent donations and Siri intelligence

You have probably never heard of intent donations, but they’re everywhere.
Donations are Siri’s AI main food: each app is responsible to tell Siri what a user is doing, so Siri’s algorithm figure out the best suggestion based on time, place and so on.

Have you ever wondered how does Siri knows that, when you open the phone in the morning, is for driving to work? That happens because the Maps (or Google Maps app, whatever you prefer) tells iOS that you’ve used it, at that specific time, with that specific destination; so Siri figures out a pattern, and decides to suggest you to open Maps with directions for your workplace.

Now Menu Plan is also telling Siri when you’re opening your menus and shopping lists, so Siri can make educated guesses, and hopefully suggest you to open “tomorrow menu” or “next week shopping list” when appropriate.

All of this happens without compromising your privacy: these info stays on your phone, Siri works locally and derives its suggestions from local data.

So do not be surprised if, in the following weeks, you’ll see a “Open today dinner” suggestion on the lock screen.

Siri Shortcuts integration

Menu Plan 1.40 contains a number of useful shortcut actions. They can be used in conjunction with all the other actions to create impressive automation routines, all without having to write programs.

Imagine these scenarios:
Gets today menus and send a sms to your partner.
Gets the current meal plan, extracts some data and post it to a server.
Gets the current shopping list, create an email and send it to your friends.

All of the above can be accomplished with Shortcuts and Menu Plan 1.40.

Menu Plan 1.40 adds 10 actions.
Three of them open the Menu Plan app, and cannot be used as input for other commands:

  • Open Current Week Plan
  • Open Shopping List (this week or last week)
  • Open Menu

You can do fancy stuff with them like “Open today menu when I get to some location”.

IOs commands screen showing routine that opens current menu when user travels to some address

The other actions produce an output that can be used as input for other commands:

  • Get Menu: returns a string with a recipe list for today or tomorrow menu, for the given meal
  • Get Plan JSON: return a JSON representation of a meal plan, from start date to end date
  • Get Day Menus JSON: return a JSON representation of menus for a given date
  • Get Menu JSON: return a JSON representation of a menu for a given day and meal
  • Get Shopping List: returns the textual version of a shopping list, from start to end date
  • Get Shopping List JSON: returns the JSON representation of a shopping list, from start to end date
  • Get Meals: returns an array of strings with the meals managed by Menu plan, as set up in Settings. Useful as input for some of the previous actions.

There’s no limit to the fancy scripts you can create with these actions.
Here is a simple example that asks the user for a start and end date, and returns the JSON of the planned meals.

IOs commands screen showing a command where user picks start and end dates, and then feeds them to the Get Meal Plan JSON action

Of course you could expand, extract some data from this JSON and use them as the input of some other action.

If you create some fancy command drop an email at support{AT}menuplan.app, I’d love to see what you guys do!

Web hooks

This is for the geekiest ones.
If you know what web hooks are, well, this is for you.

Menu Plan 1.40 lets you share your weekly meal plan by translating it into JSON and POSTing it to a web server. You can even use an authentication bearer token. This kind of sharing is triggered by the share button, but can also be made automatic, so each change to the menu will trigger an updated POST.

You can enable web hook sharing in the Settings screen.

Web hook settings screen

To give you guys an example, I have set up a simple service that process the JSON in and displays an HTML. This service just saves the JSON and reads it later; of course you can do much fancier things, like saving meal entries to your database, and so on.

Menu Plan Service on Github

It’s a simple Sinatra app, it’s Ruby.
I know most of you would use some different scripting language, but I wanted to put up a fast example as a general guide, and Sinatra is my tool of choice in these cases.
I am pretty sure you will cook something up with your language or framework of choice.

And remember:

Nothing can stop automation meme, caveman banging rocks together, modern man banging on the computer screen

Categories: menuplan