FHEM Forum

FHEM => English Corner => Thema gestartet von: Fonz am 18 Februar 2013, 13:06:25

Titel: How to use an "at" command with a "Perl" command?
Beitrag von: Fonz am 18 Februar 2013, 13:06:25
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
Titel: Aw: How to use an "at" command with a "Perl" command?
Beitrag von: Guido am 18 Februar 2013, 14:15:02
Hello Fonz,

for me it works as follows

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

Titel: Aw: How to use an "at" command with a "Perl" command?
Beitrag von: Fonz am 18 Februar 2013, 18:13:09
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
Titel: Aw: How to use an "at" command with a "Perl" command?
Beitrag von: jhohn am 19 Februar 2013, 11:47:54
Maybe http://fhem.de/commandref.html#SUNRISE_EL (//fhem.de/commandref.html#SUNRISE_EL) is what you are looking for?
Titel: Aw: How to use an "at" command with a "Perl" command?
Beitrag von: Fonz am 19 Februar 2013, 16:13:53
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
Titel: Aw: How to use an "at" command with a "Perl" command?
Beitrag von: jhohn am 19 Februar 2013, 16:37:17
Did you try to tweak the indoor horizon (//fhem.de/commandref.html#Twilight) paramater?
Titel: Aw: How to use an "at" command with a "Perl" command?
Beitrag von: Guido am 19 Februar 2013, 16:43:08
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 (//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
Titel: Aw: How to use an "at" command with a "Perl" command?
Beitrag von: Fonz am 19 Februar 2013, 17:18:03
Thank you everyone.

I have fixed it with the horizon variable

Fonz