Open Nixon506E opened 1 month ago
Are there outlets on the UXG? How are they controlled?
There is a single outlet on the back that shows up in the ports section of device info. It allows for automatic power cycling when the internet goes down or a manual power cycle.
Ok, you would have to provide complete data on how to control that output as I don't own a UXG, typically people use debug tools in a browser and figure out what commands and data is sent
Is it best just to see what calls are being made in the timeline or is there a more efficient way to get that data? I guess I'm not particularly sure what data you need or where to find it in the browser
Should I be looking for a call similar to poe cycling in devmgr? I see AC_OUTLET_POWER_CYCLE in the browser as well
You need to look at the network traces and find the correct calls, yes similar to devmgr
Looks like the command to power cycle the outlet is a POST to /proxy/network/api/s/default/cmd/devmgr
with the following body:
{"mac":"xx:xx:xx:xx:xx:xx","outlet_table":[{"index":1}],"cmd":"outlet-ctl"}
The GET to /proxy/network/api/s/default/stat/device
responds with the following data to get info about the outlet:
"outlet_table": [ { "index": 1, "name": "Outlet 1", "outlet_caps": 65537, "relay_state": true, "cycle_enabled": true } ]
The outlet can be turned on and off with a PUT to /proxy/network/api/s/default/rest/device/xxxxxx
with the following body:
{"outlet_overrides":[{"index":1,"name":"Outlet 1","cycle_enabled":true,"relay_state":false}]}
and it responds with the device configuration
Would love to get an update on what next steps might be here, thanks!
The ac outlet ports on the a gateway, such as the UXG should allow being cycled as if they were poe ports