Change output relay state on Telnotnika RUTX50 reboot

Hello,

I would like to configure my RUTX50 devices in a way that everytime the device boots (on reboot or on power failure), the output dout1 is set to off, even if it was set to on before the device rebooted.

I have tried to edit a custom script and added this line:
curl -X GET “http://localhost/cgi-bin/io_state?username=admin&password=pass&pin=dout1&state=off

But it looks like that this GET service is not running while the custom script is executing.

Can you please help me with this?

Thank you!

Hello,

Thank you for reaching out.

Could you try an alternative method to set dout1 to “off” after the reboot by adding the following commands to the custom script:

uci set ioman.dout1.value='0'
uci commit ioman
/etc/init.d/ioman restart

I hope this helps! If you need further assistance, feel free to reach out.

Best regards,

Hi,

thank you for your answer.

I have done it this way:

ubus call ioman.gpio.dout1 update '{"value":"0"}'

Is this also ok or is it yours way better?

Thank you!

Hello,

Thank you for your follow-up!

Your way is also appropriate and optimal. Both methods work well, so feel free to use the one you’re more comfortable with.

Feel free to reach out if you have additional questions or need further assistance.

Best regards,

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.