Pushcut Widgets are here!

Hello everyone, we’re happy to announce Pushcut now has widgets!

TL;DR

Update 2021.6 brings you:

  • Automated widgets
  • A new widget creator inside Pushcut
  • New Shortcuts and Zapier actions and a new web hook URL to update the widgets

Long form

Pushcut already gives you access to immediate feedback through push notifications. The new widgets are here to fill a different need: getting important information right on your iOS Home Screen.

Each widget has an associated content, that can be updated dynamically. This way, you can have the same widget show your calendar entries in the morning :spiral_calendar:, the sunset time in the afternoon :sunrise: and the number of tasks :white_check_mark: you’ve finished today in the night.

All widgets can be created using Pushcut’s new Widget Creator! You’ve got 5 basic components: columns, rows, text, symbols and spacers and these can be easily mixed to create beautiful widgets capable of showing you lots of information!

You can also add [[input]] tags to your contents, and these can be filled dynamically using Shortcuts, Zapier or our URL webhooks.

Everything you build using the widget creator can be shared as JSON structures! And we’ve already got 7 widgets and 4 guides ready for you on Pushcut’s website!

It’s important to say Pushcut’s widgets are a pro feature, and require a Pro Subscription.

We’ve left the Pro Subscription price unchanged, so if you’re already a subscriber, you’re getting new things! And if you’re not, please consider subscribing and supporting the app’s development.

We’ve worked hard to bring you this completely new feature for Pushcut and we can’t wait to see all the widget ideas that you will come up with! So, please, don’t hesitate to share them here on our subreddit, at the Automators forum or @ us on Twitter.

Also, rest assured that we’ve been hearing your feedback regarding improvements on other Pushcut features, such as Notifications and Automation Server, and that we are working on them.

5 Likes

Welp, it’s a start! Great new feature! Thanks!

screenshot

Excellent!

As I think I’ve mentioned before, you need to build up a repository of examples. You have some for this feature; That’s a good start.

(I say this as - at least on Reddit - people have commented PushCut is a little too geeky for them to grasp.)

Anyhow, good luck with the new release!

As @Martin_Packer says; pushcut is not for the faint of heart.
Even with the examples on the site it’s a big puzzle. (F.e. The milestone widget still does nothing for me after following the steps 3 times)

If you enjoy a puzzle it’s great (and btw I do)

On the pro trial now. But will cancel if this is going to take too much of my time

1 Like

Tried again and again, compared content to the screenshots in the examples, nothing!

I have a widget, have a success notice from the update URL ({“success”:true,“code”:200,“response”:{“message”:“Success!”}})

Yet still my widget shows [[input0]] days to vacation

I think this is going to cost me waaaaay too much time and frustration.

tried the locked / unlocked one, really starting to doubt my abilities. This one also does not do a thing.

[waits 15 mins]…

Oh wait, yes, it switched to closed once I opened pushcut (not before )
Tried it several times now, and that one seems to only switch when I open pushcut.
Probably something with iOS, but a shame… Maybe I’ll add “open Pushcut app” to the automation to force a refresh

The vacation shortcut still does nothing… Will keep you all posted on developments in this personal “zen thinking with iOS” journey.

1 hour later:

I got the first one to work as well. Seems the shortcut did not pick up the first time I added the variable as list input.

Once I removed and recreated the shortcut it worked

Takes a bit of time, lots of moving parts but then it works.

A `widget` is just a container, a small, medium or large one.

A `content` is how you want to present the information you sent to the widget. You can present the same information in different style by defining a new `content` with a different layout or styling. Only one `content` can be shown at a time but you can switch between `contents` using Shortcuts or other integrations.

The initial layout is defined by the `Default Content` setting of the widget

The `Update Widget` shortcut action let you choose (1) which widget to update, (2) which `content` to show on the on the widget and (3) the `inputs` of the widget as a list

