Autor Thema: How to use an "at" command with a "Perl" command?  (Gelesen 4959 mal)

Fonz

  • Gast
How to use an "at" command with a "Perl" command?
« am: 18 Februar 2013, 13:06:25 »
Hi,

I would like to use the Twilight module.

I know its working because I can type...

Zitat
get 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...

Zitat
define b6 at *{myTwilight ss_indoor} set Lamp on


Does not work.

Could anyone help me with the syntax for this please?

Many thanks,

Fonz

Offline Guido

  • Jr. Member
  • **
  • Beiträge: 72
Aw: How to use an "at" command with a "Perl" command?
« Antwort #1 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


Fonz

  • Gast
Aw: How to use an "at" command with a "Perl" command?
« Antwort #2 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

Offline jhohn

  • Full Member
  • ***
  • Beiträge: 244
    • http://www.pcs4kids.org
Aw: How to use an "at" command with a "Perl" command?
« Antwort #3 am: 19 Februar 2013, 11:47:54 »
Maybe http://fhem.de/commandref.html#SUNRISE_EL is what you are looking for?
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

  • Gast
Aw: How to use an "at" command with a "Perl" command?
« Antwort #4 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

Offline jhohn

  • Full Member
  • ***
  • Beiträge: 244
    • http://www.pcs4kids.org
Aw: How to use an "at" command with a "Perl" command?
« Antwort #5 am: 19 Februar 2013, 16:37:17 »
Did you try to tweak the indoor horizon paramater?
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

Offline Guido

  • Jr. Member
  • **
  • Beiträge: 72
Aw: How to use an "at" command with a "Perl" command?
« Antwort #6 am: 19 Februar 2013, 16:43:08 »
Have you already tried with the indoor_horizon ?

Zitat
Twilight
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

  • Gast
Aw: How to use an "at" command with a "Perl" command?
« Antwort #7 am: 19 Februar 2013, 17:18:03 »
Thank you everyone.

I have fixed it with the horizon variable

Fonz