turning a lamp on at a fixed time, turning off with twilight

Begonnen von homer, 28 Mai 2013, 10:55:17

Vorheriges Thema - Nächstes Thema

homer

Hello all,

I'm turning a lamp on at 6am and off using twilight (to take account of seasonal variations). This has been working well but now that Summer is approaching in the UK, the twilight turn off time (05:48) is earlier than my lamp turn on time (06:00). I have the following definitions:

define a12 at *06:00 set LOUNGELIGHT on
define a14 at *{ReadingsVal("myTwilight","sr_indoor","00:00:10")} set LOUNGELIGHT off

Can anyone suggest a way to fix this?

Thanks
Homer

borsti67

Hello Homer,

may be you could use the "on-till" function of the SET command?

That would be something like

define a12 at *06:00 set LOUNGELIGHT on-till {ReadingsVal("myTwilight","sr_indoor","00:00:10")}

(I'm not familiar with these twilight functions, so eventually this turns on the light until the next morning, but I'm quite sure this can be avoided somehow)
cu/2
Borsti
---
FHEM 5.8 auf Synology DS211j (bis 11/17) | FHEM 6.0 auf Raspi Zero W (bis 11/20) | FHEM 6.2 als VM in Synology DS1815+ (ab 11/20)

Zrrronggg!

A somewhat crude idea: Check which month it is and turn the lamp not on in all months where you know that sunrise is earlier then 6. Somethinh like:

define a12 at *06:00  { if($month < 4 || $month >= 8) { fhem ("set LOUNGELIGHT on ")}}

(just by heart,not tested)
FHEM auf Linkstation Mini, CUL 868 SlowRF, 2xCUL 868 RFR, CUL 433 für IT, 2xHMLAN-Configurator mit VCCU, ITV-100 Repeater, Sender und Aktoren von FHT, FS20, S300, HM, IT, RSL

herrmannj

Hello Homer,

let me suggest to modify your "at" a12 to check if twilight state is less then 5 (indoor sr) or less then 6 (weather sr). only if true switch your lamp on.

define a12 at *06:00 {fhem "set LOUNGELIGHT on" if (Value("myTwilight") < 6)}

So if 6 no light is required it wont be switched on.

joerg