I have two EibPC running the same application program in parallel:
1/ EibPC1, running v2.100 - in listening mode (EIB bus write-access muted)
2/ EibPC2, running v2.300 - in validation mode (EIB bus write-access enabled)
Following piece of code results in a different outcome during the transition from Saturday to Sunday:
[highlight=epc]
//2. Determine if we are running in DayTariff or Night tariff mode
// Night-tariff on Sa/Su + week-days 22pm->07am
if (cwtime(22,0,0,MONDAY) and !cwtime(07,0,0,TUESDAY)) or \\
(cwtime(22,0,0,TUESDAY) and !cwtime(07,0,0,WEDNESDAY)) or \\
(cwtime(22,0,0,WEDNESDAY) and !cwtime(07,0,0,THURSDAY)) or \\
(cwtime(22,0,0,THURSDAY) and !cwtime(07,0,0,FRIDAY)) or \\
cwtime(22,0,0,FRIDAY) or \\
!cwtime(07,0,0,MONDAY) then {
DayTariff = OFF
} else {
DayTariff = ON
} endif
[/highlight]On EibPC1 DayTariff is OFF between Friday 10pm and Monday 7am (as expected).
On EIBPC2 DayTariff is OFF between Friday 10pm and Sunday 00am, but turns ON from Sunday 00am onwards. A restart of EIBPC2 on Sunday morning evaluates DayTariff back to OFF (as it should).
It seems that the transition on Sunday 00am is not well handled in v2.300 => !cwtime(07,0,0,MONDAY) is not evaluated TRUE at the moment the week cycle is reset.
1/ EibPC1, running v2.100 - in listening mode (EIB bus write-access muted)
2/ EibPC2, running v2.300 - in validation mode (EIB bus write-access enabled)
Following piece of code results in a different outcome during the transition from Saturday to Sunday:
[highlight=epc]
//2. Determine if we are running in DayTariff or Night tariff mode
// Night-tariff on Sa/Su + week-days 22pm->07am
if (cwtime(22,0,0,MONDAY) and !cwtime(07,0,0,TUESDAY)) or \\
(cwtime(22,0,0,TUESDAY) and !cwtime(07,0,0,WEDNESDAY)) or \\
(cwtime(22,0,0,WEDNESDAY) and !cwtime(07,0,0,THURSDAY)) or \\
(cwtime(22,0,0,THURSDAY) and !cwtime(07,0,0,FRIDAY)) or \\
cwtime(22,0,0,FRIDAY) or \\
!cwtime(07,0,0,MONDAY) then {
DayTariff = OFF
} else {
DayTariff = ON
} endif
[/highlight]On EibPC1 DayTariff is OFF between Friday 10pm and Monday 7am (as expected).
On EIBPC2 DayTariff is OFF between Friday 10pm and Sunday 00am, but turns ON from Sunday 00am onwards. A restart of EIBPC2 on Sunday morning evaluates DayTariff back to OFF (as it should).
It seems that the transition on Sunday 00am is not well handled in v2.300 => !cwtime(07,0,0,MONDAY) is not evaluated TRUE at the moment the week cycle is reset.
Kommentar