Settings for output

Hello everyone,

I now have my first RUT200 router.
I want to use it to switch remote lighting on and off.
Switching on and off with SMS works quite well.

Currently I have the following problems and unfortunately I have not managed to solve them after intensive reading and googling.

  1. as soon as I switch on the router (power on), the output is set to high as soon as the router is fully powered up
    I need the output to always be the same as when the router was switched off.
    If this is not possible, the output should be set to Low by default when restarting.

  2. i would like to send an SMS with the current status (signal strength, etc…) every 1 hour. Basically like the function Service > Mobile Utilities > SMS Utilities > SMS Rules > Send status. It doesn’t matter to me whether it happens every 1 hour (since start), or always on the full hour

  3. i would like to receive an SMS as soon as the output has been switched. So an SMS message when the output is switched on and a message when the output is switched off.

Thank you already for all your support!

Greetings
Automatix

Hello,

Apologies for a delayed response.

First, could you please confirm which firmware version is currently installed on your RUT200? If it’s an older one, make sure to update it to the latest firmware version (7.13.4), as an issue similar to the output going “high” on startup shouldn’t be noticeable on this FW.

Now, regarding your setup and faced issues:

  1. If the issue still occurs even on the latest firmware, you can try setting the output to “low” by default after boot-up using a custom script. To do this, navigate to System → Maintenance → Custom Scripts, and add the following to the Startup script section:
sleep 20
ubus call ioman.gpio.dout1 update '{"value":"0"}'

This will set the output to “low” 20 seconds (can be changed to a higher amount) after every device boot-up.


  1. To send an SMS with signal strength and system info every hour, you’d need to create a custom script that sends the desired data via SMS and then schedule it using crontabs or using sleep in script’s main loop.

More information about custom scripting and crontabs can be found in the following links:

:blue_book: Custom User Scripts

:blue_book: Crontabs

Working similar script example
#!/bin/ash


# Recipient phone number (change this to your number)
RECIPIENT="+XXXXXXXXXX"

# Function to send status SMS
send_status_sms() {
    # Get current date and time
    UPTIME=$(uptime)

    # Get signal strength
    SIGNAL=$(gsmctl -q)

    # Get network operator
    OPERATOR=$(gsmctl -o)

    # Get IP address
    IP_ADDR=$(ifconfig $(route -n | grep '^0.0.0.0' | awk '{print $8}') | grep 'inet addr' | awk '{print $2}' |

    # Compose message
    MESSAGE="Router Status: $UPTIME Signal: $SIGNAL Operator: $OPERATOR IP: $IP_ADDR"

    # Send SMS
    gsmctl -S -s "$RECIPIENT $MESSAGE"

    # Log to syslog
    logger -t "HourlyStatusSMS" "Sent status SMS to $RECIPIENT"
}

# Main loop
while true; do
    # Send initial SMS immediately
    send_status_sms

    # Sleep for 1 hour (3600 seconds)
    sleep 3600
done


  1. To send SMS notifications on RUT200, output change can be achieved pretty simply by using the Event Juggler feature. The Event Juggler configuration setup for this could look similar or identical to the one provided in the screenshots below:



Best regards,

Thank you very much for the answer, I was very happy to get an answer after all :slight_smile:

Unfortunately, I only managed to try it out now because the router was on a remote mountain top.

I already had the firmware on the latest version.
See screenshot:

The user-defined script for automatic switch-off after booting worked right away :slight_smile:

Unfortunately I could not find the “Event Juggler” in the web interface.
I only found the “I/O Juggler”, which is located under “Service → Input/Output → I/O Juggler”. But there I can only define events for the input.

Can you please describe where exactly I can find the “Event Juggler”?

I have now solved the situation with the regular status a little differently. I use a smartphone app to regularly send a trigger SMS to the router, which then responds with the status. For me, this has the advantage that each user can do it at their own pace.

Many thanks again for your support!

Greetings
automatix

Hello,

Regarding your question, the Event Juggler feature should be available in the WebUI under Services → Event Juggler page.

Event Juggler's location

Could you please check and confirm if you see this service?

Best regards,

I’ve looked to see what I have under “Service”, but unfortunately I have far less options.
This is a screenshot of my RUT200 web interface:




I have also switched on the “Advance” mode:

Shame on me, I’ve now found my mistake as to why I didn’t see the Event Juggler.

When I checked the firmware version, I had looked at the available version and not at the current version :frowning:
Sorry that was my mistake!!

Now I also see the Event Juggler :slight_smile:

The new firmware gave me this warning:

Should I move the functions out of the IO Juggler and into the Event Juggler within the next few days, or do I still have several months to do this?

Hello,

Thank you for the update.

Regarding your question: for now, if you prefer, you can continue using the I/O Juggler feature. However, please keep in mind that it is planned to be deprecated and fully replaced by the Event Juggler in future firmware updates. While there’s no exact timeline known for its removal, it’s likely to happen with 7.15 or one of the following releases, so you probably have a month or two before any mandatory changes.

If your current I/O Juggler configuration is working as intended, you can stay on it. That said, it is recommended to gradually migrate your configurations to the Event Juggler when convenient to stay aligned with future updates and benefit from its extended functionality.

Best regards,

Please excuse my late reply, but it took quite a while until I had physical access to the LTE router to connect.

I have now moved all the stuff from IO-Juggler to Event-juggler.

Unfortunately, I noticed that after updating the firmware version, the script for switching off the output on restart no longer works. (The output is switched on automatically after a restart)

The script currently looks like this:

Does something have to be modified by the firmware update?

My task was to receive an SMS from the router via the Event Juggler when the output was switched (regardless of which action triggered the switching, e.g. SMS, call, etc…).
When I wanted to create the event in the Event Juggler as described by you, I can unfortunately only select io-status and not io-scheduler. Unfortunately it does not work with io-status.
Here is a screenshot of mine:

Am I doing something wrong again or is there another way?

Hello,

To which firmware version was the device updated? 7.14.2?

Could you provide the ubus call ioman.gpio.dout1 status command’s output after the reboot?

Additionally, try the following startup script:

sleep 10
/etc/init.d/ioman restart
sleep 10
ubus call ioman.gpio.dout1 update '{"value":"0"}' 

and make sure that the I/O scheduler is enabled in Input/Output → Scheduler settings:


Then it should be visible in the Event Juggler’s settings.

Let me know if this helps.

Best regards,

Thank you very much for all your support!

I can confirm that I have the firmware 7.14.2 (see screenshot)

Unfortunately I don’t understand what is meant by the sentence “ Could you provide the ubus call ioman.gpio.dout1 status command’s output after the reboot?”. Maybe it’s also because I’m partly using automatic translation as my English is not so good.
I have now changed the startup script as follows, but unfortunately it didn’t work either:

Regarding the other problem:
At the beginning I could not see the scheduler either.
( but I thought I had seen it before the firmware update)
See screenshot:

After I installed the Scheduler package, I found the scheduler. I also activated it, but unfortunately it does not yet appear as an option in the Event Juggler
See screenshot:

Do you see anything else that I have done wrong?

Hello @Automatix,

Thank you for the update. I believe, to assist you effectively, we’ll need to continue this process privately. You should find a support request form in the inbox of the email address you used for your forum registration. Kindly fill out the form, and please reference Ticket ID: 13072 when submitting it. Once the form is completed, we’ll contact you directly via email to investigate the issue in detail and help work towards a solution.

Best regards,

Thank you for the offer for private support.
I have received the e-mail and sent the support request.

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