Home  >  Support  >  Support Forum  >  Using iDigi Web Services to set CP RTC date and time
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Using iDigi Web Services to set CP RTC date and time

0 votes
The following iDigi web service will read back connect port (CP) <datetime> (and other parameters):

POST:
<sci_request version="1.0">
<send_message cache="false">
<targets>
<device id="00000000-00000000-00409DFF-FFxxxxxx"/>
</targets>
<rci_request version="1.1">
<query_state>
<device_stats/>
</query_state>
</rci_request>
</send_message>
</sci_request>

RESPONSE:
<datetime>Mon Jun 23 15:03:48 2014</datetime>

Is there a web service for setting the RTC ina CP?
asked Jun 23 in Web Services by mcarangi New to the Community (1 point)

Please log in or register to answer this question.

3 Answers

0 votes
Which ConnectPort Model are you using?
answered Jul 9 by userid0 Veteran of the Digi Community (946 points)
0 votes
It appears the RCI script for the Digi CP GW I'm using, the Digi X4 Gateway, does not retrieve the RTC setting correctly in response to <device_stats> .

There may be issues with RTC update rates, or simply what is read back in response to a <device_stats> request.

For example at approx 17:30 UTC on July 9 I queried an X4 using the RCI XML script in previous post. Here is what was returned:

<datetime>Wed Jul 2 15:22:46 2014</datetime>

The X4 is running Digi FW rev 2.17. Not sure what's going on here, of course I expected current UTC time to be returned.
answered Jul 9 by mcarangi New to the Community (1 point)
0 votes
Your time looks fine. It just looks like you need to set it.

You can set it via the CLI RCI. I have just tested it with:

<sci_request version="1.0">
<send_message>
<targets>
<device id="00000000-00000000-XXXXXXXX-XXXXXXXX"/>
</targets>
<rci_request version="1.1">
<do_command target="cli">
<cli>set time time=11:06 date=07.10.14 offset=02:00</cli>
</do_command>
</rci_request>
</send_message>
</sci_request>

Things to note with the above is that you set your current time and not UTC. The UTC time will be calculated from current time minus your offset.

The other thing to remember is that the X4 does not support automatic DST. You will need to have an SNTP server or make sure you change the offset when your zone changes.
answered Jul 10 by NicholasWilson Seasoned Professional (248 points)
Contact a Digi expert and get started today! CONTACT US
...