-
Notifications
You must be signed in to change notification settings - Fork 2.7k
WIP: Remora Companion App for Remote Control #4140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
Love it. Is it one firebase project per AAPS or one project for each follower? |
Thanks for your endorsement! It uses a single Firebase project per instance of AndroidAPS, which is shared across all followers. However, you only need to configure AndroidAPS. Followers are configured using the pairing data they receive from the main phone. Right now, that's a rather long base 64 encoded string, which must be copied to the follower phone by the user upon pairing (WhatsApp, Email, Quickshare, Google Notes, whatever works). QR Code support is on the roadmap, but doesn't have priority at this time. |
|
if possible i'd vote for not adding another app. To make the use easy, the control should be integrated to AAPS (even via shared lib) Right now we have these options: What is missing is direct communication between main and client app (NS independent) which I believe is what you are trying to achieve. That's why I'm not voting for another man in the middle. Ideal would be just QR scan done by AAPS client or another app which should exchange keys etc .... Anyway .... good move 👍 |
|
My 2ct: |
I can absolutely see the appeal of having everything integrated directly into AAPS, and in the long run that would indeed be the ideal direction. For now, however, I decided to build Remora as a separate companion app, mainly because of the different architectural and security requirements compared to AndroidAPS itself. Why not build directly into AAPS?The key question is: how do we securely move information from one phone to another? Nightscout + SMS (current approach):Nightscout is self-hosted and can be fragile from a security perspective (weak passwords, missing updates, lack of enforced TLS, etc.). Its API works by pushing/pulling individual records without a guaranteed delivery mechanism. There is no way to ensure completeness of data, which makes it vulnerable to selective denial-of-service. It also does not reliably wake devices. FCM + Firestore (Remora’s approach):Remora transmits an encrypted bundle of the last 24 hours of data in one block. This guarantees consistency (either all or nothing) and prevents manipulation along the way. Any cloud service is treated as untrusted: everything is end-to-end encrypted, with keys stored in the Android Keystore. The app never uses passwords; instead, it relies on the phone’s unlock mechanism and the physical “ownership” of the device as the trust anchor. Architectural rationaleRemora is deliberately lightweight:
User impact
Future opportunities
|
|
Looks like interesting project... When I have little time I will try it out... But if its based on Android/Firebase... How could IPhone app connect to it? |
|
@andyrozman https://firebase.google.com/docs/ios/setup - but I guess we'd need someone that actually knows 2ct about iOS development to verify ;) |
Firebase is able to send push notifications to iOS devices by relaying through APNS (Apple Push Notification service). A brief look at the reference documentation also suggests that it is able to dynamically configure the FirebaseApp instance at runtime, which is what I use to load the user's Firebase API keys without baking them into the app. This is also just needed for receiving messages as that requires some special handling (waking up the device, launching the app etc.), whereas for sending messages, a REST API is used. APNS restricts the payload size to 4KB - just like on Android. Firestore is also available via the Firebase SDK for iOS - and much less of a problem as it's just a websocket or something similiar to my understanding. |
|
Here's a screen capture that showcases a bolus delivery using Remora: https://drive.google.com/file/d/1SqARfdtKxih6ZZwEMuICc9fogB9pd9Wi/view?usp=sharing |
|



This pull request introduces an experimental companion app for secure, app-based remote control of AndroidAPS, intended as a more user-friendly and secure alternative to the current SMS Communicator (primarily used by caregivers of children with diabetes).
Motivation
Cryptography (current WIP design)
Architecture
Remora consists of three components:
Both the companion app and the library can be found in this repository: https://github.com/TebbeUbben/Remora
Remora utilizes a modern Android development stack based on Jetpack Compose, Kotlin, Coroutines, Room, Dagger etc. To keep message payloads small, the communication relies almost entirely on Protocol Buffers. The UI intends to follow Material You design principles (including dynamic theming). I hope to reuse some of the components later to integrate them in AndroidAPS, too.
How to build
settings.gradleand change the path to your local copy of the Remora repository:This makes sure that the AndroidAPS build system can access the required source files of the Remora library. Later this will be replaced by providing a build artificat, by using git submodules or by fully merging the source code into the AndroidAPS repository.
Firebase setup
For legal and technical reasons, Remora requires every user to create an individual Firebase project, which takes just a few clicks:
Working
Not yet implemented
Important notes
Screenshots
Still very much in progress, but here's an early look: