Setting Domoticz Server time in Raspberry pi

Client tools or tools that can connect with Domoticz. Tools for Windows, iOS, Android, Linux etc.
Post Reply
cvasantrao
Posts: 4
Joined: Tuesday 12 September 2017 9:49
Target OS: Raspberry Pi
Domoticz version:
Contact:

Setting Domoticz Server time in Raspberry pi

Post by cvasantrao » Tuesday 12 September 2017 9:57

Hi,
I have installed domoticz on RPi3 and RPi3 shows the correct time. But domoticz time is about 3.5 hrs ahead. Can anybody help?
Thanks

Trigun
Posts: 184
Joined: Wednesday 30 November 2016 12:58
Target OS: Raspberry Pi
Domoticz version: 3.5877
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by Trigun » Tuesday 12 September 2017 9:58

Sudo raspi-config, set time zone. This should work


Sent from my iPhone using Tapatalk

SweetPants
Posts: 2066
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.9656
Location: The Netherlands
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by SweetPants » Tuesday 12 September 2017 10:56

cvasantrao wrote:
Tuesday 12 September 2017 9:57
Hi,
I have installed domoticz on RPi3 and RPi3 shows the correct time. But domoticz time is about 3.5 hrs ahead. Can anybody help?
Thanks
Have you installed/configured NTP?

sudo apt-get install ntp
By default it will use a pre-configured NTP server in /etc/ntp.conf
change that to some servers (min 3) at your location

server <ip or domainname NTP server(s)>

sudo service ntp restart

This eventually should sync your clock to NTP, depending on the difference between the NTP server and your raspberry this can take hours/days
Ubuntu 16.04.3 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (source)

cvasantrao
Posts: 4
Joined: Tuesday 12 September 2017 9:49
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by cvasantrao » Tuesday 12 September 2017 12:11

Yes. My RPi shows the correct time. The problem is with Domoticz time.
Thanks

User avatar
emme
Posts: 798
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by emme » Tuesday 12 September 2017 12:35

...mmh what about

sudo timedatectl set-timezone Europe/<City>
sudo timedatectl set-ntp true

in domoticz be sure to have setted up the right GPS coordinates
That's one small step for a programmer, one giant leap for me!
- - - - -
Raspberry Pi3 + AeonStick G5 + RFXCOMM433 + iRTrans Server + NodeJS
There's no stress in the mess!!

cvasantrao
Posts: 4
Joined: Tuesday 12 September 2017 9:49
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by cvasantrao » Wednesday 13 September 2017 4:29

Yes. I have set the GPS coordinates right using 'to find your location click here'. The sunrise and sunset timings are also wrong. Tried everything.
Thanks

User avatar
jannl
Posts: 955
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Geleen
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by jannl » Wednesday 13 September 2017 7:12

Hm, the fact that sunrise/sunset times are wrong implies the location setting are wrong. Do you see anything in the logfile(s)?

Verstuurd vanaf mijn SM-G930F met Tapatalk


SweetPants
Posts: 2066
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.9656
Location: The Netherlands
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by SweetPants » Wednesday 13 September 2017 19:06

cvasantrao wrote:
Wednesday 13 September 2017 4:29
Yes. I have set the GPS coordinates right using 'to find your location click here'. The sunrise and sunset timings are also wrong. Tried everything.
Thanks
Are you really sure you got the right longitude/latitude from the 'click here' search?
Ubuntu 16.04.3 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (source)

cvasantrao
Posts: 4
Joined: Tuesday 12 September 2017 9:49
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by cvasantrao » Thursday 14 September 2017 5:21

Yes,because i have used these coordinates in arduino for a aquarium controller and i get the sunrise/sunset timings right.

axello2
Posts: 7
Joined: Tuesday 25 April 2017 13:03
Target OS: OS X
Domoticz version:
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by axello2 » Monday 01 January 2018 11:53

Hello,
any update on this issue? I seem to have the same problem after I moved my Domoticz installation.
Short answer: fixed it!

Gps coords in Domoticz:
lon: 4.887, lat: 52.383, which is Amsterdam (and correct)

Domoticz 3.8153 claims : SunRise: 07:51, SunSet: 15:36
Weather.com states:
Zonsopgang 08:50
Zonsondergang 16:37
So this simply seems a timezone offset.
Back to the terminal:
date: Mon 1 Jan 10:37:16 CET 2018 (which is correct)

BUT: this was because the timezone was set in the .profile.

I have used the timedatectl commands by *emme* above and now my Domoticz dashboard shows the correct sunset times!
Also the times in the Dashboard are better.

Thanks, and best wishes for 2018!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests