Idea for openHAB iOS APP

The only “problem” is, that you can just use the shortcuts, when you are in your local network or connected through a vpn, but not when you are at the mobile net.

That’s no problem, that’s Security :wink:

2 Likes

I think this is a kind of a universal answer, if one has no solution for a problem :wink:

But exactly for the reason of Security, it would be really nice to use the iOS App with Siri Shortcuts!

You can access the Rest API from Mobile NET if you configure your access. It’s a matter of knowledge…

1 Like

An Native implementation in the iOS App would be use the same Way …
Native Implemention have the Benefit of easy Configuration …
The Way I show is Siri Shortcuts! Perhaps this way can be adapt to openhab Cloud … I can’t test it because I don’t use it :wink:

Try it like this:

https://username:password@www.myopenhab.org/rest/items/YOUR_OH_ITEM

The native iOS App use RestAPI …

You don’t see the difference between HomeKit and Siri Shortcuts

Yes this is possible … but I use VPN for more Security … forwarding the RestAPI to the Web is not akzeptable for me.

1 Like

This VPN Client support Siri Shortcut … if you add this to my Shortcut … than Siri work in Mobile Network via VPN automatically …

I shop the App and check my theory tonight :slight_smile:

If you can make it work on your LAN, you could use myopenhab.org when you are not in your lan. Just replace the hostname/up and port with myopenhab.org.

myopenhab.org proxies the OH REST API so anything you can do through http://openhabian:8080 can be done through https://myopenhab.org, after authentication.

The problem you may encounter is if Apple prevents you from using basic with in your links. They tend to be pretty hostile to basic auth.

Thanks, this was exactly what i was looking for - i didnt know, that openhab cloud could be used like this.

But to implement this directly to Siri Shortcuts would be Great for easier and fastet configuration!

I tried it out now, but it doesnt work. I think the problem is, that the email is used as username. at running the shortcut, i at first got the error message that the domail me.com (domain of my email adress) is not reachable. after i allowed the shortcut to connect to the internet, nothing happend after triggering the shortcut again.

You need to URL encode the @ of the email as %40.

thanks for that, but it still doenst work - even if i change the . to %2E, too.

A nice Szenario is NFC Tag & Shortcuts :slight_smile:
AppleWatch :sunglasses: (Only testet with iPhone … I have a Apple Watch Zero without Shortcut Support)

Here my Shortcut and the NFC Config in Screenshots:

https://www.icloud.com/shortcuts/664140ec8a3140369dfe877a895a9f31

2 Likes

Have a look at this post:

Created a little shortcut template that automatically asks you for your instance name and the item you want to switch when you first add it and than provides a simple on/off widget.
Maybe somebody finds it useful.
Johannes

1 Like

I got the shortcut added but I don’t understand what to do after it is added…
would you, could you add some screen shots to give me an example on what to put in all the spots? !!



You don’t have to fill in anything, when you add it from the link it asks you for your instance name and the item name. This gets saved into the Text fields that are used to set the variables.
If you need to change it afterwards you would only need to change those two text blocks at the beginning that are connected to set variable blocks.
Johannes

Is the iOS app open source? I am a developer and would be willing to try and make it work with shortcuts.

1 Like

Of course! You can find the code right here: https://github.com/openhab/openhab-ios

I have downloaded and am working on the design for shortcuts and custom intents.

Here is the design. Please let me know and changes/comments/suggestions.

Also let me know do I just commit to the development branch? How does the build and deploy work? I am testing it in the simulator. Do I sign up for the Beta?

ShortcutsDesign.pdf (248.7 KB)

1 Like