How to use an "at" command with a "Perl" command?

Begonnen von Fonz, 18 Februar 2013, 13:06:25

Vorheriges Thema - Nächstes Thema

Fonz

Hi,

I would like to use the Twilight module.

I know its working because I can type...

Zitatget myTwilight ss_indoor

Into the Fhem web interface, and it returns a time.



However I am unsure of the syntax to use with a "at" command as...

Zitatdefine b6 at *{myTwilight ss_indoor} set Lamp on

Does not work.

Could anyone help me with the syntax for this please?

Many thanks,

Fonz

Guido

Hello Fonz,

for me it works as follows

define b6 at *{ReadingsVal("myTwilight","ss_indoor","00:00:00")} set Lamp on;;set Rolos off


Fonz

Thank you!

That worked...

One more question if you its not too much trouble.

How could I then add or subtract a few minuets to this time, to get my lights exactly when I want them?

Thank you again,

Fonz

jhohn

FHEM auf Synology Diskstation DS413j (DSM4.3), HM LAN Adapter
Steuerung für Nachtspeicheröfen:
Ladung:   HM-WDS10-TH-O, HM-LC-Sw4-DR, Weather-Modul
Gebläse: HM-CC-TC, HM-LC-SW1-FM, HM-Sec-RHS
FHEM auf FritzBox 7390 für Telefon Funktionen

Fonz

Thank You Jhohn.

I was more looking to take 7 minuets away from the weather calculated Twilight time.

I find the time is very accurate, but due to a large tree my room gets dark 7 minuets before hand.

Regards,

Fonz

jhohn

FHEM auf Synology Diskstation DS413j (DSM4.3), HM LAN Adapter
Steuerung für Nachtspeicheröfen:
Ladung:   HM-WDS10-TH-O, HM-LC-Sw4-DR, Weather-Modul
Gebläse: HM-CC-TC, HM-LC-SW1-FM, HM-Sec-RHS
FHEM auf FritzBox 7390 für Telefon Funktionen

Guido

Have you already tried with the indoor_horizon ?

ZitatTwilight
Define
        define <name> Twilight <latitude> <longitude> [<indoor_horizon> [<Weather_Position>]]
Besides the location on earth it is influenced by a so called "indoor horizon" (e.g. if there are high buildings, mountains) as well as by weather conditions
The parameter indoor_horizon gives a virtual horizon higher than 0, that shall be used for calculation of indoor twilight (typical values are between 0 and 6)
http://fhem.de/commandref.html#Twilight


in my case indoor_horizon 1 is exactly ss -7 minutes and sr +7 minutes

Sorry, double post I'm too slow

Fonz

Thank you everyone.

I have fixed it with the horizon variable

Fonz