Setting Domoticz Server time in Raspberry pi

Client tools or tools that can connect with Domoticz. Tools for Windows, iOS, Android, Linux etc.

Moderator: leecollings

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

Setting Domoticz Server time in Raspberry pi

Post by cvasantrao »

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: 390
Joined: Wednesday 30 November 2016 11:58
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by Trigun »

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


Sent from my iPhone using Tapatalk
SweetPants

Re: Setting Domoticz Server time in Raspberry pi

Post by SweetPants »

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
cvasantrao
Posts: 4
Joined: Tuesday 12 September 2017 9:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by cvasantrao »

Yes. My RPi shows the correct time. The problem is with Domoticz time.
Thanks
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by emme »

...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
The most dangerous phrase in any language is:
"We always done this way"
cvasantrao
Posts: 4
Joined: Tuesday 12 September 2017 9:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by cvasantrao »

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
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by jannl »

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

Re: Setting Domoticz Server time in Raspberry pi

Post by SweetPants »

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?
cvasantrao
Posts: 4
Joined: Tuesday 12 September 2017 9:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by cvasantrao »

Yes,because i have used these coordinates in arduino for a aquarium controller and i get the sunrise/sunset timings right.
axello2
Posts: 11
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 »

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!
leby
Posts: 98
Joined: Monday 28 July 2014 9:58
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Stockholm
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by leby »

emme wrote: 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
Worked on my RPI as well..
/lennart
User avatar
Rolandet
Posts: 95
Joined: Thursday 31 January 2019 21:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: The Netherlands
Contact:

Re: Setting Domoticz Server time in Raspberry pi

Post by Rolandet »

leby wrote: Saturday 19 January 2019 14:50
emme wrote: 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
Worked on my RPI as well..
Not wanting to bump a topic for nothing: timedatectl worked for me too.
Tnx
Custodes Septentrionum
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest