Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Controller script to respond time request by node

Controller script to respond time request by node 1 year 10 months ago #2272

  • vickeyhort
  • vickeyhort's Avatar
  • Offline
  • Junior Member
  • Posts: 24
  • Thank you received: 2
  • Karma: 0
Hi Friends

May someone helps me to write an automation code for following needs.

If some sensor node request time using "gw.requestTime(receiveTime);" , controller respond to node by sending current time to the node?
The administrator has disabled public write access.

Controller script to respond time request by node 1 year 10 months ago #2273

  • EasyIoT
  • EasyIoT's Avatar
  • Offline
  • Administrator
  • Posts: 833
  • Thank you received: 258
  • Karma: 24
vickeyhort wrote:
Hi Friends

May someone helps me to write an automation code for following needs.

If some sensor node request time using "gw.requestTime(receiveTime);" , controller respond to node by sending current time to the node?

You do not need automation script. Driver itself will respond to gw.requestTime. Time is in UTC so be sure to convert time in your local time.
The administrator has disabled public write access.

Controller script to respond time request by node 1 year 10 months ago #2274

  • vickeyhort
  • vickeyhort's Avatar
  • Offline
  • Junior Member
  • Posts: 24
  • Thank you received: 2
  • Karma: 0
Thank you for your kind support.

I have tested the function and it is working as you told. But How can I convert UTC to GMT5+ which is UTC+5h?
Last Edit: 1 year 10 months ago by vickeyhort.
The administrator has disabled public write access.

Controller script to respond time request by node 1 year 10 months ago #2275

  • EasyIoT
  • EasyIoT's Avatar
  • Offline
  • Administrator
  • Posts: 833
  • Thank you received: 258
  • Karma: 24
vickeyhort wrote:
Thank you for your kind support.

I have tested the function and it is working as you told. But How can I convert UTC to GMT5+ which is UTC+5h?

Use timezone library. Example is here iot-playground.com/23-esp8266-wifi-real-time-clock-display . It uses ESP8266, but it's the same for NRF24L01.
The administrator has disabled public write access.
The following user(s) said Thank You: vickeyhort

Controller script to respond time request by node 1 year 10 months ago #2276

  • vickeyhort
  • vickeyhort's Avatar
  • Offline
  • Junior Member
  • Posts: 24
  • Thank you received: 2
  • Karma: 0
Thank you so much, Where to find that timezone library?
Do you mean this?
github.com/JChristensen/Timezone
Last Edit: 1 year 10 months ago by vickeyhort.
The administrator has disabled public write access.

Controller script to respond time request by node 1 year 10 months ago #2277

  • EasyIoT
  • EasyIoT's Avatar
  • Offline
  • Administrator
  • Posts: 833
  • Thank you received: 258
  • Karma: 24
vickeyhort wrote:
Thank you so much, Where to find that timezone library?

Search my github github.com/iot-playground/Arduino under external_libraries...
The administrator has disabled public write access.
The following user(s) said Thank You: vickeyhort
  • Page:
  • 1
  • 2
Time to create page: 0.141 seconds
Powered by Kunena Forum