@astrofoundry/pi-astro 0.40.24 → 0.40.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/network/SKILL.md +12 -0
package/package.json
CHANGED
package/skills/network/SKILL.md
CHANGED
|
@@ -90,6 +90,18 @@ Behavior learned on the live consoles:
|
|
|
90
90
|
- A policy has exactly one source zone and one destination zone; several destination zones need one policy each. The `SYSTEM_DEFINED` policies show each zone pair's default (on 37: Vpn to Dmz allows, Vpn to Services blocks).
|
|
91
91
|
- Traffic between 37 and Mira crosses two firewalls: `<zone> to Vpn` on the sending site and `Vpn to <zone>` on the receiving site. A subnet routes only if Site Magic shares it: `unifi cloud /v1/sd-wan-configs/<id>` lists the shared networks per site. 37 shares Services, Management, Trusted, and DMZ; Mira shares Trusted, IoT, Services, and Management.
|
|
92
92
|
|
|
93
|
+
## `unifi <37|mira> app-get <path>` and `unifi <37|mira> device-network <deviceId> <json>`
|
|
94
|
+
|
|
95
|
+
`app-get` reads any path of the Network application's own API under `/api/s/default/` or `/v2/api/site/default/`, through the same connector and key. Use it to find the fields a change needs before adding a narrow write command. Useful reads: `/api/s/default/stat/device` (devices with `mgmt_network_id`, `config_network`, `port_table`, `port_overrides`, `uplink`), `/api/s/default/stat/sta` (clients with `ap_mac`, `sw_mac`, `sw_port`), `/api/s/default/rest/networkconf` (networks with their 24-hex ids, VLAN, subnet, DHCP range).
|
|
96
|
+
|
|
97
|
+
`device-network` changes only a device's management network and address: a PUT of `/api/s/default/rest/device/<deviceId>` whose body may hold just `mgmt_network_id` and `config_network`. Both sites use the same layout: the uplink port stays native Default with all VLANs tagged, and each device sits on Management with a static address and the local DNS nodes.
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{ "args": ["unifi", "mira", "device-network", "<24-hex deviceId>", "{\"mgmt_network_id\":\"<Management networkconf id>\",\"config_network\":{\"type\":\"static\",\"ip\":\"10.1.10.3\",\"netmask\":\"255.255.255.0\",\"gateway\":\"10.1.10.1\",\"dns1\":\"10.1.40.53\",\"dns2\":\"10.0.40.54\",\"dnssuffix\":\"\",\"bonding_enabled\":false}}"] }
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Change one device at a time, downstream devices and the AP serving the operator last, and wait until `devices` shows it `ONLINE` at the new address before the next. An AP takes the Management network and the static address in one step. A switch does not: on 2026-10-31 the Flex XG lost the controller after getting both at once, and reverted to its previous settings by itself about 10 minutes later. For a switch, first send `mgmt_network_id` with `config_network: {"type":"dhcp"}` and wait for `ONLINE`; then send the static address. If it stays in provisioning (`state` 5, `last_config_applied_successfully: false`), restart it. The official `RESTART` device action works only on an `ONLINE` device. A switch powered by PoE can be restarted from its upstream port: `write POST /v1/sites/<siteId>/devices/<upstreamId>/interfaces/ports/<n>/actions '{"action":"POWER_CYCLE"}'`. A restart interrupts everything behind the switch; at Mira that is SPACE-X and technitium3 on Flex XG port 2.
|
|
104
|
+
|
|
93
105
|
## `unifi <37|mira> nat` and `unifi <37|mira> nat-write ...`
|
|
94
106
|
|
|
95
107
|
The gateway's NAT rules (Policy Table, type NAT), which the official API lacks. The wrapper calls the Network application's own path `/proxy/network/v2/api/site/default/nat` through the cloud connector with the account key `UNIFI_API_KEY`; `--local` uses the console's local key instead.
|