#iOS & Mac

1 messages · Page 1 of 1 (latest)

wispy perch
#

Chill chat about the development of the iOS Companion app and its related apps - including on macOS.

Please try to limit legitimate support issues to #1257019582112334014. 🙏

ruby shuttle
#

iOS & Mac

wispy perch
#

WOW rude. Hehe

austere horizon
#

Test

stable gulch
#

It worked Bruno 😄

austere horizon
#

Technology is awesome 😄

austere horizon
#

I tried to get the entitlement for NFC wallet passes buuuut. Nope, not approved.
On my explanation I aimed for explaining the use cases for home automation and things around it, but apparently isn't something they want to approve, perhaps to not compete with Apple HomeKey 🥲

languid lodge
#

Unable to disclose... That's... 😓

austere horizon
#

“We don’t want you to have” 😂

#

Now we create a new Apple dev account for Open Home Foundation and request the entitlement again saying we want to make meetups NFC passes

austere horizon
#

I added this fixed information on top of iOS github issues regarding remote connection, let me know your thoughts

https://github.com/home-assistant/iOS/issues/3575

I plan to move it to the docs as well, but having in github issues is a nice "last resource" for the user that goes directly to open a bug

GitHub

Supported Remote Connection Configurations (iOS App) The iOS app currently supports the following remote connection configurations: Home Assistant Cloud Exposing your local IP to the internet (e.g....

ruby shuttle
#

Hey guys, @woeful sierra and I were discussing and we want to add a new My Home Assistant link https://my.home-assistant.io/invite/#url=http://192.168.1.10:8123. Here is the idea: The page will show instructions to download the app, and a button to launch the app deep-linking to homeassistant://invite#url=http://192.168.1.10:8123. When the user already has the app installed, the My link will trigger the app instead of showing the website. The app should parse the URL and open onboarding with the passed in server selected.

What do you think?

ruby shuttle
twin patio
#

Is the idea that someone makes the link to send to someone to join, not as part of their own server setup? Probably fine to do it that way, just a little worried people will pick unstable IPs or something.

ruby shuttle
#

The goal is to lower the barrier for admins to invite their family and get them to configure the app

#

And this could also work with an external URL, so the person doesn't need to be at home.

twin patio
#

Probably safest with remote UI URL

ruby shuttle
#

In the future, we want to explore pre-authorized invite URLs

twin patio
#

reminds me of the desire for a “sign in with nabu casa” option

#

Nice that would be even smoother

#

I wish we could use the equivalent of DHT or something to give an identifier only and let the server help negotiate the connection with its innate internal/external but that might be needlessly complicated

ruby shuttle
twin patio
#

(Unless it’s different now) the forced url onboarding flow doesn’t really listen for separate URLs from the server

#

Only comment would be to make the ?Xx into #anchor instead so the my.server never sees it in logs if it happens

ruby shuttle
#

Oh interesting !

twin patio
#

Encrypting would be easy with a sodium secretbox. All the mobile apps have it already for e2ee so I think you can just start with it

ruby shuttle
#

Yeah I was thinking we could do some pin verification. You give someone a link and a 4 digit code

twin patio
#

Yeah. URL anchor tag is the encoded secret box and the pin is the key for it. Ezpz

ruby shuttle
#

But step 1 is just to get a link going for onboarding flow, then we have a base to enhance from 😄

ruby shuttle
twin patio
#

Hahaha

#

I miss free time

#

I get maybe 30-40 minutes of computer time after work a night these days. It’s not bad but not like it once was. I’m folding laundry right now for example.

ruby shuttle
#

For me it's limited to weekends.

#

Coding that is

twin patio
#

Ahh I think I’m a few years away from that

ruby shuttle
#

Still at Dropbox ?

twin patio
#

Weekends are basically entirely kids though I take a Saturday a month for RPG

#

Yeah. Though it’s tougher now than it was before

ruby shuttle
#

Oh no

austere horizon
#

Added to my backlog, this feature would be 💯

#

Another nice way of sharing servers is by creating a "HA app setup file" that iOS recognizes, then airdropping by putting one iPhone close to the other and booom magically HA opens in the secondary users phone directly into onboarding.

#

(Air dropping without proximity would also works, but that way is more magical for a blog post hahaha)

austere horizon
#

@twin patio @viral obsidian Do you have any idea why sometimes the icons in the app are not loaded for some users and replaced by a question mark in a square?

viral obsidian
#

Can’t say I do

austere horizon
#

It's so random, I was never able to reproduce myself but once in a while people send me bug reports and there I see the [ ? ] instead of the icons

viral obsidian
#

Might be time to open a TSI?

austere horizon
#

To Apple? It may be overkill, this looks like something around the way the render the material design icons. Btw, one stupid question, there is no reliance on internet for the icons right? It's just plain font file, right?

twin patio
#

Memory usage maybe?

#

The question mark implies it’s an invalid code point for the font

#

And yeah it’s just a font

austere horizon
#

Difficult to say, I couldn't find a pattern yet, and most of times if the user force closes the app and reopen the icon is there

#

Initially I thought that it could be something in SwiftUI trying to render the icon in some custom way, but then I also got reports of it happening in settings (which uses Eureka)

twin patio
#

It might be the load command isn’t working

#

Not sure if provides an error out of it though

austere horizon
#

You mean in the registration? I'm adding more logs in this PR https://github.com/home-assistant/iOS/pull/3616

The rest of the initializations are all force unwrapping the return so.. they should be crashing if that were the case I guess

untold basin
austere horizon
viral obsidian
#

@austere horizon would you accept a PR you couldn't test? I'm deploying Home Assistant into my office and using an iPad to control it. The iPad is enrolled in MDM which enables an accessibility feature called Autonomous Single App Mode that allows an app to lock the device to only opening itself (or unlock it later). But it's only testable with a device enrolled in MDM. I can implement it all myself and submit a PR but thought I'd ask first since its a sticky situation. https://developer.apple.com/documentation/UIKit/UIAccessibility/requestGuidedAccessSession(enabled:completionHandler:)

Apple Developer Documentation

Transitions the app to or from Single App mode asynchronously.

untold basin
#

It would actually be kind of cool to allow MDM configuration of the HA server

austere horizon
#

@viral obsidian oh nice, so a guided access on-demand! Can you provide me a screen recording, or even before that, any draft of how you image the feature?

#

At a first glance I don’t see why not to approve, but I want to be sure we won’t be introducing something difficult to maintain

viral obsidian
untold basin
#

Imagine if you could use MDM to push AppConfig that automatically authenticates the app against HA and could lock it to specific Lovelace dashboards. Having a switch in HA for ASAM would be great then.

austere horizon
austere horizon
#

Anyone watching platforms state of the union?
Xcode integration with AI looks very promising, even better than the copilot implementation

austere horizon
#

I’m so happy we will be able to bring widgets to CarPlay as well, the CarPlay “app” UI is so restricted that makes more sense investing on widgets depending on how they will be visible in the car

untold basin
#

I’m just catching up on it now as my Mac updates

twin patio
#

Push for widgets was an item right?

#

Getting people an automation for pushes is gonna be tough. Might need to be part of the mobile_app component

untold basin
untold basin
austere horizon
#

@twin patio Not sure I saw this yet.. you mean the same as exists for control center? Which I was btw thinking indeed of saving the push tokens in mobile_app for lack of better place

#

@untold basin Hows the beta? Stable? On ipad it's quite bad

austere horizon
untold basin
twin patio
untold basin
#

Was just playing around with Icon Composer and made a Liquid Glass icon for Home Assistant

#

The new icon format is just an archive of the layers along with a JSON:

{
  "fill" : {
    "automatic-gradient" : "extended-srgb:0.00000,0.47843,1.00000,1.00000"
  },
  "groups" : [
    {
      "blur-material" : null,
      "layers" : [
        {
          "blend-mode-specializations" : [
            {
              "appearance" : "dark",
              "value" : "normal"
            }
          ],
          "fill-specializations" : [
            {
              "appearance" : "dark",
              "value" : "automatic"
            }
          ],
          "image-name" : "home-assistant-logomark-monochrome-on-dark.svg",
          "name" : "home-assistant-logomark-monochrome-on-dark",
          "position-specializations" : [
            {
              "value" : {
                "scale" : 2.75,
                "translation-in-points" : [
                  0,
                  -30
                ]
              }
            },
            {
              "idiom" : "watchOS",
              "value" : {
                "scale" : 2.75,
                "translation-in-points" : [
                  0,
                  -70
                ]
              }
            }
          ]
        }
      ],
      "lighting" : "individual",
      "shadow" : {
        "kind" : "neutral",
        "opacity" : 0.5
      },
      "specular" : true,
      "translucency" : {
        "enabled" : true,
        "value" : 0.5
      }
    }
  ],
  "supported-platforms" : {
    "circles" : [
      "watchOS"
    ],
    "squares" : "shared"
  }
}
austere horizon
#

Im working with Timo to put live activities on our backlog hopefully for this year @twin patio but for now we are trying to prioritize the essential pain points nowdays such as onboarding and error handling, to make it all veeeery easy for the secondary user, as well as "invitations" that the admin user can send to it's family, it will look pretty nice, now it is just about time haha
Feel free to jump in if you have ideas or time to implement smaller stuff, it would be very welcome!

#

@untold basin Nice! that was the first thing I asked OHF designer to do as well haha, apparently the tool is quite simple, I didnt play with it yet

#

@viral obsidian Do you need help with what you were working on?

viral obsidian
#

Nah mines easy. Thanks though.

viral obsidian
#

HA iOS on the iPad mini embedded in the wall with a SimpliDock

#

controls all of our lobby now, projector, apple tv, hdbaset switcher, projector screen, speakers in the ceiling, music throughout the office

twin patio
#

Nice office! Been a while since I worked at a dog office

austere horizon
#

Looking good! 🤩

#

@viral obsidian do you use that “guided access” hack to keep the app in kiosk mode?

#

I made one hybrid dashboard in a native app, using the webrtc stream for my doorbell + HA on the floating panel

austere horizon
#

Does anyone know if installing the iOS or iPad version of the app on a mac throught testflight has any difference? They look the same to me.

#

Asking because the iPad version testflight is refusing the complete the installation 🥲

#

I guess both are mac catalyst so... should be the same right?

twin patio
#

iPad version won’t be Catalyst no - it’s actually a different binary target.

austere horizon
#

But when it reaches the App Store the user does not have the option anymore to choose iPad build, does it?

twin patio
#

Correct. Once you do a macOS variant the App Store offers that instead of an iPad-on-macOS version

austere horizon
#

People, question.. So everytime I setup the HA app on one of my devices it gets added to "my devices" under my "Person" in HA, this causes for location tracking to behave a bit weird. Was this expected?

Like if 2 iPhones track my location, both need to be out of Home so my "Person" is considered away, and what is worse is that if one devices leaves home, person.bruno will become "away", but when the other device that is at home reports location person.bruno becomes home again.

I know you can simply remove the device from under the Person config, but should we add them by default when onboarding?

#

My concern is because we support mac and iPads so.. what I described above could happen

twin patio
#

I feel like not doing it would be just as confusing too. Imagine you get a new phone and you don’t delete the old integration.

austere horizon
#

In theory the new phone would take advantage of it directly if the user migrated the data right?

But I get your point, perhaps the solution is to just make this more visible. I wonder if there is an API to fetch the devices linked to the user

twin patio
#

I believe you can see it. Not sure a non admin could edit their own but maybe mobile_app could offer an API to help.

austere horizon
#

Worst case I can just add a shortcut next to the "Location" settings in companion app settings that open the "people" panel in the webview itself

#

Just so when people are troubleshooting what they are missing, they have options nearby the companion app settings as well

lethal atlas
#

i feel like for mobile_app we are very unique here compared to other integrations. You change your phone often and what you do with that device varies every time as well. You may trade it in or hand it down to someone else or just repurpose the device and want to stay logged in

#

A replace option during onboarding may be a good option for some use cases but in others a user may want to separate the registration completely. Really depends on what they plan on doing with the old device

#

unlike another smart home device like say a smart light or contact sensor who you really only replace when its dead

austere horizon
lethal atlas
#

the more informative the better, i dont think many users understand how often devices get added there. a nice reminder about upgrading devices and logging into wall mounted tablets may be helpful as a reminder 🙂

#

surprisingly the docs dont mention this behavior on the linked page 🙈

austere horizon
#

We are redesigning onboarding, so.. perhaps a good timin

austere horizon
#

Asking without hope of having a different answer... but there is nothing new Apple-wise related to get the SSID from the user right? We still need the location permission?

twin patio
#

There’s a new API to read it this year but I don’t think the permission requirement changes since SSID/BSSID can still uniquely identify your location

#

Iirc that’s one of the things we need to reach into the Mac bundle plugin for so it could clean up that code path on 26

austere horizon
#

Another-new-API? I replaced it in the beginning of the year 😂

#

NEHotspotNetwork.fetchCurrent

austere horizon
#

@twin patio when you have some time can you point me out the connection retry logic in HAKit, I’m a bit confused how it’s working. Or perhaps there is also retry logic in the main app that is causing some trouble.

There are some dead states in the app where it tries to reconnect too often and too fast.

twin patio
#

Ahh my recollection is that it reconnects asap basically. But there’s logic to detect a stale connection and restart it to work around a bug in like iOS 16+ or something

#

It automatically connects based on whether there’s subscriptions or a request gets sent and if it closes it reconnects

austere horizon
#

Hmm so this probably means that it will always try to reconnect because the app will have at least one subscription that is the one we start for model manager when app open (to sync zones etc)

#

What’s the ideal way to permanent close a connection?

austere horizon
twin patio
#

I think always reconnecting is reasonable for our app since the webview is gonna do it too. A world I wanted to think about was making the webview use the app’s websocket connection

austere horizon
#

To me the problem is that the retry logic has no waiting, so if the user opens the app and for some reason their instance is down if retries like crazy hahaha, and in some case (somehow) this also happens in background, although I dont know how to reproduce consistently.

Also (but thats just a hunch), in macOS this is more critical cause it's background usage has less limits compared to iOS

#

I changed most of the entity states sync logic from the app to not subscribe for state changes, I cache the entities basic info and then request on demand (like when loading a widget).
In CarPlay it still subscribe for states change because we are displaying several entities in realtime and user expects live updates. But no where else in the app this is needed.
(Only exception I left for now is zones, because to change the logic in place I'd need to change a bit Realm and I want to do that when I move things to GRDB)

#

Long story short: Most of time we dont need live state changes in the app

twin patio
#

Didn’t I make it do a back off on reconnecting?

austere horizon
#

I’m not sure, do you know which PR was that?

twin patio
#

All the reconnect logic is in there

austere horizon
#

@twin patio Just so I don't mess it up, I am updating the macOS "Developer App ID" that will expire in the end of the month, in Github we follow the same logic as for the mac installer right?
I mean...

Key is the password from keychain access
Value is the base64 from the p12 file

austere horizon
#

Based on this I guess I also need to keep the expired certificate there as well, right?

twin patio
#

Correct that’s the logic

#

No not the installer. That’s a separate identity though.

#

I think the installer is App Store and developer of is another one? I hate the naming but one thing you can do is to save the existing one out to disk and open it to see what’s in it

#

They’re also in 1P I think

austere horizon
#

Yeah so the installer is the one that expires every year (or 2 maybe) and is used for App Store, the Developer ID Application is the one for people installing directly from github.

This morning I tried using a new certificate, moved all provisioning profiles to point to this new certificate but in the CI it was still accusing that those provisioning profiles were not available for the given certificate, so I rollback to what was in 1password.

#

I'll wait until the current one expires just to avoid mistakes

viral obsidian
#

hey @austere horizon and @twin patio what are yalls latest thoughts on live activities

#

i'm using HA more and more for running my Bambu Lab 3D Printer and am thinking about making HA iOS support live activities for print status updates

#
GitHub

Hello, May I suggest adding support for the new iOS 16 feature of Live Activity widget? This can be designed to be attached to a list of entities and will show their state or selected attribute. In...

GitHub

Describe the feature Introduced way back in iOS 16, it would be great if support for Live Activities could be implemented for the iOS app. As discussed here, there is a clear demand for it with it ...

ruby shuttle
#

I want that!

ruby shuttle
#

I think it has been discussed in the past, we want it, but it wasn't a priority

#

I would love to be able to pin any sensor with device class TIMESTAMP and it should count down to when it's done

#

3D printers, laundry, etc 👌

#

It would require some external bus additions.

  • Frontend to iOS: get_actions_for_entity(entity_id). Response: list of actions, ["pin"]
  • Frontend to iOS: do_action("pin", entity_id)

Frontend can show the action in the overflow menu on the more info dialog.

twin patio
#

Live activities require extensive notifications. They can’t do their own network access nor update themselves

ruby shuttle
#

and the external config should include a boolean supportsEntityActions: bool

twin patio
#

So doable but mobile_app would need to do a lot more to watch it

ruby shuttle
#

for timestamp device class, we would need to let iOS know about state changes. There are no actions involved

#

A subscribe_entity_notifications webhook

viral obsidian
#

Is it still just VOIP that has the special near real time APNS server or do live activities go through that too

#

Although we could do local updates

#

Much to think about. Also if there’s any other “templates” other than countdowns to offer. We have to design every template in SwiftUI so it’s a lot less customizable than our current notifs

#

I think a generic countdown, a laundry countdown with like cycle name and a 3D printer countdown with image of print, name of print, layers remaining and build stage could be good

twin patio
#

Live activities use PushKit too - they have 2 tokens - but I believe FCM was updated for it. But yeah the current status quo is kinda bad for that since the server parses so much before sending to the client.

austere horizon
#

The "quick and dirty" approach to have it done is to use the mobile_app integration to store tokens, then create a custom notification message + token field to send info through notify service, and update firebase to send the proper notification.

On the app side, implement the UI's wanted depending on the use case and the logic to sync the tokens.

#

(On top of what @ruby shuttle described if you want to start a live activity from the frontend)

#

One way of avoiding mobile_app to store the token (when live activity is started via notify service) is to the app send an event to HA with the token on it, then users can listen for this event and handle the token however they want.

But thats going deep on the quick and dirty approach hahaha

austere horizon
#

@twin patio Hey man, I need a second pair of eyes... The Mac Dev ID certificate expired a while ago and I have created a new one, updated provisioning profiles to point to it, exported the .p12, updated the key and value in github action secrets. But I always get error: Provisioning profile "Mac Dev ID - [Target]" doesn't include signing certificate "Developer ID Application: Nabu Casa, Inc (...)" in the CI

On my machine in xcode I was having the same issues until I tapped "Download manual profiles", but in the CI as far as I can remember, each build cleans it's keychain right? Any idea if I can force some pull somehow or something I may be missing?

austere horizon
#

Ok now the same is happening to iOS (expired today), I think somehow it's not using fresh profiles downloaded an instead using something old, because in the logs still says the profile expired today, even though in App Store connect it says they are renewed (expiring next year)

ruby shuttle
austere horizon
#

Yes, fix has already reached App Store and testflight, probably you need to update

#

The issue was the tap area, if you tap the text it works

austere horizon
# austere horizon <@204349071132065792> Hey man, I need a second pair of eyes... The Mac Dev ID ce...

Ok issue partially resolved, it was indeed missing the "download_provisioning_profiles" call, no clue how it was working before, since I had to tweak it to make it work https://github.com/home-assistant/iOS/pull/3849

But still the certificates I added to secrets are not matching to the profiles somehow and outputing /Users/runner/work/iOS/iOS/HomeAssistant.xcodeproj: error: No signing certificate "iOS Distribution" found: No "iOS Distribution" signing certificate matching team ID "QMQYCKL255" with a private key was found. (in target '<each target>' from project 'HomeAssistant')

#

Whatever is in github secrets was at least imported correctly

austere horizon
#

Exported the certificate for the fourth time and now it succeeded…. No clue what changed, the only thing different I did was to use a less complex password while exporting 🤦🏻‍♂️

austere horizon
#

Gosh.. I think I finally found what was the non sense, no matter which certificate I tried to export from my keychain, it always exported the Mac installer 🤯
Now I’m nuking everything to try to make it work

twin patio
#

I missed your earlier messages and thought you had resolved it, but let me know if you want me to try and do the certificate of regeneration. I can probably have time tomorrow.

austere horizon
#

😭 Finally!

#

Now using single "Apple Distribution" cert for both, mac and iOS

austere horizon
#

Hey folks, Timo and I have been working on a new onboarding for the Apps, before I make a public beta would you mind giving it a try? @twin patio @viral obsidian It's in the internal testflight builds right now

twin patio
austere horizon
#

Manual URL should try https or http manually. Or at least ask if there’s a scheme missing rather than error.
Oh this one is being hidden by the keyboard then, there are http and https suggestions below the text field, good catch

#

Thanks for checking

twin patio
#

When a device name always exists and I delete it on another device it still thinks it’s there

#

Restarting onboarding correctly sees it’s available

austere horizon
#

You mean delete in the mobile_app integration list?

twin patio
#

Yeah

austere horizon
#

hmm ok, gonna check that

twin patio
#

I didn’t get prompted for motion or focus permission at all. Is it intended users go to sensors to turn those on?

austere horizon
#

Yup, the goal was to keep onboarding simpler and straightforward. Also to explain that annoying situation that we need the location permission to access local IP in a safer way

#

Later more changes around sensors visibility would come

twin patio
#

You might have trouble with Apple reviewer for that because the settings screen allows “escape” from the permission part.

#

Generally the rule is if any buttons in the UI prompt for a privacy permission, you can’t escape the screen without being prompted for it.

#

(It’s possible a reviewer won’t care. It’s possible they will. In general I’ve seen this rule applied strictly everywhere.)

austere horizon
#

Good point, but nowadays I see it in so many apps that I don't think it will be a big deal, but yeah, I guess it will depend who reviews it, changing it later is easier though.

twin patio
#

It might just mean you need the permission rows to be “learn more” and open a modal that is the unavoidable preprompt

austere horizon
#

Oh you mean the sensor settings screen , got it

twin patio
#

Yup exactly

viral obsidian
#

@austere horizon just submitted a bug via testflight. got a HA crash notification as soon as I unlocked my phone after updating to 26.1

viral obsidian
austere horizon
twin patio
#

The idea makes sense. It would maybe make sense to set a maximum Date (like URLRequest) more than start/duration. if you’re going to do duration then I recommend Measurement<UnitDuration> instead as API

austere horizon
faint marsh
#

Okay everyone, clearly I am new here. I’ve been informed (mostly by claude) that while BLE presence detection it the Companion App is available on android, it’s not available on iOS, which given my understanding of the way it is typically implemented makes sense why it’s not possible for iOS. But, I’ve been mulling around some ideas… would love to do the work to implement it in the companion app, but I have quite a bit on my plate, so before I get neck deep into prototyping it, I’d love some insight and discussion about any unknown history/concerns with app submission related to Bluetooth permissions that would stifle what I otherwise believe is 100% within App Store approval rules and the technical guard rails of CoreBluetooth.
Brief background - while not much in the last 3 years, I have over a decade of experience with core Bluetooth and 17 years with iOS development.

twin patio
#

To do background Bluetooth you generally need to have the service already declared and known. If you can figure out how to do that, it would be acceptable. It’s no harder to get Apple to review than any other weird feature.

#

Probably a YouTube video demonstrating it with a device would be required would be the only complexity.

faint marsh
austere horizon
austere horizon
twin patio
#

I’m guessing this is happening because the app is allowing the reconnect (when asked for URL lazily) rather than disallowing it, which is what I intended. So this looks good, but I would probably consider a state for this rather than another variable. Like disconnected could either know about it or add a “rejected” state.

faint marsh
# austere horizon I used to do that using this https://espresense.com/

How reliable was that. I didn't realize this IRK enrollment was a thing. I need to learn more, but I can see where that might be a problem for my use case, which is most for the device "time out" area. Kids don't get devices all night, so they have to put them in the charging cabinet. If the screen off means no beacon then that kills it.

austere horizon
novel fjord
# faint marsh How reliable was that. I didn't realize this IRK enrollment was a thing. I need ...

If you use the Private Bluetooth Device integration in core you can track home/away status for iOS (and other) devices via BLE once you've gathered their IRK. If you want room-based location you can add Bermuda (full disclosure: it's my project) which will tell you essentially which bluetooth proxy it is closest to. Bluetooth proxies are esphome devices or Shelly Gen2+, for the most part. It does most of what espresense does, but each has a particular approach.
The most recent iOS versions seem to be even more power-conscious with suspending BLE advertising at various times, but this seems to vary a lot. My personal suspicion is that if there is an app that registers an iBeacon advert, then the device will keep broadcasting when asleep, but in the iOS "advert overflow area" which is a single packet where all advert ids get hashed together. This would still work perfectly well for systems tracking via IRK, because any packet being broadcast will be from a resolvable BLE MAC address.
I don't have any recent iOS devices so I can't prove this myself - all our older iOS devices track reliably and consistently - as far as BLE rssi-based tracking can be, anyway.

austere horizon
twin patio
faint marsh
# novel fjord If you use the `Private Bluetooth Device` integration in core you can track home...

I will check that out. The approach I am planning on taking would end up flipping the paradigm on it's head a bit, but essentially what that would mean is that you can specifically ask the centralManager to watch for, and wake up the app when the proximity device is connectable, which is, in my experience, which is admittedly now 5+ years stale, was basically 100% reliable.

A few years back, I built a device that was specifically set up in this way, and it would go into deep sleep most of the time and every minute or so it would wake up for about five seconds and let the iOS app know that it was there and then if the iOS app has something for it to do, it would send a message back really quick saying Yep, you have something to do.

novel fjord
# faint marsh I will check that out. The approach I am planning on taking would end up flippin...

If I'm understanding you correctly and you want to put the majority of the work natively in iOS and have an app that gets woken up whenever a given pre-known iBeacon is seen, I think that still works. The info you'll need is probably mostly covered by https://davidgyoungtech.com/2020/05/07/hacking-the-overflow-area

This will be more work i think than using the stuff that already works (passively monitoring via IRK), but should be possible.

twin patio
austere horizon
#

Good catch, I think you are right, let me test

twin patio
#

I am reviewing on my phone so it can sometimes be hard to get context 🫨

austere horizon
austere horizon
austere horizon
sonic cairn
austere horizon
sonic cairn
twin patio
#

An alternative might be getting HA to somehow offer dual HTTP/HTTPs on 8123 and allowing the self-signed cert for HTTPS to be trusted in the app automatically. Then there'd never need to be HTTP-only.

austere horizon
austere horizon
twin patio
#

In theory both the REST and WebSocket APIs could be secured using the same encryption the webhook uses, but that's probably an annoying amount of work.

austere horizon
sonic cairn
#

Ah right, it seems you guys are quite limited to what you can implement at the moment.

Since it’s a companion app, trusted devices would be great addition, so authenticate once and it carries on all other devices.

Hopefully, something can be done soon, and thank you for your work!

austere horizon
#

The long story short is:
at some point the desired setup is to have self signed certificates, so we needed a short term solution and after a lot of debate, the current flow won, all other options required excessive amount of work that would be replaced by self signed certificates anyways.

austere horizon
#

@twin patio before I dive in, do you remember why BSSID configuration was implemented just for macOS, isn’t iOS able to provide that info as well?

twin patio
#

For local vs remote right?

#

My reasoning for that was the Ethernet device may change based on whether you’re docked and that was a good signal if you were home or not

austere horizon
#

you're right, no clue where I read BSSID then, I could swear I saw it in the mac app. anyway, thanks

twin patio
#

It’s definitely a sensor

#

I just don’t recall any requests for it for home vs away detection

austere horizon
#

ohhhh, thats it!

austere horizon
#

If anyone is looking for a weekend project for the iOS App, some refactor/redo of the watch complications would be awesome.

Moving the database to GRDB and making the UI simpler to create, like just picking an entity instead of templating.

I can help out of course ❤️

austere horizon
austere horizon
#

Happy holidays for you all! Thanks for the collaboration during this year 🎄🎅🏻

twin patio
#

Ambitious! I think it would make the app easier. I also think it’s going to be a monumental amount of work to try and match dashboard functionality!

austere horizon
#

Indeed! But what I have in mind is not to build a replacement for the web UI, instead, an optional simplified UI for the average user that nowadays prefer to just use Apple Home. It wouldn’t have all cards, just basic ones and expanding slowly with time.

Giving choice to the user between most customizable and basic native UI, specially for the secondary user, allowing them to manage their own app as “admins”

twin patio
#

I bet it would be possible to map the tile cards (is that the name of the recent mushroom like ones?) to SwiftUI views using the same model info

austere horizon
#

💯

ruby shuttle
#

I'm impressed it's only 1000 lines of code

austere horizon
#

The thing is that a lot already exists in the App for CarPlay, Widgets etc so… it “just” needs a little bit more UI code now 😅

austere horizon
#

@ruby shuttle I saw you opened a PR for kiosk mode, do you have anything in mind for that to be used by the App? I saw you mentioned wall tablets

ruby shuttle
#

Yeah some hidden gesture to enable and disable

#

With password to disable?

#

Meant for usage in the wall

twin patio
#

One thing Nabu Casa could offer is MDM that allows the app to put itself into single app / guided access / kiosk mode, which could be useful for that too. Big project probably though.

#

Consumer MDM is very rare to find so I imagine most users don’t realize they can make a wall iPad a lot easier for themselves.

ruby shuttle
#

What is MDM and why would it be a nabu Casa thing and not an app thing?

twin patio
#

It’s a system wide profile requiring server software to communicate with it. Basically it’s part configuration push, part device management (wipe, location, etc.), and part blessing of functionality to a third party. So it must run remotely but could be configured locally in the app to vend and install the profile.

#

Some app features like being able to turn on guided access / single app mode require an MDM profile to enable it. Basically to protect from malicious apps not administering the device. It’s dumb.

austere horizon
#

Thats a good idea, but I think before trying something like it we need to figure it out how to move the App to the Open Home Foundation Developer account... which is something pending right now and would make it worse to have to migrate MDM as well

twin patio
#

Heh second migration. First was off Robbie’s personal account. You might be better off changing owners rather than transferring

austere horizon
#

It won’t work :/ someone in the company already tried to just change the legal entity but it didn’t work out (something regarding being a .org now, idk), then they made a new account, also because of Music Assistant that is expected to release an app at some point as well

twin patio
#

Ahh I hope it doesn’t cause a keychain reset

#

That would be really annoying

#

Maybe do a prep release first to persist tokens on disk encrypted

austere horizon
#

Yeah, that’s what I had in mind as well, because the keychain reset is still a reality 🥲

austere horizon
#

It does install on my watch without any issues but I’m not sure if in App Store it could be a problem

twin patio
#

The old arch was arm32_64 iirc right?

#

I think with app thinning it shouldn't impact the AS size, but maybe the included plugin isn't thinned since it might need to work on any device?

austere horizon
#

I am not sure, but I notice the build that I generated from this PR has the "install watch app" gray out, even though it installed, but thats already a sign that I may need to tweak it

#

@twin patio do you remember how did you find about the limit before? like.. was it denied uploading to App Store or the App just does not install?

twin patio
#

Can you remind me when/why I did it?

#

I think having the arch broke like.. a series 3 watch??

#

Am I remembering this right?

austere horizon
#

I havent check your PR, the only comment in there was to keep the watch app size smaller than 75mb

#

let me see if I find your PR

#

Apparently you were getting the warnign right away when submiting the app, I did not get this "ITMS-90389: Size Limit Exceeded", which could be good news

twin patio
#

Ah. Yeah sounds like they fixed it

pearl forum
viral obsidian
#

having a full on nabu mdm is probably a bit much though. although zoom did it, so not the craziest idea

sweet gate
austere horizon
austere horizon
#

@twin patio or @viral obsidian Can one of you also open a feature request for the MDM-like experience using the link above? Just so we don't lose track, it won't happen now but I think it's nice to have it sometime or ifsomeone has time

#

And unrelated to that, has anyone worked with WebRTC in iOS before? I am using this https://github.com/stasel/WebRTC.git to play camera streams but not sure it is the best one I could be using, let me know

sonic cairn
#

Regarding the new secure settings, I’m not understanding why it works the way it does.

Say for example, my Internet goes down, but I’m still connected to WiFi, the iOS app fails to fallback to the ‘Internal URL’.

I have to do 2 things to connect locally:

  • Delete the ‘External URL’
  • Switch to ‘Less Secure’

Otherwise, in wont load my dashboard as it’s constantly using ‘External URL.

Unless this is a bug, this is a very flawed concept and needs addressing.

austere horizon
#

To know you are on your wifi you need to give the app location access + define your SSID in Companion App Settings > Your server name > Internal URL

sonic cairn
austere horizon
#

Apple requirement

#

You still can't access your internal URL?

sonic cairn
#

I can access it only when I do the steps mentioned above. SSID is also a Apple requirement?

twin patio
#

Reading the SSID/BSSID is a proxy for location, a very good one in fact. Make sure you have 'precise' location enabled too. The edit connection will show you a warning if you don't have the right things.

sonic cairn
# twin patio Reading the SSID/BSSID is a proxy for location, a very good one in fact. Make su...

Okay, I get the technicalities, but as user it’s cumbersome having to manually define SSID. Not a great experience really. Why can’t the app automatically detect it, or have the option to select it from a dropdown?

The ‘precise location’ seems to have fixed this issue, thanks. But, one should consider that not everyone is comfortable in having it enable. Also, there was no mention in the splash screens that it was required, or that it was disabled in fact, This leads users being oblivious

austere horizon
#

Those considerations and several others were already taken into account.
For the long run this will be gone and a layer of full protection will be introduced, such as (but not necessarily) to have client certificates authenticating your server

sonic cairn
twin patio
#

When you are editing the SSID entry field, it prepopulates with the current one if it can access it. You would not have to type it manually.

sonic cairn
austere horizon
#

“Shouldn’t” is a strong word, there are challenges involved, that’s the short term solution and we are providing help as we can.
But it’s open source, so you can provide your own solution as well then we have it faster into production 😁

austere horizon
twin patio
#

I moved to just using the Home dashboard exclusively so that looks great to me

#

You might be able to embed a webview in for the more info version rather than trying to reproduce all the functionality too

austere horizon
#

Indeed! I plan to display WebView for some specific parts like entity settings inside the more info dialog, but for the more info itself I am building natively as well, I think it will make a great difference in the final result, AI is helping a lot also to give a base and then I take from there

#

That’s how it looks now for lights and then when you tap the gear icon

twin patio
#

Nice, looks really integrated. A sheet would be so much easier than the current UX

#

I always planned on trying to intercept the more info call in the webview and make a native sheet out of it

austere horizon
#

Bram and I were also thinking about it a few months ago, we thought about using 1 WebView only and then moving it around to the presentation we wanted, giving the impression that it is native while still being the same WebView but transitioned inside a sheet, but I never had time to make it work properly

twin patio
#

Ah that makes sense, take a snapshot and put that in the background while more info shows

#

I think WKWebView gained support for attached secondary windows too

austere horizon
#

Niiice, gonna look into that

austere horizon
#

FYI, I removed the Cameras list screen and it wont be available on the next testflight build due to alignment needed with the rest of Home Assistant roadmap. Developers can still access it while debugging.

(image for reference)

twin patio
#

The HAKit PR to add mTLS support.. I feel like codifying the use of Starscream in the public API is kind of limiting, it means it's gonna be harder to get off of it. I wonder if it can be done similar to how I did certificate trusting where we outsource to a helper block.

austere horizon
austere horizon
austere horizon
#

Fixed ✅

untold basin
#

iOS 26.4 added support for “Voice-based conversational apps” in CarPlay

austere horizon
austere horizon