logo elektroda
logo elektroda
X
logo elektroda

Flashed 16A Smart Switch: OpenBeken NTP Server Connection & Time Sync Issues (addClockEvent)

patentjyp 3363 11
ADVERTISEMENT
  • #1 20489309
    patentjyp
    Level 5  
    I flashed 16A smart switch according to the guide here:

    https://www.elektroda.com/rtvforum/topic3912748.html

    The switch is working fine but I need to use the command "addClockEvent".

    Therefore, I added this to my autoexec.bat.

    startDriver ntp
    ntp_setServer 0.kr.pool.ntp.org
    ntp_timeZoneOfs 9:00

    However, I do not think the relay has the correct time because the relay cannot connect to NTP servers.

    Log repeatedly shows the next line

    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg

    I tried different NTP servers but I got the same result.

    UI shows "NTP: Syncing with 0.kr.pool.ntp.org...." like below.

    Flashed 16A Smart Switch: OpenBeken NTP Server Connection & Time Sync Issues (addClockEvent)

    I tired the command "addClockEvent" and the relay would not turn on or off at the specified time.

    I think this is because the relay cannot sync with the NTP servers. Therefore, I have to figure out the time stored in the relay.

    Tasmota has the command "time" and the current time will be shown on the console when the command is issued.

    Is there any command or way to see the time or manually set the time?

    I went through the date command list but I could not find any.

    Any help is appreciated.
  • ADVERTISEMENT
  • #2 20489357
    p.kaczmarek2
    Moderator Smart Home
    Hello, have you tried putting IP instead of hostname?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20489448
    patentjyp
    Level 5  
    IP address works!

    I have another question.

    I used the commands below to change the label of UI button.

    startDriver cmd_channels
    SetChannelLabel 1 Power

    However, while the button still has "Toggle", so it is now "Toggle Power".

    Is there any way to remove "Toggle" from the UI buttons?
  • #4 20489567
    p.kaczmarek2
    Moderator Smart Home
    Well, right now not... but I can add a flag for that for you... some kind of a simple setting, wait...

    btw what is "cmd_channels"? I don't think anything like that exists.

    Added after 1 [hours] 7 [minutes]:

    @patentjyp I have added ability to hide "Toggle "prefix from button per your request.
    Please see updated docs for usage:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
    Please search for "SetChannelLabel ". Of course, you must first update your firmware.
    Helpful post? Buy me a coffee.
  • #5 20490233
    patentjyp
    Level 5  
    It works! No "Toggle"

    Thank you again!!!
  • #6 20490282
    p.kaczmarek2
    Moderator Smart Home
    It was a pleasure to help you. Is there anything else I can help with, or maybe do you have any other suggestions for console commands and/or fixes?
    Helpful post? Buy me a coffee.
  • #7 20563425
    rakalexei
    Level 8  
    @p.kaczmarek2

    Hi, I have the same issue, I have two smart switches, and on both, I turned on the NTP driver, but one switch is connected to NTP, another one doesn't

    Here is the result from 1 switch - NTP (): Local Time: 2023/05/02 14:50:07
    here is from 2 switch - NTP: Syncing with 217.147.223.78....

    I tried to change the server to another IP address (91.210.190.13) but the result is the same, it doesn't work.

    Some logs from 2 switch

    Info:MAIN:Started NTP.
    Info:NTP:NTP offset set, wait for next ntp packet to apply changes
    ...........
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
  • ADVERTISEMENT
  • #8 20563434
    p.kaczmarek2
    Moderator Smart Home
    NTP will retry automatically after 60 seconds. Are you trying to say it fails every time?
    Helpful post? Buy me a coffee.
  • #9 20563491
    rakalexei
    Level 8  
    Yes, every time, it never connects. But another switch is connected ok.

    Flashed 16A Smart Switch: OpenBeken NTP Server Connection & Time Sync Issues (addClockEvent) Flashed 16A Smart Switch: OpenBeken NTP Server Connection & Time Sync Issues (addClockEvent) Flashed 16A Smart Switch: OpenBeken NTP Server Connection & Time Sync Issues (addClockEvent) Flashed 16A Smart Switch: OpenBeken NTP Server Connection & Time Sync Issues (addClockEvent)
  • #10 20563504
    p.kaczmarek2
    Moderator Smart Home
    Ok, please remove startDriver NTP from the problematic switch, reboot it, make sure that NTP is not running, wait 60 seconds, and then in console type manually startDriver NTP and tell me if it works for you in that way.
    Helpful post? Buy me a coffee.
  • #11 20563509
    rakalexei
    Level 8  
    Yes, it works now. Then I added it back to autoexec.bat and it's working well.

    Thank you very much!
  • ADVERTISEMENT
  • #12 20563552
    p.kaczmarek2
    Moderator Smart Home
    Wait! But we did basically nothing and it works for you now? It must have been a fluke, maybe a temporary network issue.

    I was going to suggest that, if it works with a delay, you could use:
    
    addRepeatingEvent 10 1 startDriver NTP

    to start NTP with a delay... but I don't think this should be needed.
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around issues with a flashed 16A smart switch regarding NTP server connection and time synchronization. The user initially faced problems with the command "addClockEvent" due to the relay's inability to connect to NTP servers, resulting in repeated log errors. A suggestion to use an IP address instead of a hostname for the NTP server proved successful. Another user reported similar issues with two smart switches, where one connected to NTP while the other did not. After troubleshooting steps, including removing and re-adding the NTP driver, the problematic switch successfully connected. The conversation also touched on modifying UI button labels and the addition of a feature to hide the "Toggle" prefix from button labels.
Summary generated by the language model.
ADVERTISEMENT