Skip to main content

Android Nodes

Control and monitor Android devices with 17 specialized nodes.

Connection Setup

Android Device Setup

Configure how MachinaOs connects to your device.
connection_type
select
required
Connection method: Local ADB Device or Remote WebSocket
Local ADB:
device_id
select
Select from connected devices
auto_forward
boolean
default:"true"
Automatically setup port forwarding
port
number
default:"8888"
Port for ADB forwarding
Remote WebSocket:
websocket_url
string
Relay server URL (configured in .env)

System Monitoring (4 nodes)

Battery Monitor

Monitor battery status and health. Actions: get_status Output:
{
  "level": 85,
  "is_charging": true,
  "status": "charging",
  "plugged": "ac",
  "temperature": 28.5,
  "health": "good",
  "technology": "Li-ion"
}

Network Monitor

Check network connectivity. Actions: get_status Output:
{
  "is_connected": true,
  "type": "wifi",
  "wifi_ssid": "MyNetwork",
  "is_internet_available": true,
  "ip_address": "192.168.1.100",
  "signal_strength": -45
}

System Info

Get device information. Actions: get_info Output:
{
  "device_model": "Pixel 7",
  "manufacturer": "Google",
  "android_version": "14",
  "api_level": 34,
  "total_memory": 8192,
  "available_memory": 4096,
  "total_storage": 128000,
  "available_storage": 64000
}

Location

Get GPS location. Actions: get_location Output:
{
  "latitude": 37.7749,
  "longitude": -122.4194,
  "accuracy": 10.5,
  "altitude": 15.2,
  "provider": "gps",
  "timestamp": "2024-01-15T10:30:00Z"
}

App Management (2 nodes)

App Launcher

Launch applications by package name.
package_name
string
required
App package name (e.g., com.spotify.music)
Output:
{
  "success": true,
  "package": "com.spotify.music",
  "message": "App launched"
}
Common Package Names:
AppPackage
Chromecom.android.chrome
YouTubecom.google.android.youtube
Spotifycom.spotify.music
WhatsAppcom.whatsapp
Gmailcom.google.android.gm

App List

Get installed applications. Output:
{
  "apps": [
    {
      "name": "Chrome",
      "package": "com.android.chrome",
      "version": "120.0.6099.230"
    }
  ],
  "count": 150
}

Automation (6 nodes)

WiFi Automation

Control WiFi settings. Actions: enable, disable, get_status, scan Output (scan):
{
  "networks": [
    {
      "ssid": "MyNetwork",
      "bssid": "00:11:22:33:44:55",
      "signal": -45,
      "security": "WPA2"
    }
  ]
}

Bluetooth Automation

Control Bluetooth settings. Actions: enable, disable, get_status, get_paired_devices Output (paired devices):
{
  "devices": [
    {
      "name": "AirPods Pro",
      "address": "AA:BB:CC:DD:EE:FF",
      "type": "audio"
    }
  ]
}

Audio Automation

Control volume and audio. Actions: get_volume, set_volume, mute, unmute
volume_level
slider
Volume level 0-100 (for set_volume)
stream_type
select
default:"media"
Stream: media, ringtone, notification, alarm

Device State Automation

Control device states. Actions: get_state, set_airplane_mode, set_power_save
enabled
boolean
Enable or disable the feature

Screen Control Automation

Control display settings. Actions: get_brightness, set_brightness, wake_screen, set_timeout
brightness
slider
Brightness level 0-255
auto_brightness
boolean
Enable automatic brightness

Airplane Mode Control

Toggle airplane mode. Actions: get_status, enable, disable

Sensors (2 nodes)

Motion Detection

Access motion sensors. Actions: get_accelerometer, get_gyroscope, detect_shake Output (accelerometer):
{
  "x": 0.15,
  "y": 9.78,
  "z": 0.23,
  "timestamp": "2024-01-15T10:30:00Z"
}

Environmental Sensors

Access environmental sensors. Actions: get_light, get_pressure, get_temperature, get_humidity Output:
{
  "light": 350,
  "pressure": 1013.25,
  "temperature": 22.5,
  "humidity": 45
}
Not all devices have all sensors. Output will indicate unavailable sensors.

Media (2 nodes)

Camera Control

Control camera functions. Actions: get_info, take_photo
camera_id
select
default:"back"
Camera to use: back, front
Output (get_info):
{
  "cameras": [
    {
      "id": "0",
      "facing": "back",
      "megapixels": 50
    },
    {
      "id": "1",
      "facing": "front",
      "megapixels": 12
    }
  ]
}

Media Control

Control media playback. Actions: play, pause, next, previous, get_volume, set_volume

Example Workflows

Battery Alert

[Cron (hourly)] --> [Battery Monitor] --> [Python] --> [WhatsApp Send]
Python:
level = input_data.get("level", 100)
if level < 20:
    output = {"alert": True, "msg": f"Battery: {level}%"}
else:
    output = {"alert": False}

WiFi Toggle via Webhook

[Webhook Trigger] --> [WiFi Automation]
Webhook path: /wifi WiFi Action: {{webhookTrigger.body.action}}
curl -X POST http://localhost:3010/webhook/wifi \
  -d '{"action": "enable"}'

Morning Routine

[Cron (7:00 AM)] --> [WiFi Enable] --> [App Launcher (News)]
                          |
                          v
                    [Audio: Vol 50%]

Troubleshooting

# Check ADB connection
adb devices

# Restart ADB
adb kill-server
adb start-server
Some features require:
  • USB debugging enabled
  • Developer options enabled
  • Specific app permissions
  • Verify relay URL in .env
  • Check API key is valid
  • Ensure companion app is running