@pkropp (Pkropp) posted a new topic, subject "Create Android Widget (Button) to perform action on Hubitat". It read:

   Note: There may be better ways to do this, but this was my newbie way of getting something working.
    
    I searched and have not seen this so I thought I would post. There may be a better way to do this but this was logical for me. (Sorry if I missed some minor description. This was from memory once I had completed the button.) Andoid 10 on Pixel 3 fully updated as of 5/15/2020.
    
    I am a refugee from Wink and my primary use of Wink was time-based rules and widget buttons to perform tasks on my phone. The Hubitat app does not offer these so I did some tinkering. The first thing I wanted to do was push a button on my phone and lock my front door.
    
    Step 1:
    
    Create a IFTTT.com account
    
    Step 2:
    
    Add the IFTTT App and select what devices should integrate with IFTTT
    
    Step 3:
    
    Search Hubitat in IFTTT.com and Connect the Hubitat. This will prompt for Hubitat login, devices to integrate etc.
    
    Step 4:
    
    Download the IFTTT App on Android and login.
    
    Step 5:
    
    Make your own applets from scratch and add a new applet. Click + by first this. Click on Button Widget then Button Press. Click + by That. Search for Hubitat. Click the tile and select action and device to change.
    
    Step 6:
    
    Long press on your home screen and press widget. Find IFTTT and select the widget you prefer. I chose the 1x1 widget. Press and drag to the home screen. Select the action you defined above.
    
    You now have a button to perform an action similar to the way Wink would run a shortcut via button press. I have not worked on calling scenes or multi-device actions. There is a bit of a lag due to cloud aspect of this occuring.

So @Angus_M (Angus Marshall) replied

    Wouldn't Tasker or something like AutomateIt be better (using a widget to drive an html get command into Maker API on Hubitat)? It would avoid having to go via the IFTTT 3rd party service which can often be quite slow.

Then @pkropp (Pkropp) said

    Very Possibly. I am not familiar with tasker and have used IFTTT for some other basic server management tasks in the past. I may tinker with that as some point in the future. This was a quick and dirty way to make it work and it is no slower than the Wink used to respond, when it responded.
    
    Mainly I wanted to get something out there in case others had a similar use case and were looking for a quick solution to needing widgets.

After which, @pkropp (Pkropp) added

    I added a note to say there may be better ways to accomplish this. I have had my hubitat for less than 24 hours so I am definately still learning.

After which, @Angus_M (Angus Marshall) added

    No worries. If it works, it works!

@stephen_nutt (Stephen Nutt) replied

    pkropp:
    
    > I am not familiar with tasker
    
    First, Welcome to the Hubitat World.
    
    If you ever get the urge, take a joy71@example.com. It can do as @Angus_M described and probably quicker and more reliably than IFTTT. However, it is a paid app (i believe $4 currently) and there is a learning curve. However, doing what your describing with Tasker is probably not much more complicated than what you set up w/ IFTTT.
    
    If you do get curious, please ask. I am by no means a Tasker expert but I do use it in unison with Hubitat for a few things.

To which @cwwilson08 (Cwwilson08) replied

    Tasker can be used to create some pretty amazing integrations
    
    [PROJECT]LCARS - Android - Hubitat control Lounge
    
    > Hi everyone, I wanted to show my latest project. Utilizing several android apps / plugins / hubitat / HousePanel / rule machine / tasker / apps, I have created a very cool interface for my home automation on android. All the widgets shown are integrated right into the launcher - which is a very nice product all by itself. This is still very much a wip but I wanted to share so here is a small video. The app I used to record seems to have muddied thigns up a bit. Still lots of formatting to fix…

So @TMLeafs (Steven Dale) replied

    Anyone know a way to do this without IFTTT, using Maker API all we need is a android app than can make a widget using a url

To which @cwwilson08 (Cwwilson08) replied

    Tasker

@TMLeafs (Steven Dale) replied

    Seems a bit over the top for a simple task, used to use tasker years ago but just got annoyed with it
    
    Found what I was looking for https://play.google.com/store/apps/details?id=com.idlegandalf.httprequestwidget

Then @cwwilson08 (Cwwilson08) said

    Fair enough. I use tasker for lots of things so it makes sense for me. I used to have a pretty cool setup with widgets that updated based on state.

Then @jpage4500 (Jpage4500) said

    It's not ready yet but I should have widget support ready to try out in a few days. I'm going to start small - a 1x1 widget that represents a single Hubitat device. Clicking on it will toggle your device on/off. I'd like to be able to prompt the user in some cases - such as locking a door - in case of an accidental click.
    
    Also, because of the way Widgets work the icon state won't be able to be fully in sync with the device (ie: the widget might show the light as 'on' even when it's actually off). So, I'll have to figure out how to represent this best.. but, I'm open to suggestions too
    
    [RELEASE] Hubitat Dashboard - Android dashboard app Code Share
    
    > Just a preview of an upcoming version - widget support! [image] [image] [image] There's still plenty left to do and some logic to think though. For example, an app widget can update itself on a configurable basis - but it won't be realtime updates like the app can do while it's running. Meaning, if you turn off a light via a switch, the homescreen widget isn't going to reflect that state until it refreshes (or never if you don't want it to refresh). Because of that - when you click on a…

So @bobbyD (Hubitat Support) replied

    


{'source': 'discourse', 'url': 'https://community.hubitat.com/t/create-android-widget-button-to-perform-action-on-hubitat/40868', 'title': 'Create Android Widget (Button) to perform action on Hubitat', 'views': 2324, 'has_accepted_answer': False, 'word_count': 833, 'like_count': 5, 'reply_count': 6, 'participant_count': 6, 'posts': 13, 'tags': '', 'author': '@pkropp (Pkropp)', 'participants': '@pkropp (Pkropp), @Angus_M (Angus Marshall), @stephen_nutt (Stephen Nutt), @cwwilson08 (Cwwilson08), @TMLeafs (Steven Dale), @jpage4500 (Jpage4500), @bobbyD (Hubitat Support)', 'image_url': [None], 'created_at': '2020-05-15T17:53:18.311Z', 'last_posted_at': '2022-09-22T14:30:06.255Z'}