FHT Toolbox - All you need for efficiently managing your FHT Devices

Begonnen von LudgerR, 09 März 2013, 19:57:12

Vorheriges Thema - Nächstes Thema

LudgerR

Hi,

have you ever been fed up getting LOVL message and experienced that the communication to the FHT devices completely got stuck, since you didn't scheduled the "set" commands to the FHT devices appropriate?

In this case please have a glance to the attached fht_ctrl _at() subroutine.

Imagine that you only have to execute

{fht_ctrl_at("all","manu-temp","","15.0")}

for setting "manu-temp" to  15.0 on all  FHT devices in a scheduled manner so that you can use this temperature at a later stage as your absence temperature during holidays,

and that in  a later step you just call
   
{fht_ctrl_at("all","holiday","2013-03-09 14:00:00","manu-temp")}

or

{fht_ctrl_at("all","holiday","2013-04-30 22:00:00","night-temp")}

and all your FHT devices will be set into the appropriate "holiday" / "holiday-short" mode with the corresponding "night-temp" or "manu-temp" as defined within the FHT devices.  At the specified date and time every FHT devices will return simultaneously to "auto" mode and the "desired-temp" to the appropriate "day-temp" or "night-temp" according to  the week plan within the  FHT device.  

Returning home earlier as expected, without having a chance to overwrite the original end date earlier  with a modified call of fht_Ctrl , you just issue

{fht_ctrl_at("all","auto","0","default")}

to force all FHT devices to return to the auto mode with a desired temperature as defined within the week plan of the FHT's.

To ensure that the FHT devices keep communication with the fhem server just schedule periodicly

{fht_ctrl_at("all","sync","0","")}

To keep the week plan stored  in the readings within fhem in sync with the FHT device schedule daily after 22:00

{fht_ctrl_at("all","report1","0","")}

daily after 22:00  to request the from1, from2, to1 and to2 values of the following weekday.

If you have a flextime arrangement with your employer and you decide to standup 1 hour later, setup your system in a way that it triggers

{fht_ctrl_at("all","wakeup","$acttime","",)}
 
after midnight   with $acttime of 3600 (seconds).  fht_ctrl will shift the start of day-temp by extending the night period for every FHT device individually  using
an appropriate call of

{fht_ctrl_at("$FHT-device-name","holiday","$acttime","night-temp")}

Watching the news on TV you decide that you want to do some work-out  in the fitness room later.  By triggering

{fht_ctrl_at("Fitness","party-boost","3600","19.0")}  

the desired-temp for the FTH device "Fitness"  will be temporarily set to "30.0"  and later overwritten by 19.0  using "holiday-short" mode.
Being a couch-potato you forgot that you wanted to do some work-out, which doesn't matter, since due to using "holiday-short" modus the FHT device will return to the default desired temperature according to the internal  stored week plan at least after one hour.  
   
In fact there are two subroutines  
  "fht_ctrl_at"  and  "fht_ctrl"    

"fht_crtl_at"  acts as a wrapper script to "fht_ctrl" mainly used for scheduling the individual "set" commands for the FHT devices.

In addition to the above shown 4 parameters   an  optional 5th 6th and 7th  parameter exists.
With parameter 5 an additional  room can be defined in which the "at" device will be placed.  In any case the "at" device for each scheduled job will be visible within the room "Jobs".
Use Parameter 6 to schedule a later starttime then the default, which is one minute.
Parameter 7 is used to switch the simulation mode on. Within the subroutine "fht_crtl"  I hardcoded that simulation is always on.  Therefore you can start using those subroutines without issuing any "set" commands to your FHT-devices.
Within simulation mode the corresponding "set" commands will be logged (see below) and can be used to test them in your environment:

18:49:02 Simulation: fht_ctrl("FHT_FlurO","party-boost","3600","20,"","","1")
18:50:02 Simulation: fht_ctrl("FHT_FlurO","party-str-boost","2400","30,"","","1")
18:50:02 fht_ctrl simulation: {fhem("set FHT_FlurO mode auto holiday1 117 holiday2 9 mode holiday_short desired-temp 30 report2 2")}
18:59:02 Simulation: fht_ctrl("FHT_FlurO","party-end-boost","1362854942","20,"","+00:10:00","1")
18:59:02 fht_ctrl simulation: {fhem("set FHT_FlurO mode auto holiday1 118 holiday2 9 mode holiday_short desired-temp 20 report2 2")}




Enjoy,
Ludger

Fhem/mosquitto/zigbee2mqtt  on PI 3+ , 2xCUNO, 13xFHT, EM1000 WZ/GZ, FS20,AMAD,SONOS, MQTT (Sonoff/Shelly),Buderus GB-112,CanOverEthernet(UVR67/CIM)

Aeroschmelz

#1
Hallo Ludger,

kurze Frage. Verwendest du die Toolbox und funktioniert das alles bei Dir noch wie gewohnt oder hast du Anpassungen vorgenommen? Ich habe die Datei in meine 99_myUtils.pm kopiert, aber ich habe noch Probleme mit dem party-boost Modus etc. Es wird zwar in den holiday Modus geschaltet, allerdings wird die Temperatur nicht kurzzeitig auf 30 °C gesetzt. Weiterhin ist mir unklar, warum nach jedem setzen der Temperatur ein report2 2 erfolgt?

d.h. ich rufe es folgendermaßen auf:


{fht_ctrl_at("Hzg_Wohnzimmer","party-boost","600","19.0")}

und dann erscheint im Log:


2016.12.26 10:57:41 2: FHT set Hzg_Wohnzimmer mode auto holiday1 66 holiday2 26 mode holiday_short desired-temp 19.0 report2 2
2016.12.26 10:57:41 2: set Hzg_Wohnzimmer mode auto holiday1 66 holiday2 26 mode holiday_short desired-temp 19.0 report2 2


Konnte man für die desired-temp auch day-temp oder night-temp verwenden? Aktuell erhalte ich hier eine Fehlermeldung:


mode holiday_short desired-temp na report2 2 : Invalid temperature na, choose one of on off 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0 10.5 11.0 11.5 12.0 12.5 13.0 13.5 14.0 14.5 15.0 15.5 16.0 16.5 17.0 17.5 18.0 18.5 19.0 19.5 20.0 20.5 21.0 21.5 22.0 22.5 23.0 23.5 24.0 24.5 25.0 25.5 26.0 26.5 27.0 27.5 28.0 28.5 29.0 29.5 30.


Herzlichen Dank für die Hilfe. Die Toolbox hört sich jedenfalls sehr praktisch an.

Viele Grüsse
Marcus

RockThisParty

Falls das noch jemanden interessiert:
Ich habe das Script gerade bei mir in Betrieb genommen und es funktioniert nach erstem Eindruck prima! Hatte schon lange nach einer Möglichkeit gesucht, alle FHTs auf Holiday setzen zu können ohne noch groß rechnen zu müssen :-) :)