Use Web API to switch POE ports on TSW202

Hi,

a collegue purchased a TSW202 because we use POE devices that must be switched off/on during an initialization phase of our program.
He thought the device would support SNMP, but that’s readonly.

Anyway, I used the Web API to mimic a browser to switch those ports on/off. I noticed that things that worked with the shipped firmware 1.01 don’t in 1.05.

In the API endpoint “/api/ports_settings/config” there has been a property “enable” in 1.01 that seemed to get renamed to “enabled” in newer versions.
1.01:
{“data”:
[
{
“enable”:“1”,“_isolated”:“0”,“eee_enable”:“1”,
“duplex”:“full”,“speed”:“auto”,“poe_enable”:“0”,“id”:“port1”
}
]
}
Because we don’t need to dis/enable ports I just left out this field. But as a wish for future changes: Don’t change it for cosmetic reasons (unless you probably make fields more consistent across different products).

Hi,

Thank you kindly for the suggestion. We will look out when doing any firmware updates related to this specific functionality.

Regards,
M.

Officially API in TSW is only supported from 1.4 firmware version, as you can see in the documentation page https://developers.teltonika-networks.com/ so that’s probably the reason for the change.

This topic was automatically closed after 60 days. New replies are no longer allowed.