A React Native smart home monitoring application that integrates with Tuya-powered IoT devices to provide activity tracking, routine monitoring, and wellness insights for elderly care and independent living.
Tech Stack: React Native 0.73 · Expo 50 · AWS Amplify · TypeScript
Platform: iOS
Licence: GPL v3
My grandma lives independently over in Ireland, and as she's getting older, our family wanted peace of mind that everything was okay.
I built Tether between 2022-2024 so we could check in on her daily routines and know she's up and about, without needing to call every day or install cameras. The sensors quietly track normal activities like making a cup of tea, moving around the house, or opening the front door. If something seems off, we know to give her a ring.
It's a simple way to stay connected across the miles while respecting her independence.
Tether enables families and carers to remotely monitor the wellbeing of loved ones through smart home sensors. The app provides real-time activity logs, daily routine tracking, and summarised wellness data—all without intrusive cameras or microphones.
- Activity Monitoring — Real-time logs of sensor activity throughout the home
- Routine Tracking — Customisable morning and evening routine checklists
- Activity Graphs — Visual representation of daily activity patterns
- Sleep Tracking — Monitor sleep duration and overnight activity
- Wellness Summaries — Daily insights including time outside and bathroom visits
- Multi-Home Support — Manage multiple properties from a single account
- Device Management — Easy pairing and configuration of smart devices
| Device | Connection Type | Description |
|---|---|---|
| Motion Sensor | Sub-device (Zigbee) | Detects movement in rooms |
| Door Sensor | Sub-device (Zigbee) | Monitors door open/close events |
| Smart Plug | Wi-Fi | Tracks appliance usage |
| Smart Button | Sub-device (Zigbee) | Manual routine confirmation |
| Climate Sensor | Wi-Fi | Temperature and humidity monitoring |
| Hub/Gateway | Wi-Fi | Central hub for Zigbee sub-devices |
Home Dashboard • Activity Log • Morning Routine • Devices
┌─────────────────────────────────────────────────────────────────┐
│ Mobile App │
│ (React Native / Expo) │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ Screens │ │ Components │ │ Native Modules │ │
│ │ │ │ │ │ │ │
│ │ • Home │ │ • Activity │ │ • TuyaModule (iOS) │ │
│ │ • Devices │ │ Graph │ │ │ |
│ │ • Health │ │ • Activity │ │ │ │
│ │ • Settings │ │ Logs │ │ │ │
│ │ • Pairing │ │ • Routine │ │ │ │
│ │ │ │ Overview │ │ │ │
│ └──────────────┘ └──────────────┘ └──────────────────────┘ │
│ │
└──────────────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ AWS Amplify Backend │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ Cognito │ │ API Gateway │ │ Lambda │ │
│ │ │ │ │ │ │ │
│ │ User Auth │ │ REST APIs │ │ • frontendDynamo │ │
│ │ Email Sign-up│ │ │ │ Functions │ │
│ │ │ │ │ │ • getDeviceData │ │
│ └──────────────┘ └──────────────┘ │ • getUserId │ │
│ │ • autoConfirmUser │ │
│ ┌──────────────┐ ┌──────────────┐ └──────────────────────┘ │
│ │ DynamoDB │ │ S3 │ │
│ │ │ │ │ │
│ │ • TetherData │ │ Profile │ │
│ │ • TetherUsers│ │ Pictures │ │
│ │ │ │ │ │
│ └──────────────┘ └──────────────┘ │
│ │
└──────────────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Tuya IoT Cloud │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Device Data ◄──────────────────────► Smart Devices │
│ │
└─────────────────────────────────────────────────────────────────┘
Note: This app has currently only been built and tested for iOS. The React Native codebase is cross-platform, and Android support could be added relatively easily by implementing the equivalent Tuya native module bridge in Java/Kotlin. The Android project structure is already in place.
- Node.js >= 18.x
- npm or yarn
- Expo CLI (
npm install -g expo-cli) - Xcode (for iOS development, macOS only)
- AWS CLI (for Amplify backend)
- Tuya Developer Account with IoT Core SDK credentials (see Tuya Setup)
-
Clone the repository
git clone https://github.com/your-username/Tether-Tuya-React.git cd Tether-Tuya-React -
Install dependencies
npm install
-
Install iOS pods (macOS only)
cd ios && pod install && cd ..
-
Configure environment variables
Create a
.envfile in the root directory:TUYA_APP_KEY=your_tuya_app_key TUYA_APP_SECRET=your_tuya_app_secret
-
Configure AWS Amplify
amplify init amplify push
This will create the
src/amplifyconfiguration.jsonfile required for AWS services.
Start the development server:
npm startRun on iOS:
npm run iosNote: This app uses native modules for Tuya SDK integration, so it requires a development build rather than Expo Go.
Tether-Tuya-React/
├── amplify/ # AWS Amplify backend configuration
│ └── backend/
│ ├── api/ # API Gateway definitions
│ ├── auth/ # Cognito configuration
│ ├── function/ # Lambda functions
│ └── storage/ # DynamoDB & S3 configuration
├── android/ # Android native code
├── assets/
│ ├── fonts/ # OpenSans font family
│ ├── icons/ # SVG icons
│ ├── images/ # Device images & diagrams
│ └── logo/ # App logo
├── ios/ # iOS native code
│ └── TetherTuyaReact/
│ └── RCTTuyaModule.m # Tuya native module bridge
├── src/
│ ├── App.tsx # Main app entry & navigation
│ ├── components/
│ │ ├── ActivityGraph.tsx # Activity visualisation
│ │ ├── ActivityLogs.tsx # Event timeline
│ │ ├── ActivitySummary.tsx
│ │ ├── CustomHeader.tsx # Navigation header
│ │ ├── RoutineOverview.tsx
│ │ ├── RoutineRing.tsx # Progress indicator
│ │ └── devicePairing/ # Pairing flow components
│ ├── hooks/
│ │ ├── AuthContext.tsx # Authentication state
│ │ └── useTuyaEvents.ts # Tuya event handling
│ ├── screens/
│ │ ├── Home.tsx # Main dashboard
│ │ ├── DeviceList.tsx # Device management
│ │ ├── Health.tsx # Wellness insights
│ │ ├── Settings.tsx # User settings
│ │ ├── PairDevice.tsx # Device pairing
│ │ ├── CustomiseRoutines.tsx
│ │ └── ...
│ ├── styles/
│ │ └── GlobalStyles.js # Theme & styling constants
│ └── utils/
│ ├── ApiGateway.ts # AWS API calls
│ ├── DynamoDBService.ts # Database operations
│ ├── StorageService.ts # AsyncStorage wrapper
│ └── GeneralUtils.ts # Helper functions
├── app.json # Expo configuration
├── package.json
└── tsconfig.json
| Function | Purpose |
|---|---|
frontendDynamoFunctions |
CRUD operations for users, devices, homes, and activity data |
getDeviceData |
Fetches device data from Tuya API and syncs to DynamoDB |
getUserId |
Resolves user ID from email |
autoConfirmUser |
Cognito trigger for auto-confirming users |
| Table | Purpose |
|---|---|
TetherData |
Activity logs, device events, and routine data |
TetherUsers |
User profiles and home associations |
| Bucket | Purpose |
|---|---|
userProfilePictures |
Stores user/home profile images |
To use this app, you'll need to create a Tuya developer account and configure an IoT project:
-
Create a Tuya Developer Account
- Visit Tuya IoT Platform and sign up for a free account
- Complete the account verification process
-
Create a Cloud Project
- Navigate to Cloud → Development → Create Cloud Project
- Select your data centre region (choose the one closest to your users)
- Choose Smart Home as the industry
- Select Custom development method
-
Subscribe to API Services
- In your project, go to API Services → Subscribe
- Enable the following APIs:
- IoT Core — Device management and control
- Smart Home Basic Service — Home and room management
- Data Dashboard Service — Device data and statistics
-
Get Your Credentials
- Go to Project Overview to find your:
- Access ID (App Key)
- Access Secret (App Secret)
- Add these to your
.envfile
- Go to Project Overview to find your:
-
Configure the Mobile SDK
- Navigate to App → SDK Development
- Create a new app and configure:
- Bundle ID (iOS):
sam.greenwood.Tether-Tuya - Package Name (Android):
com.vdsam.TetherTuyaReact
- Bundle ID (iOS):
- Download the security certificate files and place them in the appropriate native directories
-
Link Your Tuya Devices
- Ensure your Tuya-compatible devices are linked to your Tuya developer account
- Devices can be added via the Tuya Smart or Smart Life apps during development
Important: Keep your Access ID and Access Secret confidential. Never commit these to version control.
The app includes a custom native module for iOS to interface with the Tuya SDK:
- User authentication
- Home management
- Device pairing
- Device data fetching
The Android native module has not yet been implemented. The project structure exists in android/app/src/main/java/, and implementing the Tuya SDK bridge would follow a similar pattern to the iOS implementation using the Tuya Android SDK.
npx tsc --noEmitnpm run lintiOS:
expo run:ios --configuration Release- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the GNU General Public Licence v3.0 — see the LICENCE file for details.
You are free to use, modify, and distribute this software under the terms of the GPL v3. Any derivative works must also be licensed under GPL v3.
- Tuya IoT Platform — Smart device SDK and cloud services
- AWS Amplify — Backend infrastructure
- Expo — React Native tooling
- React Navigation — Navigation library



