Control your PIMA alarm system with Net4Pro network card from Home Assistant.
PIMA makes two separate TCP-enabled cards:
Net4Pro (supported) - PIMA's card for supporting the iPIMA Mobile App. The communication protocol between the app and the card is undocumented, fragile, and slow. It also disables the keypad when a client connects to it. So no, this card isn't a great option for home automation. On the bright side, with this integration you can still incorporate it into your favorite automations.
Net4Pro-i (not supported) - Optional Home Automation Kit component, and uses the serial interface's protocol. This card is the preferred way to go. It is already supported with an add-on by @deiger. This card responds quickly, supports more features like outputs, and is generally more robust.
- PIMA Hunter Pro™ alarm system
- PIMA Net4Pro™ network card (Installer PDF)
- Static IP address for your PIMA system (configure via PIMA settings or DHCP reservation)
- Your alarm system code (user's setting code, not the technician code)
- Native alarm control panel entity - Full integration with Home Assistant's alarm panel UI
- Optimistic updates - Instant UI response with background verification
- Configurable polling - Adjustable status check interval (5-60 minutes)
- Minimal keypad lock time - Connections released immediately after commands
This integration is not yet in the default HACS repository. Add it as a custom repository:
- In Home Assistant, go to HACS → Integrations
- Click the ⋮ menu (top right) and select Custom repositories
- Add repository URL:
https://github.com/birsch/pima4ha - Select category: Integration
- Click Add
- Click + Explore & Download Repositories
- Search for PIMA Alarm and click Download
- Restart Home Assistant
- Download the latest release from GitHub
- Copy the
custom_components/pimafolder to your Home Assistantconfig/custom_components/directory - Restart Home Assistant
After installation, add the integration:
- Go to Settings → Devices & Services
- Click + Add Integration
- Search for PIMA Alarm
- Enter your configuration:
| Parameter | Required | Default | Description |
|---|---|---|---|
| IP Address | Yes | - | Your PIMA system IP address (e.g., 192.168.1.100) |
| Port | No | 10150 | TCP port for PIMA communication |
| Alarm Code | Yes | - | Your alarm user code (4-6 digits) |
| Scan Interval | No | 600 | Status polling interval in seconds (300-3600) |
Note: The alarm code is stored in the integration configuration and used automatically - you won't need to enter it when arming/disarming.
This integration conforms to Home Assistant's built-in alarm_control_panel:
States:
disarmed- Alarm is offarmed_away- All zones armedarmed_home- Home zones armed (Home 1)armed_night- Night mode armed (Home 2)
Services:
alarm_control_panel.alarm_arm_away- Arm all zonesalarm_control_panel.alarm_arm_home- Arm home zonesalarm_control_panel.alarm_arm_night- Arm night modealarm_control_panel.alarm_disarm- Disarm alarm
automation: - alias: "Arm alarm when leaving" trigger: - platform: state entity_id: person.john to: "not_home" action: - service: alarm_control_panel.alarm_arm_away target: entity_id: alarm_control_panel.pima_alarm- Verify PIMA system IP address and network connectivity
- Ensure port 10150 (UDP and TCP) is accessible
- Check alarm code is correct
- Ensure UDP wake-up packets can reach the device
- This is normal - PIMA protocol can take 15-30 seconds to respond
- The integration uses optimistic updates for instant UI feedback
- Increase scan interval if experiencing issues
- Physical keypad may be locked during network operations
Enable debug logging in configuration.yaml:
logger: default: info logs: custom_components.pima: debugThen check logs at Settings → System → Logs
This integration locks the keypad each time it performs an arm/disarm action, or when checking for status (every 10 min by default). It then immediately disconnects to release the keypad. If the physical keypad is locked:
- Wait for up to a minute to see if it is released
- Consider increasing the scan interval to reduce connection frequency
- This integration reverse-engineers the communication between the iPhone app and the Net4Pro card
- When connected, the physical keypad is temporarily locked
- Connections are released immediately after each command to minimize keypad lock time
- Status polling is configurable to balance responsiveness vs. keypad availability
- Optimistic updates provide instant UI feedback while background polling verifies state
This integration uses the PIMA Net4Pro network protocol:
- UDP wake-up packets (required before TCP connection)
- TCP communication on port 10150
- CRC16/XMODEM checksumming
- Optimized for slow response times (15-30+ seconds possible)
| Type | Structure | Example |
|---|---|---|
| Request | \xdb + \xff + ascii_command + CRC16/XMODEM checksum + \xdc | dbff53533d31e66ddc (status) |
| Response | \xdb + ascii_response + CRC16/XMODEM checksum + \xdc | db53533d30ebe1e5e9e420207e5bdc (disarmed) |
| Command | Command ASCII | Response ASCII | Example |
|---|---|---|---|
| Login | PW=XXXX (XXXX: user's code) | R=1 | PW=1234 → R=1 |
| Status | SS=1 | S=X (X: 0-disarmed, 1-away, 2-home, 3-night) | SS=1 → S=2 |
| Arm | AR=X (X: 1: away, 2: home, 3: night) | S=X (X: 0-disarmed, 1-away, 2-home, 3-night) | AR=1 → S=1 |
| Disarm | DA=1 | S=0 | DA=1 → S=0 |
Test the protocol without Home Assistant:
# Install dependency pip3 install crcmod # Run test python3 test_protocol.py --ip 192.168.1.100 --code 1234 # With custom port python3 test_protocol.py --ip 192.168.1.100 --port 10150 --code 1234Arguments:
--ip(required): IP address of your PIMA system--port(optional): TCP port (default: 10150)--code(required): Your alarm user code
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License
Protocol reverse-engineered from iPima mobile app network traffic analysis.
PIMA™ and its logo are trademarks of PIMA Electronic Systems Ltd, http://www.pima-alarms.com. This integration was built with no affiliation with PIMA Electronic Systems Ltd.

