7888 questions

9313 answers

14995 comments

12808 members

0 votes
194 views 27 comments
by

In coming releases, can we expect a "Periodic control of output" like on the RUT240  that allows to set up automatic output control rules that trigger output state changes at the specified period or interval ?

by

The action I want to initiate is: every day at 12:00, put the output (4) to HIGH for 1 minute

 So I wrote the following various crontabs, but did not succeed (on each, got a reply “not found”):

0012***configurable output 4 high

0012***\output4\high

0012***\pin=dout1\state=1

0012***\pin=dout4\state=1

0012***\pin=dout4\state=high

 root@Teltonika-TRB140:~# -ash: 0012***pin=dout1: not found 

So what is the syntax to use for output 4 ?

What is my error ?

Thank you.

 

 

 

by

Hi,

Please take a look to this link, you're trying to use http requests into bash.

You can use uci commands. in there is the details on how to power up/off and output in TRB devices.

https://wiki.teltonika-networks.com/view/UCI_command_usage

Also, crontabs call an script path into your folder. You should create an script and call it with crontabs.

https://wiki.teltonika-networks.com/view/Crontabs

In case of checking your crontab syntax, you can use an external page like this one.

https://crontab.guru/
 

To get status from cli:

 ubus call ioman.gpio.dio0 status or ubus call ioman.gpio.dio1 status


Regards.

by

Hi again,

After consultation of "UCI_command_usage" and of "Crontabs" pages, here under are the commands I introduced, but did not succeed to get the expected result. Could you review them and point to my errors ? Thank you so much for your support.

root@Teltonika-TRB140:~# uci get <config> <ioman>

-ash: syntax error: unexpected redirection

root@Teltonika-TRB140:~# uci get <config>,<ioman>

-ash: syntax error: unexpected newline

root@Teltonika-TRB140:~# uci get <config> ioman

-ash: can't open config: no such file

root@Teltonika-TRB140:~# uci get <config>.ioman

-ash: can't open config: no such file 

root@Teltonika-TRB140:~# 0012*** uci set ioman.dio1.value='1' && uci commit ioman

-ash: 0012***: not found

root@Teltonika-TRB140:~# 0012*** uci set ioman.dio1.value='1'

-ash: 0012***: not found                                       

2 Answers

+1 vote
by
Hi,

Did you read about the scheduler function?

https://wiki.teltonika-networks.com/view/TRB140_Input/Output#Scheduler

Regards.
by
Yes, but the scheduler function does not allow for a recurrent daily 1 minute (i.e.) activation of the output. On top of that we need to activate the output by a sms command, which is incompatible with the scheduler (as stated by the system when we try it).
by
Hi, I didn't quite understand your needing.

Do you need to enable/disable the output every minute?

If so, probably would be great to use the POST/GET feature and use crontabs to execute the commands/scripts you need to power up/off the output.

https://wiki.teltonika-networks.com/view/TRB140_Input/Output#Post.2FGet_examples

https://wiki.teltonika-networks.com/view/Crontabs

Regards.
by

Hi Oscar,

1. No, not every minute, but recurrent daily 1 minute (i.e.) activation of the output (which means for 1 minute every day at the same time of the day).

2. The ideal solution is that of "Periodic control of output" like on the RUT240. So I ask again, if there is a chance to get it in the future on the TRB140 ?

3. I tried the scheduler of the TRB140, but it is not working for that . I got a "server error".

4. Your proposal POST/GET suppose the command is coming from outside the TRB140 (am I right?) which is not convenient

5. Your other proposal with Crontabs does not seem to be applicable to TRBxx, but for RUTxx

Thank you for your effort. Luc

by

Hello,

1. No, not every minute, but recurrent daily 1 minute (i.e.) activation of the output (which means for 1 minute every day at the same time of the day).

  • Did you check the scheduler parameters? You can set up the interval parameter, also you can choose between Week days, or Month days, even you can set up start time and end time. Which firmware are you using rigth now? If you're not using the last one, can you please upgrade it? --> https://wiki.teltonika-networks.com/view/TRB140_Firmware_Downloads

2. The ideal solution is that of "Periodic control of output" like on the RUT240. So I ask again, if there is a chance to get it in the future on the TRB140 ?

  • I think the TRB140 has already added the feature you want to achieve in the lastest firmware. Please let me know if I'm wrong

3. I tried the scheduler of the TRB140, but it is not working for that . I got a "server error".

  • If you're using an older firmware, probably you'll get erros, due the structure was changed from  TRB1_R_00.02.06 | 2020.12.31 version.

4. Your proposal POST/GET suppose the command is coming from outside the TRB140 (am I right?) which is not convenient

  • You can issue this command from outside and inside the router, so in both cases you can issue the commands you want to use.

5. Your other proposal with Crontabs does not seem to be applicable to TRBxx, but for RUTxx

  • It's applicable for all our Teltonika devices.
Any further doubt, please let me know.
Regards.
by

Hi again,

1. We use FW 02.06.1

2. ? I do not see this feature on TRB140 !

3. I can send you the report error, but how to attach it to this comment ?

4. I do not see how to issue the command automatically from inside the router ?

5. I do not see any "CLI" on the "Services" tab of the TRB140, able to initiate a Crontab 

Thank you Oscar for the follow-up. Luc

by
Hi, can you please confirm if you're using the "basic" or "advanced" mode?

Take a look to this link:

https://wiki.teltonika-networks.com/view/TRB141_WebUI

Nevertheless, if you want to send files, you can do it via DM, click on my username and you can send there.

Regards.
by
Thank you Oscar to point on the "advanced" mode. We were indeed in "Basic".

So now in advanced mode, we are able to use the CLI. We will try a crontab an keep you informed next week.

Regards.
by
Hi,

Ok, I'll be looking forward to your feedback.

Regards.
by
Hi, did you try restarting the service with this command?

/etc/init.d/ioman restart

Regards.
0 votes
by

Hello,

You should replace the <config> with the config file you want to use, for example to get the Wireless SSID /etc/config/wireless  you should use this command:

uci get wireless.@wifi-iface[0].ssid

Also, you can access via ssh/cli to your device and check all the configuration files availables using the command:

 ls /etc/config

Once, you know which file to edit/get information, you can use show to see all the possible options.:

For instance:

uci show wireless

Any further doubt please let me know.

Regards.

by

Sorry for my inaccurate statement: 

it means that the physical output and the user interface (Services/input-output/status) do not show a status change, while the "get" command via the CLI shows a status change !

Thank you.

by

Hi,

When I put this command : uci set ioman.dio1.value=0 && uci commit ioman && etc/init.d/ioman restart

i receive this answer -ash: etc/init.d/ioman: not found      

Regards.

by

Hi,

Seems you missed the "/" character

by

Hi Oscar,

Indeed, I missed the "/" character. 

Everything is now working as we wish...smiley

I would like to thank you very much for all your advices, and for your patience with me !

Luc

by
Hi,

Thanks for your feedback and good luck with the solution.

Regards.