Update PAC Date over c-bus?

Discussion in 'C-Bus Wired Hardware' started by alexdski, Jan 30, 2022.

  1. alexdski

    alexdski

    Joined:
    May 17, 2011
    Messages:
    17
    Likes Received:
    2
    Location:
    UK
    I've just transferred an updated project from Piced to a PAC over c-bus, and the time is (on the PAC) is correct but it's set the date to 1/1/2008.

    Is it possible to update the PAC date over c-bus, is there a command I can use? It's so nice not having to go under the stairs to connect by USB, but it seems that connecting via c-bus mucks up the date.

    Thank in advance.

    Alex
     
    alexdski, Jan 30, 2022
    #1
  2. alexdski

    Graham Lamb

    Joined:
    Aug 3, 2004
    Messages:
    94
    Likes Received:
    12
    Location:
    Sydney, Australia
    If you have touch screen or DLT switch you can change the time on one of them and every thing else will follow.
     
    Graham Lamb, Jan 30, 2022
    #2
  3. alexdski

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    in the Piced Transfer menu there is a "control unit" sub-menu that allows you to set the time to the PC time. I've never tried this for a PAC over Cbus though. Let me know if it works :)
     
    Ashley, Jan 30, 2022
    #3
  4. alexdski

    alexdski

    Joined:
    May 17, 2011
    Messages:
    17
    Likes Received:
    2
    Location:
    UK
    Thanks Graham, I don't sadly - and I did see that on another post mods! :)
     
    alexdski, Jan 31, 2022
    #4
  5. alexdski

    alexdski

    Joined:
    May 17, 2011
    Messages:
    17
    Likes Received:
    2
    Location:
    UK
    Hi Ashley, unfortunately not.

    Piced connected via C-Bus (local c-gate), 'Connect to Unit' ticked.

    When I set the time on the Piced menu bar, I get the below in the log;

    24/01/2022 08:40:14 Info : Clock adjusted from 08:40:13 31/01/2022 to 08:40:14 24/01/2022

    but later on the PAC sends another Time refresh back to the wrong date/time.

    31/01/2022 08:37:58 Date/Time: Received C-Bus message to set date to 01/01/2008 (unit 19)
    31/01/2022 08:37:58 Date/Time: Received C-Bus message to set time to 09:33:44 (unit 19)

    Today I'll connect via USB and see if there is different behaviour.
     
    alexdski, Jan 31, 2022
    #5
  6. alexdski

    cmlp

    Joined:
    Feb 5, 2008
    Messages:
    32
    Likes Received:
    2
    Location:
    Melbourne, Australia.
    cmlp, Feb 1, 2022
    #6
    alexdski likes this.
  7. alexdski

    alexdski

    Joined:
    May 17, 2011
    Messages:
    17
    Likes Received:
    2
    Location:
    UK
    Perfect, thank you.

    And for the Windows users out there, you can use task scheduler to run a batch script very easily.

    Install ncat (https://nmap.org/ncat/) then create a batch scipt as below.

    @echo off
    for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
    set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
    set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%" & set "MS=%dt:~15,3%"
    set "datestamp=%YYYY%-%MM%-%DD%"
    echo CLOCK DATE //networkname/254/223 %datestamp% | ncat 127.0.0.1 20023
    quit
    quit


    If your time creeps you can use this one:

    @echo off
    for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
    set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
    set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%" & set "MS=%dt:~15,3%"
    set "datestamp=%YYYY%-%MM%-%DD%"
    set "timestamp=%HH%:%Min%:%Sec%"
    echo CLOCK TIME //networkname/254/223 %timestamp% | ncat 127.0.0.1 20023

    Thanks so much cmlp
     
    alexdski, Feb 2, 2022
    #7
    cmlp likes this.
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.