├── .gitignore ├── Makefile ├── README.md ├── luasrc ├── controller │ └── athena_led.lua ├── model │ └── cbi │ │ └── athena_led │ │ └── settings.lua └── view │ └── athena_led │ └── athena_led_status.htm ├── po ├── zh-cn │ └── athena_led.po └── zh_Hans │ └── athena_led.po └── root ├── etc ├── config │ └── athena_led └── init.d │ └── athena_led └── usr └── sbin └── athena-led /.gitignore: -------------------------------------------------------------------------------- 1 | # 忽略编译生成的文件 2 | *.o 3 | *.so 4 | *.a 5 | 6 | # LuCI 的生成文件和缓存 7 | build/ 8 | bin/ 9 | .tmp/ 10 | 11 | # 忽略 OpenWrt 编译生成的安装包 12 | *.ipk 13 | *.tar.gz 14 | *.deb 15 | 16 | # 忽略临时文件和编辑器缓存 17 | *.swp 18 | *.swo 19 | *.bak 20 | *.tmp 21 | *.log 22 | .DS_Store 23 | 24 | # 忽略 Git 操作时产生的临时文件 25 | .git/ 26 | 27 | # IDE 配置文件 28 | .vscode/ 29 | .idea/ 30 | 31 | # 忽略 Makefile 生成的中间文件 32 | /feeds 33 | /staging_dir 34 | /tmp/ 35 | config.log 36 | config.status 37 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=luci-app-athena-led 4 | PKG_DEPENDS:= 5 | PKG_VERSION:=0.0.7 6 | PKG_RELEASE:=20241029 7 | 8 | LUCI_TITLE:=LuCI Support for athena-led 9 | LUCI_DEPENDS:= 10 | 11 | include $(INCLUDE_DIR)/package.mk 12 | 13 | # 包定义;指示我们的包将如何以及在哪里出现在整体配置菜单中 ('make menuconfig') 14 | define Package/$(PKG_NAME) 15 | TITLE:=$(PKG_NAME) 16 | endef 17 | 18 | # Package description; a more verbose description on what our package does 19 | define Package/$(PKG_NAME)/description 20 | LuCI support for athenaLed 21 | endef 22 | 23 | 24 | define Package/$(PKG_NAME)/install 25 | $(INSTALL_DIR) $(1)/usr/lib/lua/luci 26 | cp -pR ./luasrc/* $(1)/usr/lib/lua/luci 27 | $(INSTALL_DIR) $(1)/ 28 | cp -pR ./root/* $(1)/ 29 | endef 30 | 31 | define Package/$(PKG_NAME)/postinst 32 | #!/bin/sh 33 | chmod +x /usr/sbin/athena-led 34 | chmod +x /etc/init.d/athena_led 35 | exit 0 36 | endef 37 | 38 | include $(TOPDIR)/feeds/luci/luci.mk 39 | 40 | # This command is always the last, it uses the definitions and variables we give above in order to get the job done 41 | $(eval $(call BuildPackage,$(PKG_NAME))) 42 | 43 | 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # luci-app-athena-led 2 | jdCloud ax6600 led screen ctrl 3 | 4 | #### 定时关闭开启代码 5 | 6 | ``` 7 | # 早上9点30开启显示 8 | 30 9 * * * uci set athena_led.config.enable='1' && uci commit athena_led && /etc/init.d/athena_led reload 9 | # 下午6点30关闭显示 10 | 30 18 * * * uci set athena_led.config.enable='0' && uci commit athena_led && /etc/init.d/athena_led reload 11 | ``` 12 | 13 | [推荐固件下载地址](https://github.com/VIKINGYFY/OpenWRT-CI/releases) 14 | 15 | 16 | ![image](https://github.com/user-attachments/assets/a2bcf6af-4e29-49d4-b183-799f68b74efb) 17 | 18 | 19 | 20 | 感谢以下朋友的捐赠 21 | 1. *姆 22 | -------------------------------------------------------------------------------- /luasrc/controller/athena_led.lua: -------------------------------------------------------------------------------- 1 | module("luci.controller.athena_led", package.seeall) 2 | 3 | function index() 4 | if not nixio.fs.access("/etc/config/athena_led") then 5 | return 6 | end 7 | entry({ "admin", "system", "athena_led" }, firstchild(), _("Athena LED Ctrl"), 80).dependent = false 8 | entry({ "admin", "system", "athena_led", "general" }, cbi("athena_led/settings"), _("Base Setting"), 1) 9 | 10 | entry({ "admin", "system", "athena_led", "status" }, call("act_status")) 11 | end 12 | 13 | function act_status() 14 | local e = {} 15 | e.running = luci.sys.call("pgrep /usr/sbin/athena-led >/dev/null") == 0 16 | luci.http.prepare_content("application/json") 17 | luci.http.write_json(e) 18 | end -------------------------------------------------------------------------------- /luasrc/model/cbi/athena_led/settings.lua: -------------------------------------------------------------------------------- 1 | m = Map("athena_led", translate("Athena led Ctrl"), translate("JDCloud AX6600 LED Screen Ctrl")) 2 | 3 | m:section(SimpleSection).template = "athena_led/athena_led_status" 4 | 5 | s = m:section(TypedSection, "athena_led") 6 | s.addremove = false 7 | s.anonymous = true 8 | 9 | enable = s:option(Flag, "enable", translate("Enabled")) 10 | enable.rmempty = false 11 | 12 | seconds = s:option(ListValue, "seconds", translate("Display interval time")) 13 | seconds.default = "5" 14 | seconds.rmempty = false 15 | seconds:value("1") 16 | seconds:value("2") 17 | seconds:value("3") 18 | seconds:value("4") 19 | seconds:value("5") 20 | seconds.description = translate("Enable carousel display and set interval time in seconds") 21 | 22 | seconds = s:option(ListValue, "lightLevel", translate("Display light level")) 23 | seconds.default = "5" 24 | seconds.rmempty = false 25 | seconds:value("0") 26 | seconds:value("1") 27 | seconds:value("2") 28 | seconds:value("3") 29 | seconds:value("4") 30 | seconds:value("5") 31 | seconds:value("6") 32 | seconds:value("7") 33 | seconds.description = translate("Display light level desc") 34 | 35 | status = s:option(MultiValue, "status", translate("side led status")) 36 | status.default = "" 37 | status.rmempty = true 38 | status:value("time", translate("status time")) 39 | status:value("medal", translate("status medal")) 40 | status:value("upload", translate("status upload")) 41 | status:value("download", translate("status download")) 42 | status.description = translate("side led status desc") 43 | 44 | type = s:option(MultiValue, "option", translate("Display Type")) 45 | type.default = "date timeBlink" 46 | type.rmempty = false 47 | type:value("date", translate("Display Type Date")) 48 | type:value("time", translate("Display Type Time")) 49 | type:value("timeBlink", translate("Display Type Time Blink")) 50 | type:value("temp", translate("Display Type temp")) 51 | type:value("string", translate("Display Type String")) 52 | type:value("getByUrl", translate("Display Type getByUrl")) 53 | type.description = translate("Specify comma-separated values for option") 54 | 55 | customValue = s:option(Value, "value", translate("Custom Value")) 56 | customValue.default = "abcdefghijklmnopqrstuvwxyz0123456789+-*/=.::℃" 57 | customValue.rmempty = false 58 | customValue.placeholder = translate("Enter your message here") 59 | customValue.description = translate("Set the custom message to display on the LED screen, Only effective on 'Display Type String'") 60 | 61 | url = s:option(Value, "url", translate("api url for get content")) 62 | url.default = "http://www.baidu.com" 63 | url.rmempty = false 64 | url.placeholder = translate("Enter your api url here") 65 | url.description = translate("api url for get content des") 66 | 67 | tempFlag = s:option(MultiValue, "tempFlag", translate("tempFlag")) 68 | tempFlag.default = "4" 69 | tempFlag.rmempty = false 70 | tempFlag:value("0", translate("nss-top")) 71 | tempFlag:value("1", translate("nss")) 72 | tempFlag:value("2", translate("wcss-phya0")) 73 | tempFlag:value("3", translate("wcss-phya1")) 74 | tempFlag:value("4", translate("cpu")) 75 | tempFlag:value("5", translate("lpass")) 76 | tempFlag:value("6", translate("ddrss")) 77 | tempFlag.description = translate("Set the item display on the LED screen, Only effective on 'Display Type temp'") 78 | 79 | function m.on_after_commit(self) 80 | local output = luci.util.exec("/etc/init.d/athena_led reload >/dev/null 2>&1") 81 | luci.util.exec("logger '" .. output .. "'") 82 | end 83 | 84 | return m 85 | -------------------------------------------------------------------------------- /luasrc/view/athena_led/athena_led_status.htm: -------------------------------------------------------------------------------- 1 | 17 | 21 |
22 |

