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:
- 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$actionor it won't work. Add aloggermessage so you can reference your logs. - Test the script:
/etc/gl-switch.d/your-script.sh on
You should see yourloggeroutput. - 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. - 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! ![]()
If anyone notices any issues with this config, please reply!