Ansuel / tch-nginx-gui

Modified file to apply to a stock technicolor GUI
GNU General Public License v3.0
346 stars 52 forks source link

WIFI Time of day wireless control #730

Open skifatterunz opened 5 years ago

skifatterunz commented 5 years ago

Device Model: TG789vac v2 (AGTOT) Gui Version: 9.2.56 Description of problem: Wireless Time Control doesn't work

How to reproduce (if possible): I try to set wifi schedule (from off to on or viceversa) but nothing happens. I fount tod file in etc/config in attachments with a test schedule. tod.txt and the same set in GUI. I found in this post : https://www.ilpuntotecnico.com/forum/index.php/topic,78585.msg242229.html#msg242229 a user with same problem. I try to apply his solution (with doubt about list activedaytime 'timer[code]:Sat:08:30' syntax) bau nothing to do!

Media/Photos (if possible): screen

Ansuel commented 5 years ago

do one thing...

remove the rule. add the rule again and post here a logread

skifatterunz commented 5 years ago

made... removed rule tod file content is

config tod 'global' option enabled '1' option tod_enabled '1' option tracelevel '4' option time_change_monfreq '10'

added new rule @23lug19 20:57:00, the log is

Tue Jul 23 20:57:00 2019 cron.info crond[2118]: USER root pid 5249 cmd /sbin/trafficdata.lua Tue Jul 23 20:57:03 2019 daemon.info transformer[2842]: async run: /etc/init.d/firewall reload; /etc/init.d/tod restart Tue Jul 23 20:57:09 2019 daemon.warn [5424]: use tch.logger Tue Jul 23 20:57:12 2019 daemon.err odhcp6c[785]: Failed to send DHCPV6 message to ff02::1:2 (Operation not permitted) Tue Jul 23 20:57:17 2019 daemon.notice [2203]: [mobiled] (WaitingForDevice) runs WaitingForDevice-Main.check(timeout, 1)

and the new tod file content is config tod 'global' option enabled '1' option tod_enabled '1' option tracelevel '4' option time_change_monfreq '10'

config action 'action7C4D7FED9BD6C7968CE2C82F48CF4E55' list timers 'timer7C4D7FED9BD6C7968CE2C82F48CF4E55' option object 'wifitod.wifitod_7C4D7FED9BD6C7968CE2C82F48CF4E55' option script 'wifitodscript' option enabled '1'

config timer 'timer7C4D7FED9BD6C7968CE2C82F48CF4E55' option start_time 'Tue,Wed,Thu:21:00' option stop_time 'Tue,Wed,Thu:21:06'

config wifitod 'wifitod_7C4D7FED9BD6C7968CE2C82F48CF4E55' list ap 'ap0_7C4D7FED9BD6C7968CE2C82F48CF4E55' list ap 'ap1_7C4D7FED9BD6C7968CE2C82F48CF4E55'

config ap 'ap0_7C4D7FED9BD6C7968CE2C82F48CF4E55' option state '1' option ap 'ap0'

config ap 'ap1_7C4D7FED9BD6C7968CE2C82F48CF4E55' option state '1' option ap 'ap1'

NOTE the rule was made with wifi previously set to ON manually, press right button on the router for 5 secs @ 21:00 log says Jul 23 21:00:10 daemon.notice [5424] [timeofday] update time, still in the same time slot: action7C4D7FED9BD6C7968CE2C82F48CF4E55.timer7C4D7FED9BD6C7968CE2C82F48CF4E55 Tue:21:00-Tue:21:06
Jul 23 21:00:00 daemon.notice [5424] [timeofday] (action7C4D7FED9BD6C7968CE2C82F48CF4E55) runs wifitodscript.start(wifitod.wifitod_7C4D7FED9BD6C7968CE2C82F48CF4E55)

@ 21:06 log says Tue Jul 23 21:06:00 2019 daemon.notice [5424]: [timeofday] (action7C4D7FED9BD6C7968CE2C82F48CF4E55) runs wifitodscript.stop(wifitod.wifitod_7C4D7FED9BD6C7968CE2C82F48CF4E55) Tue Jul 23 21:06:00 2019 cron.info crond[2118]: USER root pid 5670 cmd /sbin/trafficdata.lua

But WIFI don't turn OFF

nutterthanos commented 5 years ago

So it did not even run the wifionoff.sh script or whatever it’s called? Edit: it did not turn off the wifi unless you say to turn off all access points that are on. It’s supposed to do a ubus:send("wifitod", { event = "wifi_off_tod_scheduler_start" }} Edit: Try latest dev now they are trying to fix it or they might have.

Ansuel commented 5 years ago

Think you should try latest dev

Il Mer 24 Lug 2019, 09:32 nutterthanos notifications@github.com ha scritto:

So it did not even run the wifionoff.sh script or whatever it’s called?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ansuel/tch-nginx-gui/issues/730?email_source=notifications&email_token=AE2ZMQSGPA3JNFQ2UIGXBFTQBAAR7A5CNFSM4IFTBFV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2VOG5Y#issuecomment-514515831, or mute the thread https://github.com/notifications/unsubscribe-auth/AE2ZMQS2U7SGCZEIOMA5GQTQBAAR7ANCNFSM4IFTBFVQ .

skifatterunz commented 5 years ago

Installed 9.3.11 version. Set wifi off from web interface for 2.4 and 5GHz (guest wifi always off) Delete old rule, this in tod file

config tod 'global' option enabled '1' option tod_enabled '1' option tracelevel '4' option time_change_monfreq '10'

config tod 'voicednd' option ringing 'off' option timerandactionmodified '0' option enabled '1'