23 | <%:Collecting data...%> 24 |

25 |
26 | -------------------------------------------------------------------------------- /po/zh-cn/athena_led.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "athena_led" 5 | msgstr "athena_led" 6 | 7 | msgid "Base Setting" 8 | msgstr "设置" 9 | 10 | msgid "Gift" 11 | msgstr "赞赏" 12 | 13 | msgid "Athena LED Ctrl" 14 | msgstr "雅典娜 LED 屏幕控制" 15 | 16 | msgid "JDCloud AX6600 LED Screen Ctrl" 17 | msgstr "京东云 AX6600 LED 屏幕控制" 18 | 19 | msgid "Enabled" 20 | msgstr "启用" 21 | 22 | msgid "Display interval time" 23 | msgstr "刷新时间" 24 | 25 | msgid "Enable carousel display and set interval time in seconds" 26 | msgstr "刷新时间" 27 | 28 | msgid "Display light level" 29 | msgstr "显示亮度调整" 30 | 31 | msgid "Display light level desc" 32 | msgstr "显示亮度调整,数字越大越亮" 33 | 34 | msgid "side led status" 35 | msgstr "侧边状态灯" 36 | 37 | msgid "status time" 38 | msgstr "时间" 39 | 40 | msgid "status medal" 41 | msgstr "奖牌" 42 | 43 | msgid "status upload" 44 | msgstr "上传" 45 | 46 | msgid "status download" 47 | msgstr "下载" 48 | 49 | msgid "side led status desc" 50 | msgstr "设置侧边状态灯" 51 | 52 | 53 | msgid "Display Type" 54 | msgstr "显示模式" 55 | 56 | msgid "Display Type Date" 57 | msgstr "日期" 58 | 59 | msgid "Display Type Time" 60 | msgstr "时间" 61 | 62 | msgid "Display Type Time Blink" 63 | msgstr "时间-闪烁" 64 | 65 | msgid "Display Type temp" 66 | msgstr "温度" 67 | 68 | msgid "Display Type String" 69 | msgstr "自定义文本" 70 | 71 | msgid "Display Type getByUrl" 72 | msgstr "远程文本" 73 | 74 | 75 | msgid "Specify comma-separated values for option" 76 | msgstr "显示模式" 77 | 78 | msgid "Custom Value" 79 | msgstr "自定义文本" 80 | 81 | msgid "Enter your message here" 82 | msgstr "输入你的自定义内容" 83 | 84 | msgid "Set the custom message to display on the LED screen, Only effective on 'Display Type String'" 85 | msgstr "设置显示在led屏幕上的自定义内容,选中'自定义文本'显示模式生效" 86 | 87 | msgid "api url for get content" 88 | msgstr "通过 http/get 请求获取显示内容" 89 | 90 | msgid "Enter your api url here" 91 | msgstr "在此处输入你的接口地址" 92 | 93 | msgid "api url for get content des" 94 | msgstr "通过 http/get 请求获取显示内容,选中'远程文本'显示模式生效" 95 | 96 | msgid "All features are free, and tipping is just to buy me a coffee." 97 | msgstr "所有功能都免费,打赏只是为了请我喝咖啡" 98 | 99 | msgid "tempFlag" 100 | msgstr "温度选项" 101 | 102 | msgid "nss-top" 103 | msgstr "网络子系统nss-top" 104 | 105 | msgid "nss" 106 | msgstr "网络子系统nss" 107 | 108 | msgid "wcss-phya0" 109 | msgstr "无线控制子系统-物理0" 110 | 111 | msgid "wcss-phya1" 112 | msgstr "无线控制子系统-物理1" 113 | 114 | msgid "cpu" 115 | msgstr "中央处理器cpu" 116 | 117 | msgid "lpass" 118 | msgstr "lpass" 119 | 120 | msgid "ddrss" 121 | msgstr "内存子系统ddr" 122 | 123 | msgid "Set the item display on the LED screen, Only effective on 'Display Type temp'" 124 | msgstr "设置显示在led屏幕上的温度,选中'温度'显示模式生效" -------------------------------------------------------------------------------- /po/zh_Hans/athena_led.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "Content-Type: text/plain; charset=UTF-8" 3 | 4 | msgid "athena_led" 5 | msgstr "athena_led" 6 | 7 | msgid "Base Setting" 8 | msgstr "设置" 9 | 10 | msgid "Gift" 11 | msgstr "赞赏" 12 | 13 | msgid "Athena LED Ctrl" 14 | msgstr "雅典娜 LED 屏幕控制" 15 | 16 | msgid "JDCloud AX6600 LED Screen Ctrl" 17 | msgstr "京东云 AX6600 LED 屏幕控制" 18 | 19 | msgid "Enabled" 20 | msgstr "启用" 21 | 22 | msgid "Display interval time" 23 | msgstr "刷新时间" 24 | 25 | msgid "Enable carousel display and set interval time in seconds" 26 | msgstr "刷新时间" 27 | 28 | msgid "Display light level" 29 | msgstr "显示亮度调整" 30 | 31 | msgid "Display light level desc" 32 | msgstr "显示亮度调整,数字越大越亮" 33 | 34 | msgid "side led status" 35 | msgstr "侧边状态灯" 36 | 37 | msgid "status time" 38 | msgstr "时间" 39 | 40 | msgid "status medal" 41 | msgstr "奖牌" 42 | 43 | msgid "status upload" 44 | msgstr "上传" 45 | 46 | msgid "status download" 47 | msgstr "下载" 48 | 49 | msgid "side led status desc" 50 | msgstr "设置侧边状态灯" 51 | 52 | 53 | msgid "Display Type" 54 | msgstr "显示模式" 55 | 56 | msgid "Display Type Date" 57 | msgstr "日期" 58 | 59 | msgid "Display Type Time" 60 | msgstr "时间" 61 | 62 | msgid "Display Type Time Blink" 63 | msgstr "时间-闪烁" 64 | 65 | msgid "Display Type temp" 66 | msgstr "温度" 67 | 68 | msgid "Display Type String" 69 | msgstr "自定义文本" 70 | 71 | msgid "Display Type getByUrl" 72 | msgstr "远程文本" 73 | 74 | 75 | msgid "Specify comma-separated values for option" 76 | msgstr "显示模式" 77 | 78 | msgid "Custom Value" 79 | msgstr "自定义文本" 80 | 81 | msgid "Enter your message here" 82 | msgstr "输入你的自定义内容" 83 | 84 | msgid "Set the custom message to display on the LED screen, Only effective on 'Display Type String'" 85 | msgstr "设置显示在led屏幕上的自定义内容,选中'自定义文本'显示模式生效" 86 | 87 | msgid "api url for get content" 88 | msgstr "通过 http/get 请求获取显示内容" 89 | 90 | msgid "Enter your api url here" 91 | msgstr "在此处输入你的接口地址" 92 | 93 | msgid "api url for get content des" 94 | msgstr "通过 http/get 请求获取显示内容,选中'远程文本'显示模式生效" 95 | 96 | msgid "All features are free, and tipping is just to buy me a coffee." 97 | msgstr "所有功能都免费,打赏只是为了请我喝咖啡" 98 | 99 | msgid "tempFlag" 100 | msgstr "温度选项" 101 | 102 | msgid "nss-top" 103 | msgstr "网络子系统nss-top" 104 | 105 | msgid "nss" 106 | msgstr "网络子系统nss" 107 | 108 | msgid "wcss-phya0" 109 | msgstr "无线控制子系统-物理0" 110 | 111 | msgid "wcss-phya1" 112 | msgstr "无线控制子系统-物理1" 113 | 114 | msgid "cpu" 115 | msgstr "中央处理器cpu" 116 | 117 | msgid "lpass" 118 | msgstr "lpass" 119 | 120 | msgid "ddrss" 121 | msgstr "内存子系统ddr" 122 | 123 | msgid "Set the item display on the LED screen, Only effective on 'Display Type temp'" 124 | msgstr "设置显示在led屏幕上的温度,选中'温度'显示模式生效" -------------------------------------------------------------------------------- /root/etc/config/athena_led: -------------------------------------------------------------------------------- 1 | config athena_led 'config' 2 | option enable '1' 3 | option status ' ' 4 | option seconds '5' 5 | option lightLevel '5' 6 | option option 'date timeBlink' 7 | option value 'abcdefghijklmnopqrstuvwxyz0123456789+-*/=.::℃' 8 | option url 'https://www.baidu.com' 9 | option tempFlag '4' 10 | -------------------------------------------------------------------------------- /root/etc/init.d/athena_led: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | 3 | START=99 4 | STOP=99 5 | USE_PROCD=1 6 | PROG=/usr/sbin/athena-led 7 | 8 | start_service() { 9 | config_load 'athena_led' 10 | local cfg='config' 11 | 12 | config_get_bool enabled "$cfg" 'enable' '0' 13 | if [ "$enabled" -eq 0 ]; then 14 | logger "athena-led Service is disabled, not starting" 15 | return 1 16 | fi 17 | 18 | local status seconds lightLevel option value 19 | config_get status $cfg 'status' ' ' 20 | config_get seconds $cfg 'seconds' '5' 21 | config_get lightLevel $cfg 'lightLevel' '5' 22 | config_get option $cfg 'option' 'date timeBlink' 23 | config_get value $cfg 'value' 'abcdefghijklmnopqrstuvwxyz0123456789+-*/=.::℃' 24 | config_get url $cfg 'url' 'https://www.baidu.com' 25 | config_get tempFlag $cfg 'tempFlag' '4' 26 | 27 | procd_open_instance 28 | procd_set_param command $PROG -status "${status}" -seconds "${seconds}" -lightLevel "${lightLevel}" -option "${option}" -value "${value}" -url "${url}" -tempFlag "${tempFlag}" 29 | procd_set_param respawn 30 | procd_close_instance 31 | 32 | } 33 | 34 | service_triggers(){ 35 | procd_add_reload_trigger "athena_led" 36 | } 37 | 38 | reload_service() 39 | { 40 | stop 41 | start 42 | } 43 | -------------------------------------------------------------------------------- /root/usr/sbin/athena-led: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NONGFAH/luci-app-athena-led/f8eeb3119008ac0e429fc642c125512f9253ec1b/root/usr/sbin/athena-led --------------------------------------------------------------------------------