@aqara-claw/aqara-bacnet
v0.1.1
Published
OpenClaw BACnet/IP auto-discovery plugin – zero-config network scanning for BACnet building-automation devices
Downloads
233
Maintainers
Readme
OpenClaw BACnet/IP Plugin
BACnet/IP auto-discovery plugin for OpenClaw: zero-config network scanning, device property read/write, and continuous device monitoring for building-automation systems.
Features
- Auto-discovery on startup — Broadcast + unicast WhoIs; devices are discovered as they appear on the network.
- Configurable binding — Bind to a specific interface (or auto-detect first non-loopback IPv4) and set subnet broadcast or target IPs.
- Six agent tools — Scan, list devices, read/write properties, get object lists, and read device summaries.
Install
openclaw plugins install @aqara-claw/aqara-bacnetUpgrade
openclaw plugins update aqara-bacnetConfiguration
Configure in openclaw.json under plugins.entries["aqara-bacnet"].config:
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| interface | string | auto (first IPv4) | Bind address; 0.0.0.0 = all interfaces. |
| port | number | 47808 | BACnet/IP UDP port (0xBAC0). |
| broadcast_address | string | 255.255.255.255 | WhoIs broadcast target (use subnet-directed e.g. 10.11.255.255). |
| target_addresses | string[] | [] | Known device IPs; unicast WhoIs is sent to each for reliable discovery. |
| scan_on_startup | boolean | true | Run a network scan when the plugin starts. |
| scan_interval_ms | number | 60000 | Periodic re-scan interval (ms). |
| scan_timeout_ms | number | 5000 | Time to wait for IAm responses per scan (ms). |
| apdu_timeout | number | 6000 | APDU timeout for ReadProperty/WriteProperty (ms). |
| auto_read_properties | boolean | true | Auto-read name, vendor, model, etc. when a device is discovered. |
Agent tools
The plugin registers 6 tools for the OpenClaw agent. Use these from prompts or skills to discover and control BACnet devices.
| Tool | Purpose | Parameters |
|------|---------|------------|
| bacnet_scan_network | Broadcast WhoIs and optional unicast to target IPs; discover devices on the LAN. Returns discovered devices (name, vendor, model, etc.). | lowLimit, highLimit (optional device ID range), target_addresses (optional extra IPs). |
| bacnet_get_devices | Return all discovered devices from in-memory cache (device ID, IP, name, vendor, model, object count). | None. Call bacnet_scan_network first for fresh data. |
| bacnet_read_property | Read one BACnet object property. Common: 85=Present Value, 77=Object Name, 28=Description, 79=Object Type, 111=Status Flags, 117=Units. | address, objectType, objectInstance, propertyId. |
| bacnet_write_property | Write one property (e.g. control output). Use Present Value (85) to control points. valueTag: 1=Boolean, 2=Unsigned, 3=Signed, 4=Real, 7=String, 9=Enumerated. | address, objectType, objectInstance, propertyId, value, valueTag. |
| bacnet_get_device_objects | Read a device’s Object List: all objects (Analog Input, Binary Output, etc.) and instance numbers. Use to discover data points. | address, deviceId. |
| bacnet_read_device_summary | One-shot full summary: name, vendor, model, firmware revision, object list. Use for initial device discovery. | address, deviceId. |
Typical workflow
- Discover — Call
bacnet_scan_network(optionally withtarget_addressesfor known IPs). - List — Call
bacnet_get_devicesto see cached devices and their IPs/IDs. - Inspect — For a device, use
bacnet_read_device_summaryorbacnet_get_device_objectsto see objects and instances. - Read/Write — Use
bacnet_read_propertyandbacnet_write_propertywithaddress,objectType,objectInstance,propertyId(and for write:value,valueTag).
Example config
In ~/.openclaw/openclaw.json:
{
"plugins": {
"allow": ["aqara-bacnet"],
"entries": {
"aqara-bacnet": {
"enabled": true,
"config": {
"interface": "0.0.0.0",
"port": 47808,
"broadcast_address": "10.11.255.255",
"target_addresses": ["10.11.0.1"],
"scan_on_startup": true,
"scan_interval_ms": 60000,
"scan_timeout_ms": 5000,
"apdu_timeout": 6000,
"auto_read_properties": true
}
}
}
}
}- Use subnet-directed broadcast (e.g.
10.11.255.255) when devices are on the same subnet. - Use target_addresses for known device IPs so unicast WhoIs reaches them even if broadcast is restricted.
License
MIT
