Page 2 of 8

Re: [userModule] Daylight (updated 2015-01-01)

Posted: 11 Jan 2015 18:14
by mhorst
Ok, I'll assume that there is another cause, since I cant reproduce it on my system, and there isn't anything special in the cleanup part of my module compared to other modules.

Re: [userModule] Daylight (updated 2015-01-01)

Posted: 26 Jan 2015 01:15
by timo.heil
I can configure the Module and I see it listed as binarySwitch under "Widgets", however when I create a Logical Rule, it is not listed there as a switch. any idea?

Re: [userModule] Daylight (updated 2015-01-01)

Posted: 26 Jan 2015 10:47
by mhorst
The module should be a binary sensor, not a switch. The razberry has many features but making the sun rise and set on command is not one of them :)
Do you really get a button that allows you to change the setting of the widget?

For logical rules the module should be available under the Conditions part of the rule, when you add an item and then select "binary" in the drop down list. You won't find it under the "List of switches" part.

Re: [userModule] Daylight (updated 2015-01-01)

Posted: 26 Jan 2015 11:30
by pz1
mhorst wrote:For logical rules the module should be available under the Conditions part of the rule, when you add an item and then select "binary" in the drop down list. You won't find it under the "List of switches" part.
Confirmed.

I did instanciate v0.2.0 yesterday. I had to restart z-way-server before the new widget was visible in my drop down list. The sensor seems to change at the expected times, but the rule fired sometime in the middle of the night. I'll have a closer look at that. Using DelayedScene one can activate something at a defined period after the rule has fired. E.g. turn a light on at sunset, and switch off two hours later. I'll try that.

Re: [userModule] Daylight (updated 2015-01-01)

Posted: 26 Jan 2015 14:39
by timo.heil
>>>The module should be a binary sensor, not a switch.<<<

Yes, of course. Sorry, I mixed it up.

>>>For logical rules the module should be available under the Conditions part of the rule, when you add an item and then select "binary" in the drop down list. <<<

That's what I meant. It is not available as a condition in a logical rule. Even though it's available as a Widget.

Re: [userModule] Daylight (updated 2015-01-01)

Posted: 26 Jan 2015 14:45
by pz1
timo.heil wrote: That's what I meant. It is not available as a condition in a logical rule. Even though it's available as a Widget.
Which firmware do you use? Have you tried to delete your rule and add a new one insteadv of editing the existing rule?

Re: [userModule] Daylight (updated 2015-01-01)

Posted: 27 Jan 2015 01:04
by timo.heil
Hmmm. I'm seeing the Daylight sensor now under Logical Rule's condition. Not sure why it wasn't there yesterday. Maybe I looked at the wrong place. Anyway. Everything's fine now. Thanks for the module :)

Re: [userModule] Daylight (updated 2015-01-01)

Posted: 30 Jan 2015 11:32
by pz1
I still do experience problems with the scheduled tasks when this Daylight module is installed. A while after I add Daylight thes schedules don't fire at all, or at a strange time. As soon as Daylight is removed, and after reboot of the Pi, the schedules work as designed. In my last experiment, I had just Daylight running, no logical rule connected. Nothing strange in my logs except for the LightScenes that don't appear at their scheduled times.

Re: [userModule] Daylight (updated 2015-01-01)

Posted: 31 Jan 2015 13:15
by pz1
Setting aside my problems with using this module, I still think it is essentially a very good module, which IMHO should be part of the core collection of modules. The code is very well documented, and hence easy to maintain.

Re: [userModule] Daylight (updated 2015-01-01)

Posted: 01 Feb 2015 19:38
by mhorst
Sorry for my absence, but for some reason I don't get a mail notification anymore when someone posts in this topic.

Thanks for you compliment. I wouldn't mind if the people from z-wave.me included this module in the core set for z-way.

I'm not sure what causes the problems though. You get problems with other scheduled tasks when this module is installed?
The Daylight module makes use of the cron scheduler. I think it uses it correctly, and as long as no other schedules make use of the events "daylight.sunrise", "daylight.sunset" or "daylight.newdate", then it should not interfere.
The sunrise and sunset events take place at the calculated sunrise and sunset times. The newdate event takes place 1 minute after midnight (it is used by the module to calculate the new sunrise and sunset times on the new date).
Is there any correlation between those times and the misfires of your other schedules?

I don't use any other scheduled events in my setup myself, so I haven't encountered this problem yet.