New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ephemeris.WeekdayCondition off by a number of hours #2132
Comments
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/rule-example-engine-heater-based-on-temperature/23658/65 |
This is just getting weirder... I made two rules, one only running on weekend days, writing out "Today it's a weekend day!" to my log and one running on week days, writing out "Today it's a week day!". And then I set up both rules to run at "0 0,5,55 * * * ? *", ie every whole hour and five minutes before and after. And then I let them run. I struggle to find any logic in my findings. It seems it turned from being a week day to being a week end at midnight between saturday and sunday, so exactly 24 hours too late. Yesterday it was monday and most of the day it claimed it to be a weekend. Some time between 18:05 and 18:55 it changed into being a week day. So somewhere around 18.5 hours too late. It might be worth noticing that my OH server (for other reasons) was restarted somewhere around 18:30. Could it be affecting things? |
Have you tried disabling and then enabling your rules after OH has started? I'm seeing an issue that after an OH restarts my rule with a weekday and time condition does not work. The rule doesn't show any error at startup or when it's supposed to run. Disabling/enabling the rule gets it working again. |
Tried that now, it makes no difference. Today it's saturday and ephemeris.WeekendCondition still returns false and ephemeris.WeekdayCondition returns true. Judging by the response on this issue I suspect that either I'm the only one with this problem (which makes me wonder what's special with my system) or simply nobody else is using these conditions... |
I actually just created an account to say I got the same problem. I have two rules, one that's set to fire on weekdays at 7am and one that's set to fire on weekends at 8am. I couldn't figure out any kind of logic behind the wrong behavior. Two weeks ago I investigated, double checked and saved the rules again. From that day on, both rules fired every day. Two days ago after reading the suggestion to disable/enable the rules, I did that. Now the weekday rule is fireing every day, the weekend rule not at all. Maybe the error is related to specific ephemeris locations/timezones? I am in Germany |
Either that, or it has something with first day of week to do. Since it says weekend is sunday and monday for me, ie the first an last day of the week. If my week should start on mondays (like in USA) it would be correct. Does that make sense? |
@DanielMalmgren I think I'm experiencing this too. This morning (Saturday) a rule scheduled for weekdays at 6:55 AM was triggered. My location and timezone are Australia, GMT+11. I'll setup some more logging and report the results |
OK I'm seeing something different, apparently configuration related:
every time the rule runs, although it is configured in Settings > Ephemeris AND I can't reproduce it on a clean setup. |
I can't see any warnings in my logs at all and nothing related to Ephemeris. Since my last restart of openhab the weekend rule was never triggered, but the weekday rule got triggered every day, even on weekends. I did now disable/enable only the weekend rule and will observe this further. |
After upgrading to from 3.1.0.M3 to 3.1.0 last night, my weekday-condition rules worked perfectly today. #2398 looks like it might be the solution. |
Hmmm, I thought I'd try it out now (on 3.1.0), but now it doesn't execute those rules at all, I just get "Missing handler 'ephemeris.WeekendCondition' for module '2'". Kinda like it's even more broken now for me... Anyone knows what's happening? |
I've noticed strange behaviour for rules set up to execute only on weekdays, they also get executed on saturday mornings. So I did a test rule doing the following:
...which should write a log row every hour on week days. I haven't yet let it run a full week (I started it this sunday and now it is monday evening) but it seems the WeekdayCondition is off in some way, because it started writing log posts from 16:00 and forward. So from somewhere after saturday morning (my guess would be 16:00) to 16:00 on a monday it seems like it thinks it's weekend. Like the weekend calculation is off by 16 hours. Seems like it would be time zone related in some way? I'm in Sweden, ie +1.
Regional settings:
Country/Region: Sverige (Sweden)
Time Zone: (GMT + 1:00) Europe/Stockholm
Ephemeris settings:
Weekend days: lördag, söndag (ie saturday, sunday)
Country: Sweden
The text was updated successfully, but these errors were encountered: