Hi @all,
ich möchte eine Fritz!Dect200 Schaltsteckdose nutzen um mir den Zustand eines Mähroboters anzeigen zu lassen !
Vom Prinzip her sollte es funktionieren, da die Wattaufnahme zu den verschiedenen Zuständen unterschiedlich ist :
Mähen 2.57 - 2.64 Watt
warten 3.6 - 4.3 Watt
Laden 19.95 - 34.04 Watt
mit diesen Werten möchte ich einen Dummy schalten ! Leider bleibt das STATE des dummy auf ???
define Mowy_Power FBDECT fb1:17 switch
attr Mowy_Power IODev fb1
attr Mowy_Power devStateIcon on:black_Steckdose.on off:black_Steckdose.off
attr Mowy_Power group Garten
attr Mowy_Power room Garten
attr Mowy_Power verbose 5
define FileLog_Mowy_Power FileLog ./log/Mowy_Power-%Y-%m-%d.log Mowy_Power
attr FileLog_Mowy_Power room Garten
#
define Mowy dummy
attr Mowy devStateIcon OUT:status_away_2 IN:status_available
attr Mowy group Mowy_WD
attr Mowy icon scene_robo_lawnmower
attr Mowy room Garten,Tech
#
#
define Mowy_drin notify Mowy_Power.power.* { if((substr(ReadingsVal("Mowy_Power","power",""), 0,length(ReadingsVal("Mowy_Power","power",""))-2) >= 3.5) && (Value("Mowy") eq "OUT") ) { fhem ("set Mowy IN")}}
define Mowy_draussen notify Mowy_Power.power.* { if((substr(ReadingsVal("Mowy_Power","power",""), 0,length(ReadingsVal("Mowy_Power","power",""))-2) <= 3.2) && (Value("Mowy") eq "IN") ) { fhem ("set Mowy OUT")}}
wo ist denn der Fehler ?
denke es geht nun auch leichter ;D
define Mowy_drin DOIF ([Mowy_Power:power:d] >= 3.30) (set Mowy IN)
attr Mowy_drin do always
define Mowy_draussen DOIF ([Mowy_Power:power:d] <= 2.57) (set Mowy OUT)
attr MowMowy_draussen do always
define Mowy_bat DOIF ([Mowy_Power:power:d] >= 15) (set Mowy LOAD)
attr Mowy_bat do always
ob es funzt sehe ich morgen beim Praxistest