Similarly you can also update the widget using other integrations or `curl` by also passing the `widget` name (in the url), and the `content` and `inputs` as JSON data
curl -X POST \
  -d '{"content": "ContentTwo", "inputs": {"input0":"Time", "input1":"Just Now"}}' \
  -H "Content-Type: application/json" \
  https://api.pushcut.io/your-api-key/widgets/WidgetOne
Discovery: you can type custom names for the input variables. They won't show in the INPUTS list in the `Edit Content` screen but Pushcut processes them anyway. Not sure if this is intentional.

curl -X POST \
  -d '{"content": "ContentTwo", "inputs": {"label":"Time", "value":"Just Now"}}' \
  -H "Content-Type: application/json" \
  https://api.pushcut.io/your-api-key/widgets/WidgetOne

Other observations / requests:

  • Values for custom-named inputs still need to be sent in a list when using Shortcuts. You can’t use a dictionary to define the values.
  • You cannot re-arrange the components in a content. You’ll have to remove/re-add to change the layout.
  • Bug: The Save button doesn’t appear when deleting a component. You either need to edit a text component or add and delete another component.
  • Bug: Custom-named inputs do not appear on the INPUTS list.

Hope this at least helps for those who are looking to explore.

1 Like

The geekiness starts.

Below is a widget that shows the current CPU usage of my Macbook Pro.

I have an existing setup to forward metrics from my MBP to HomeAsssitant via MQTT.
I’ve added a NodeRed flow to push the CPU state to Pushcut using NodeRed.

2 Likes

I’m glad you got that far, to say the least. :slight_smile:

Last time I tried I found the inputs that PushCut accepts in triggers a little restrictive. As well as a wiki with examples I’d like the PushCut code to be more liberal in the URL / JSON forms it accepts.

(I’m sorry I don’t have a good current example of this except to say it was GitHub notifications that caused me to write a “rewriting proxy”.)

And, no, I’m not beating up on PushCut - which I actually think is tremendous.

1 Like

I’d like the PushCut code to be more liberal in the URL / JSON forms it accepts

Agree with this. I’m using Node-RED to do the payload rewriting but it would be great if Pushcut can handle the original input natively.

Wow, thanks for the excellent guide and the feedback @supermamon!

The bug with the save button is a known issue and should be fixed soon. Rearranging components and renaming inputs are also part of our roadmap and are both improvements that we think will greatly improve user experience with the widgets feature.

@JKoopmans, you’re right: it should be related to iOS. It is very strict on how apps can run code on the background and how frequently widgets can be updated, so unfortunately there’s no way for us to make it more instantaneous. You can find more information about this at the Widgets Support page and check the steps on the “Troubleshooting Widget Updates” section.

In our experience, being on Low Power Mode and not having enabled Background App Refresh for Pushcut are two of the most common things that can stop widgets from updating in the background in the minutes following up an update request.

1 Like

I’ve found I need to round-robin from the update into the pushcut app dor the widget to update reliably. So I’ve started to take ‘open app → pushcut’ in to all update shortcuts just to be safe.

1 Like

Following up on the re-writing proxy. If you or anyone visiting this thread are ever using Node-RED, this workflow would translate any input data into the format that a Pushcut widget understands.

After you’ve imported the workflow, take the URL provided by Pushcut

https://api.pushcut.io/Xrsjgal82nl384/widgets/WidgetOne?content=ContentOne

and replace it with
https://your-nodered-server/pushcut/Xrsjgal82nl384/widgets/WidgetOne?content=ContentOne

It will translate the data posted to that URL from something like

{
  "foo": "bar",
  "hello": "world",
  "lipsum" : {
     "lorem": "ipsum"
  }
}

into

{
  content: "ContentOne",
  inputs: {
    "foo": "bar",
    "hello": "world",
    "lipsum.lorem": "ipsum"
  }
}
1 Like

Thanks for this. It’s a similar sort of rewriting of URLs for GitHub Issue notifications. It’s not exotic, so some relatively light liberalisation of what PushCut accepts would cover both your case and mine.