AX1800 Sync Button Config

Model AX1800. Firmware 4.6.8, kernel 4.4.60.

I started to open this asking for help but as I started to gather info, I figured out the problem. Since I couldn't find any threads on this, I'm going to put this here to help others.

What to do: have sync button run custom script.

How to do it:

  1. Create executable (chmod +x) sh file in: /etc/gl-switch.d/. It should follow the same format as the other files in that folder. You need to define $action or it won't work. Add a logger message so you can reference your logs.
  2. Test the script: /etc/gl-switch.d/your-script.sh on
    You should see your logger output.
  3. To make the change to the button config, run:
    uci set switch-button.@main[0].func="your-script"
    uci commit switch-button
    No output should mean it worked.
  4. Test by pressing your button

Before configuring this, the logs say:
Tue Jan 14 10:35:11 2025 user.notice gl-switch: switch released
Tue Jan 14 10:35:11 2025 user.notice gl-switch: no config
Tue Jan 14 10:35:11 2025 user.notice gl-switch: switch pressed
Tue Jan 14 10:35:11 2025 user.notice gl-switch: no config

That's about it. Wish I found this post a few hours ago! :slight_smile:
If anyone notices any issues with this config, please reply!

1 Like