iWatch OpenHab app

is anyone developing an OH/OH2 app for an an iWatch?
I see there are opensource MQTT bridges between Apple Homekit and OH2. I don’t feel creating a dependency with vendor provided middleware (Homekit) is the most robust and vendor agnostic approach to talking to OH2.

IOS on iWatch needs to talk directly with the server running OH2 over wifi, not via HomeKit. Do others agree with the approach?
Or perhaps you think I should “invest” in a HomeKit hub and bridge it to OH2 via MQTT?

I’m an ~<intermediate coder for main stream platforms, but never developed for an iOS platform. Is anyone interested in forming a group to discuss how OH2 sitemap could be rendered on a iWatch and how this technically could be achieved?
I also don’t know if the Apple iWatch/iOS developer guidelines will permit the iWatch to communicate with an external service on non standard TCP port. Maybe it’s deemed a security risk?

On first glance, it appears a wrapper or browser type app would be best approach (the same approach as currently implemented on iOS Phone and iPad. Basically an empty shell of an app that takes a couple of configuration parameters:
OH server IP or DNS address (not sure how to do this when there is no keyboard on an iWatch)
OH Port number
User id and Password (if required)
On first launch, choose default sitemap.

When the iOS iWatch app opens it renders the sitemap in a format suitable to the small screen format.

Maybe the configuration gets done on the iPhone and gets synced to the iWatch shell application. This would mitigate the need for data entry on the iWatch interface.

happy to discuss.


You could just jump on the iOS app development and add a simple watch app. Shouldn’t be too hard, if I was doing it from scratch though i’d use mqtt so it’s more versatile.

This app basically allows you to design your own Apple Watch layout with buttons that interact with an HTTP (GET) server request. So there must be a way to get this working with OpenHab.
If you find out how, please let me know xD

If you have the homekit installed you can just use the native Apple Home app on the iwatch

True, but HomeKit bridge for OpenHAB is not what it should be. There is a PR from over a year old to add support for additional accessory type. Personally I’d love to add my shutters and harmony hub into HomeKit.
For the time being I think the iControl-Web is the best option there is, for accessories that cannot be controller through HomeKit. I’ll write a wiki tonight on how this can be used.
PS. There is no such thing as an iWatch :stuck_out_tongue_winking_eye:

Yes share your frustration on homekit binding, so solved the other accessory types this way Other homekit types through red-node

As painful as I find the homekit binding I like to stick to it because of the Siri (on phone and iwatch) :slight_smile:

1 Like

Using homekit on any IOS device to talk to OH2 is great. Functionally wise it does what it needs to do. i do use homekit from my watch to turn off lights etc. The issues experienced are performance (any IOS device) and switch/device limits in WatchOS…

Performance - homekit on any IOS device seems to frequently/randomly be in a state of “updating status” while it gets the current status of switches. This is further compounded by the need for homekit processes to go out to the internet and back into the on-premise homekit infrastructure to do anything, adding lag to the process.

This also creates a dependency on the internet connection being up and available. If the internet is down, then homekit is down.

WatchOS switch limit - the WatchOS integration with HomeKit seems to have a limit on how many switches/devices can be controlled from the Watch. The is likely a UI enhancement that could change the WatchOS UI to use “pages” or fit 4 buttons/switches per page, including the current scrolling method. Buttons/switches are nice and large on WatchOS, but perhaps needlessly so… if made smaller this would make better use of the available space.

The beauty of the native OH2 IOS app for iPhone and iPad is that it works locally (on the local LAN network) removing the dependency on the internet being available. It is this local integration I’d like to develop for the WatchOS.

  • removes dependency on the internet being up and available
  • reduced lag in device status updates (mqtt subscribe would be near instantaneous)
  • my private home automation remains private and does not need to be exposed to the internet.

** development **
Does anyone know if there is a MQTT pub/sub client or WatchOS development? this is likely a key starting point. This does however assume that most users do indeed have/use MQTT for driving item commands and statuses. Approach;

(1) User interface - extract the MQTT publish and subscribe statements from the sitemap and display each sitemap item with its current MQTT status. The label of the item on the watch could be the sitemap label. The icon shown on the watch OS could be driven by the sitemap item type. i.e.: switch would be shown as a two state button.

(2) Displaying current status of a item and showing updates on Watch OS buttons - for efficiency the watchOS icon state would possibly be best driven by MQTT subscriptions as I’m not sure how the watch OS would go querying Openhab for item statuses (?)

(3) Driving events from WatchOS would be the watch publishing MQTT commands. For example, I have switch items with commands ON OFF mapped to 1,0 that send MQTT commands and arduino subscribers receive and action the command. They respond by publishing the switch status via a status MQTT message 0 or 1. These could readily be published and received by WatchOS on the local LAN should a pub sub client for WatchOS exist.

WatchOS would have a dependency on accessing the sitemap to get a list of items to display on the Watch.

OH2 rules could process other behaviours triggered from the WatchOS.

Approach limits the dependency on OH2 UI and web requests.

i use workflow to call rest API of OH
the UI is not perfect but it get the job done
and there is allot of cool icons :slight_smile:

I’ve created a simple openhab watch:

It is currently in progress to be integrated with the official openhab iOS app.
Have a look here:

Feel free to contribute to improve it…



i tried the current testflight but as far as I can see, there is currently no Apple watch complication in it. Is it correct, or do I need to set it up by adding a different sitemap?