Hi
I updated to FW RUT9M_R_00.07.14.3
I had a service that read the pin=adc0. I got a unexpected value. So I want to check check it.
But, my litle python code don’t work anymore:
AuxBatteryVoltage = http.request(‘GET’, ‘http://192.168.1.1/cgi-bin/io_value?username=XXXXX&password=YYYYYY&pin=adc0 ’)
Before (RUT9M_R_00.07.13.2), under “Services->Input/Outpu → Post/Get” it was available to setup POST/GET settings. But it is not there anymore.
How can I get i back?
Regards Terje
Hello,
Starting from firmware RUT9M_R_00.07.14.0 , the POST/GET services were completely withdrawn. You can find more details on this change here:
Dear community,
We would like to inform you that with the release of RutOS version 7.14 in Q2 2025, devices will implement read-only permissions for critical system files by default. This change enhances security and system stability but may impact users performing non-standard operations.
Additionally, with RutOS 7.14, support for the POST/GET service will be discontinued to strengthen security. Device functionality will remain accessible through alternative methods.
For more details, please…
As an alternative, to read the analog input value (adc0), you can now utilize the device’s API requests. Full documentation on available API endpoints and request examples can be found here:
https://developers.teltonika-networks.com/reference/rut956/7.14.3/v1.6.3/input-output
If you have any additional questions or need assistance, feel free to reach out.
Best regards,
Hi
I am now able to read the value of adc0 using /io/adc0/status.
But, I also need to close / open “relay0”. I don’t find any end point for doing so. (I thought that /io/{id}/actions/change_state can do it, but after reading the doc I realised it can not). Please advise.
Regards Terje
Hello Terje,
To control relay0 (open or close it) through API, you should use the following endpoint:
/api/io/relay0/actions/change_state
This should be called using the POST method, and the request body needs to include the "state"
parameter with a value of either "open"
or "closed"
.
Example JSON body:
Click to expand
{
"state": "closed"
}
or
{
"state": "open"
}
If you run into any issues implementing this or have additional questions, feel free to reach out.
Best regards,
Hi
It worked. Here is my code, just to make it easier for the next one with the same or simular problem:
self.base_url = “http://192.168.1.1/api ”
def OpenRelay(self) -> bool:
headers = {"Authorization": f"Bearer {self.token}"}
url = f"{self.base_url}/io/relay0/actions/change_state"
try:
response = requests.post(url, headers=headers, json={"data": {"state": "open"}})
response.raise_for_status()
if response.status_code == 200:
response_data = response.json()
print(f"response_data: {response_data}")
return response_data
else:
print(f"Unexpected status code: {response.status_code}")
return False
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
return False
system
Closed
June 7, 2025, 12:50am
7
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.