@ubeaut what about your setup? i still find that calling the dusk dawn channels from astro works best as triggers for my virtual switch which defines night and day but I understand that there maybe a channel that does this anyway and i could use that as a trigger?
I donāt use a virtual switch to see if it is night or day.
I use the Astro sun phase name. You can see if it is night or daylight from that.
Basically I use if the phase name is not equal to daylight then it is getting dark or itās dark which covers what I want to do.
@ubeaut i got that - sorry it is the last channel in the list
Greg
Iāve read several threads where youāve mentioned using the sun phase name channel.
Question: what version of openHAB are you using?
Iāve set up a test system (Pi4) with latest stable openHABian, astro binding is the only binding installed and sun phase name is constantly returning UNDEF
A restart of openHAB causes it to report the correct sun phase name for a brief time but it quickly returns to UNDEF
Iāve checked the state using REST, rules logging out state and value in UI all return UNDEF
Hi.
I am currently not at home to give you a complete answer but I am using openhab 3 latest stable version. I am running on Ubuntu 20.04.
It is not openhabian.
The only thing it sounds like to me is the latitude and longitude may not be correct and the astro binding cannot calculate anything.
Also check the date and time as you donāt have a real time clock in the pi.
Nailed it Greg!
openHABian comes with timezone Berlin
steps to fix for the interested
openhabian@openhabian:~ $ timedatectl
Local time: Sat 2021-10-23 00:36:18 CEST
Universal time: Fri 2021-10-22 22:36:18 UTC
RTC time: n/a
Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
openhabian@openhabian:~ $ timedatectl list-timezones | grep America/New
America/New_York
openhabian@openhabian:~ $ timedatectl set-timezone 'America/New_York'
==== AUTHENTICATING FOR org.freedesktop.timedate1.set-timezone ===
Authentication is required to set the system timezone.
Authenticating as: ,,, (openhabian)
Password:
==== AUTHENTICATION COMPLETE ===
openhabian@openhabian:~ $ timedatectl
Local time: Fri 2021-10-22 18:38:51 EDT
Universal time: Fri 2021-10-22 22:38:51 UTC
RTC time: n/a
Time zone: America/New_York (EDT, -0400)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
openhabian@openhabian:~ $ systemctl restart openhab
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'openhab.service'.
Authenticating as: ,,, (openhabian)
Password:
==== AUTHENTICATION COMPLETE ===
I live east coast USA