Hello community.
I have a question about possibility to check TRB245 DI value status. Accroding to official documentation after ubus call ioman.gpio.dio1 status command executing we get next result:
{
"value": "0",
"direction": "in",
"bi_dir": true,
"invert_input": false
}
I want to get "value" property of this object. And then check it. If value is "1" - then switch on value DO0 (set as output). I mean something like this:
if [ ioman.gpio.dio1.value = "1" ]; then
ubus call ioman.gpio.dio0 update '{"value":"1"}'
fi
I know it is not correct synyax for if statement. But I did not find correct. What is correct syntax of above mentioned if statement? Actuallly it is my first experience with Teltonika device. So, any information will be usefull for me.