@18:48:00 save new rule (don't close the dialog mask), this the log and the tod file created

Wed Jul 24 18:48:00 2019 cron.info crond[2118]: USER root pid 13773 cmd /sbin/trafficdata.lua Wed Jul 24 18:48:03 2019 daemon.info transformer[12186]: async run: /etc/init.d/firewall reload; /etc/init.d/tod restart Wed Jul 24 18:48:10 2019 daemon.warn [13950]: use tch.logger Wed Jul 24 18:48:34 2019 daemon.info odhcpd[3037]: Using a RA lifetime of 0 seconds on br-lan

config tod 'global' option enabled '1' option tod_enabled '1' option tracelevel '4' option time_change_monfreq '10'`

config tod 'voicednd' option ringing 'off' option timerandactionmodified '0' option enabled '1'

config action 'action62E0D91C419B2BA0E0DC4E16DEEEAAA9' option script 'wifitodscript' list timers 'timer62E0D91C419B2BA0E0DC4E16DEEEAAA9' option enabled '1' option object 'wifitod.wifitod_62E0D91C419B2BA0E0DC4E16DEEEAAA9' list activedaytime 'timer62E0D91C419B2BA0E0DC4E16DEEEAAA9:Wed:18:49'

config timer 'timer62E0D91C419B2BA0E0DC4E16DEEEAAA9' option stop_time 'Mon,Tue,Wed,Thu,Fri,Sat:18:51' option start_time 'Mon,Tue,Wed,Thu,Fri,Sat:18:49'

config wifitod 'wifitod_62E0D91C419B2BA0E0DC4E16DEEEAAA9' list ap 'ap0_62E0D91C419B2BA0E0DC4E16DEEEAAA9' list ap 'ap1_62E0D91C419B2BA0E0DC4E16DEEEAAA9'

config ap 'ap0_62E0D91C419B2BA0E0DC4E16DEEEAAA9' option state '1' option ap 'ap0' option action62E0D91C419B2BA0E0DC4E16DEEEAAA9_orig_state '0'

config ap 'ap1_62E0D91C419B2BA0E0DC4E16DEEEAAA9' option ap 'ap1' option state '1' option action62E0D91C419B2BA0E0DC4E16DEEEAAA9_orig_state '0'

Nothing happens, wifi led's remain in off. In the txt file in attachments, log from 18:49 to 18:51 -too much long to paste here- logfile.txt

Ansuel commented 5 years ago

any news?

skifatterunz commented 5 years ago

Misunderstandig?? I think that my last post was helpful... I try some tests today, conclusion: it works, but need to have wifi ON and schedule when I want set wifi to OFF, otherwise it doesn't work. Example1: 9:00 PM, wifi ON (2.4 or 5 GHz or both), I schedule OFF from 9:05 to 9:10. For five minutes wifi go to OFF. Example2: wifi schedule OFF from 9:05 to 9:30, it's 9:10 now. I modify schedule set OFF from 9:05 and 9:09 and save. After few seconds, wifi turns ON. Example3: 9:00 PM, wifi OFF (2.4 or 5 GHz or both), I schedule ON from 9:05 to 9:10. Nothing happens, wifi remain to OFF. I set some schedule to turn OFF wifi (eg. from 2PM to 5PM) and monitoring signal presence, it works... Final correction, if possibile run it in the opposite way :-)

Off topic: we are both italians, it's mandatory to write in english on GitHub?

EDIT: version is 9.3.11, does not seem that you has modified the issue after this.

Ansuel commented 5 years ago

Diciamo che sarebbe meglio parlare in inglese ma se aiuta a risolvere il problema è concesso

Il Lun 5 Ago 2019, 21:44 skifatterunz notifications@github.com ha scritto:

Misunderstandig?? I think that my last post was helpful... I try some tests today, conclusion: it works, but need to have wifi ON and schedule when I want set wifi to OFF, otherwise it doesn't work. Example1: 9:00 PM, wifi ON (2.4 or 5 GHz or both), I schedule OFF from 9:05 to 9:10. For five minutes wifi go to OFF. Example2: wifi schedule OFF from 9:05 to 9:30, it's 9:10 now. I modify schedule set OFF from 9:05 and 9:09 and save. After few seconds, wifi turns ON. Example3: 9:00 PM, wifi OFF (2.4 or 5 GHz or both), I schedule ON from 9:05 to 9:10. Nothing happens, wifi remain to OFF. I set some schedule to turn OFF wifi (eg. from 2PM to 5PM) and monitoring signal presence, it works... Final correction, if possibile run it in the opposite way :-)

Off topic: we are both italians, it's mandatory to write in english on GitHub?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ansuel/tch-nginx-gui/issues/730?email_source=notifications&email_token=AE2ZMQXWFUKHUOLO6L43VLDQDB7LJA5CNFSM4IFTBFV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3S3YLI#issuecomment-518372397, or mute the thread https://github.com/notifications/unsubscribe-auth/AE2ZMQSHYHAZVQSKEPICYZDQDB7LJANCNFSM4IFTBFVQ .

skifatterunz commented 5 years ago

ok, i risultati dei test in inglese, il resto in italiano... :-D sono stato chiaro nell'esposizione? ti serve altro per risolvere?

skifatterunz commented 5 years ago

@Ansuel: installed 9.3.77, quick test, no change from my one week old post. Now, i'm in holiday, AFK and AFR. For tests, I must wait until september 1st. Bye!

Ansuel commented 5 years ago

I'm also on holiday sorry... We will fix this when you come back... Ok?

Il Lun 12 Ago 2019, 22:39 skifatterunz notifications@github.com ha scritto:

@Ansuel https://github.com/Ansuel: installed 9.3.77, quick test, no change from my one week old post. Now, i'm in holiday, AFK and AFR. For tests, I must wait until september 1st. Bye!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Ansuel/tch-nginx-gui/issues/730?email_source=notifications&email_token=AE2ZMQXOWO2XCSRKOTSVSXTQEHDBRA5CNFSM4IFTBFV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4DYHZY#issuecomment-520586215, or mute the thread https://github.com/notifications/unsubscribe-auth/AE2ZMQVOEWWT4HZ5H6DIBPLQEHDBRANCNFSM4IFTBFVQ .

skifatterunz commented 5 years ago

Ok, no problem. Enjoy your holiday!

FrancYescO commented 5 years ago

posto questo errore che potrebbe essere utile per futuro debug Wed Aug 14 13:05:45 2019 daemon.err nginx: 2019/08/14 13:05:45 [error] 29504#0: *38 lua entry thread aborted: runtime error: [string "/modals/tod_wireless-modal.lp"]:204: bad argument #1 to 'pairs' (table expected, got nil) stack traceback: coroutine 0: [C]: in function 'pairs' [string "/modals/tod_wireless-modal.lp"]:204: in function 'onAdd' [string "/modals/tod_wireless-modal.lp"]:263: in function 'onModify' [string "/modals/tod_wireless-modal.lp"]:316: in function 'content' /usr/lib/lua/web/web.lua:264: in function 'process' content_by_lua(nginx.conf:109):4: in function <content_by_lua(nginx.conf:109):1>, client: 192.168.1.253, server: localhost, request: "POST /modals/tod_wireless-modal.lp HTTP/1.1", host: "192.168.1.1", referrer: "http://192.168.1.1/"

Ansuel commented 5 years ago

Hello... news on this?

skifatterunz commented 5 years ago

Sorry Ansuel, away from home because (a lot) of work, upgraded now at 9.4.70 stable, seems doesn't work on "normal" mode (wifi OFF and schedule start and stop time to switch ON). Tommorrow try more detailed tests.

skifatterunz commented 5 years ago

So, the wifi in active (ON), I erase all rule, this is the tod files after this

config tod 'global' option enabled '1' option tod_enabled '1' option tracelevel '4' option time_change_monfreq '10'

config tod 'voicednd' option ringing 'off' option timerandactionmodified '0' option enabled '1'

config ap 'ap1_79E5B3D82051AD23DFFEC09BEC31D277' option state '0' option ap 'ap1'

config ap 'ap2_79E5B3D82051AD23DFFEC09BEC31D277' option ap 'ap2' option state '0'

config ap 'ap1_1186774A740E10DE6F8D668D3890E07B' option ap 'ap1' option state '1' option action1186774A740E10DE6F8D668D3890E07B_orig_state '1'

@20.36 config the rule 28.38 ON, 20.40 OFF

config action 'action2D2D188C8AE5FC8AE181BD157CAEB59A' option script 'wifitodscript' option object 'wifitod.wifitod_2D2D188C8AE5FC8AE181BD157CAEB59A' list timers 'timer2D2D188C8AE5FC8AE181BD157CAEB59A' option enabled '1'

config timer 'timer2D2D188C8AE5FC8AE181BD157CAEB59A' option start_time 'Mon,Tue,Wed,Thu,Fri:20:38' option stop_time 'Mon,Tue,Wed,Thu,Fri:20:40'

config wifitod 'wifitod_2D2D188C8AE5FC8AE181BD157CAEB59A' list ap 'ap0_2D2D188C8AE5FC8AE181BD157CAEB59A'

config ap 'ap0_2D2D188C8AE5FC8AE181BD157CAEB59A' option state '1' option ap 'ap0'

@20.40 wifi DON'T turn off

@20.41, I try to modify rule 20.38 ON, 20.43 OFF, but wifi remain ON after 20.43

I try also the rule 20.45-20.46 OFF and the rule 20.46-20.48 ON (two rules) The first rule works, wifi OFF for a minute, the second doesn't works, wify remain on after 20.48.

Ansuel commented 5 years ago

will try this night? can you test more?

skifatterunz commented 5 years ago

Ansuel, after 21.30 bat i can't upgrade router to last dev release

skifatterunz commented 5 years ago

update to 9.4.86 dev version erase all rules

21.53 turn off wifi manually config the rule 21.54 ON, 21.56 OFF (in tod01.txt the rule) nothing happens (wifi remains off)

@ 21.59, retry with 22.01 ON, 22.02 OFF nothing happens (wifi remains off)

@22.03 turn on wifi manually rule 22.04 ON, 22.06 OFF nothing happens (wifi remains on)

in tod02.txt the last two rules

please note, all tests refer to wifi 2.4Ghz AP. 5Ghz AP and guest AP are always off.

no other tests now in my mind... other test tomorrow night

tod01.txt tod02.txt