Skip to main content

Configuration -- GPIO & SpeedFusion Connect Protect

POST /api/config.gpio​

⚠️ Beta API

Obtain and update the GPIO configuration. Returns the updated config. Passing an empty list returns the current config without making changes.

Available in 8.1.1 or later

Input Parameters​

FieldTypeRequiredDescription
listarrayoptionalList of GPIO config objects
referencebooleanoptionalInclude GPIO reference info

GPIO Config Object:

FieldTypeRequiredDescription
idinteger✅GPIO ID
enablebooleanoptionalEnable GPIO
namestringoptionalCustom name
typestringoptionaldigital_input, digital_output, analog_input
modestringoptionalSee mode table below
customStatesobjectoptionalCustom input states: high (string), low (string)
delaynumberoptionalDelay 1--3600 (input type only)

GPIO Modes by Type:

TypeAvailable Modes
digital_inputinput_sensing, ignition_sensing
digital_outputwan_status
analog_inputinput_sensing, voltage_measurement, analog_testing

Response​

Returns GPIO config objects keyed by GPIO ID, plus:

FieldTypeDescription
orderarrayOrdered list of GPIO IDs
referenceobjectSupport type and mode for each GPIO (if reference=true)

Reference Object:

FieldTypeDescription
<gpio_id>objectSupported name, type (array), and mode (object with arrays per type)

cURL Example​

curl -b cookies.txt -H "Content-Type: application/json" \
-X POST -d '{"list":[{"id":1,"enable":true,"type":"digital_output","mode":"toggle_high"},{"id":2,"enable":true,"name":"PowerInput","type":"digital_input","mode":"input_sensing","customStates":{"high":"Battery Backup","low":"Grid"},"delay":3}]}' \
http://192.168.1.1/api/config.gpio
{
"stat": "ok",
"response": {
"1": {
"enable": true,
"type": "digital_output",
"mode": "toggle_high"
},
"2": {
"enable": true,
"name": "PowerInput",
"type": "digital_input",
"mode": "input_sensing",
"customStates": {
"high": "Battery Backup",
"low": "Grid"
},
"delay": 3
},
"order": [1, 2]
}
}

GET /api/config.speedfusionConnectProtect​

Obtain the SpeedFusion Connect Protect config for clients (by MAC address) and access points (by SSID).

Available in 8.3.0 or later

Input Parameters​

FieldTypeRequiredDescription
infoTypearrayoptionalFilter: client, accessPoint

Response​

FieldTypeDescription
clientarrayList of client objects
accessPointarrayList of SSID profile objects

SFC_Client Object:

FieldTypeDescription
macstring (MAC)MAC address using SpeedFusion Connect Protect
cityCodestringSpeedFusion Cloud location city code (empty string = auto)

SFC_SSID_Profile Object:

FieldTypeDescription
ssidstringSSID connected to the Cloud Location
referenceSsidstringName of the reference SSID profile
cityCodestringSpeedFusion Cloud location city code

cURL Example​

curl -b cookies.txt http://192.168.1.1/api/config.speedfusionConnectProtect
{
"stat": "ok",
"response": {
"client": [
{
"mac": "00:11:6E:44:44:EE",
"cityCode": "FRA"
}
],
"accessPoint": [
{
"referenceSsid": "Balance_SSID_1",
"cityCode": "FRA",
"ssid": "Balance_SSID_1_Germany_FRA"
},
{
"referenceSsid": "Balance_SSID",
"cityCode": "FRA",
"ssid": "Balance_SSID_Germany_FRA"
}
]
}
}

POST /api/config.speedfusionConnectProtect​

Update client/SSID connection to SpeedFusion Connect Protect.

Available in 8.3.0 or later

Input Parameters​

FieldTypeRequiredDescription
actionstring✅update, remove, or replace
clientarrayoptionalClient objects to update/remove/replace
accessPointarrayoptionalAccess point objects to update/remove/replace

Action Behavior:

ActionDescription
updateWhen MAC/SSID matches, the profile is updated. When not found, a new profile is added.
removeRemove the item by MAC/SSID.
replaceEntire client/accessPoint array is removed and replaced with the provided array.

Client Object:

FieldTypeRequiredDescription
macstring (MAC)optionalMAC address
cityCodestringoptionalCloud location (not needed for remove)

Access Point Object:

FieldTypeRequiredDescription
ssidstringoptionalSSID
referenceSsidstringoptionalBase SSID profile name (not needed for remove)
cityCodestringoptionalCloud location (not needed for remove)

cURL Example​

curl -b cookies.txt -H "Content-Type: application/json" \
-X POST -d '{"action":"replace","client":[{"mac":"DD:11:6E:44:44:EE","cityCode":"FRA"},{"mac":"CC:11:6E:44:44:EE","cityCode":"FRA"}],"accessPoint":[{"referenceSsid":"Balance_SSID","cityCode":"FRA","ssid":"Balance_SSID_Germany_FRA"}]}' \
http://192.168.1.1/api/config.speedfusionConnectProtect
{
"stat": "ok",
"response": {
"client": [
{
"mac": "DD:11:6E:44:44:EE",
"cloudLocation": "FRA"
},
{
"mac": "CC:11:6E:44:44:EE",
"cloudLocation": "FRA"
}
],
"accessPoint": [
{
"referenceSsid": "Balance_SSID",
"cityCode": "FRA",
"ssid": "Balance_SSID_Germany_FRA"
}
]
}
}