animierte windrose mit bordmittel möglich?

Begonnen von the ratman, 28 April 2016, 13:45:43

Vorheriges Thema - Nächstes Thema

franky08

Zitatbtw - deinen filter "myWS1080_nty" brauch ich eig. nur, wenn meine wetterstation andere werte als 0-360 liefern würde. hab ich das richtig verstanden?

Ja, meine Wetterstation liefert manchmal unsinnige Werte (schlechter Empfang, Störungen) aber den notify brauchst du, der triggert die sub, einfach den "Filter Teil" weglassen.

VG
Frank
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

the ratman

#16
wow, ich hab richtig gedacht - is ne neuheit bei mir und fhem *g*
→do↑p!dnʇs↓shit←

the ratman

#17
so, jetzt hab ich meine erste ganz eigene lösung - gut, fleißig abgeschrieben von dir *g* - dafür so, dass ich mir selber helfen kann in nur einer einzigen readingsgroup.

noch weiß ich nicht, obs wirklich 100% rennt, aber schaun ma mal:
Internals:
   CFGFN
   DEF        Wetterstation:windDirection
   NAME       rg_Windrose
     valueFormat {
return "1" if( $VALUE > 0.1 && $VALUE < 45 );
return "2" if( $VALUE == 45 );
return "3" if( $VALUE > 45 && $VALUE < 90 );
return "4" if( $VALUE == 90 );
return "5" if( $VALUE > 90 && $VALUE < 135 );
return "6" if( $VALUE == 135 );
return "7" if( $VALUE > 135 && $VALUE < 180 );
return "8" if( $VALUE == 180 );
return "9" if( $VALUE > 180 && $VALUE < 225 );
return "a" if( $VALUE == 225 );
return "b" if( $VALUE > 225 && $VALUE < 270 );
return "c" if( $VALUE == 270 );
return "d" if( $VALUE > 270 && $VALUE < 315 );
return "e" if( $VALUE == 315 );
return "f" if( $VALUE > 315 && $VALUE < 360 );
return "g" if( $VALUE == 360 );
return "h" if( $VALUE == 0 );
}
     Positions:
       Wetterstation.windDirection 1:1
     Valueicon:
       windDirection.1 ws_NNO_kl.png
       windDirection.2 ws_NO_kl.png
       windDirection.3 ws_ONO_kl.png
       windDirection.4 ws_O_kl.png
       windDirection.5 ws_OSO_kl.png
       windDirection.6 ws_SO_kl.png
       windDirection.7 ws_SSO_kl.png
       windDirection.8 ws_S_kl.png
       windDirection.9 ws_SSW_kl.png
       windDirection.a ws_SW_kl.png
       windDirection.b ws_WSW_kl.png
       windDirection.c ws_W_kl.png4
       windDirection.d ws_WNW_kl.png
       windDirection.e ws_NW_kl.png
       windDirection.f ws_NNW_kl.png
       windDirection.g ws_N_kl.png
       windDirection.h ws_N_kl.png
Attributes:
   nonames    1
   notime     1
   room       Testgeräte
   valueFormat {
return "1" if( $VALUE > 0.1 && $VALUE < 45 );
return "2" if( $VALUE == 45 );
return "3" if( $VALUE > 45 && $VALUE < 90 );
return "4" if( $VALUE == 90 );
return "5" if( $VALUE > 90 && $VALUE < 135 );
return "6" if( $VALUE == 135 );
return "7" if( $VALUE > 135 && $VALUE < 180 );
return "8" if( $VALUE == 180 );
return "9" if( $VALUE > 180 && $VALUE < 225 );
return "a" if( $VALUE == 225 );
return "b" if( $VALUE > 225 && $VALUE < 270 );
return "c" if( $VALUE == 270 );
return "d" if( $VALUE > 270 && $VALUE < 315 );
return "e" if( $VALUE == 315 );
return "f" if( $VALUE > 315 && $VALUE < 360 );
return "g" if( $VALUE == 360 );
return "h" if( $VALUE == 0 );
}
   valueIcon  {
'windDirection.1'=>'ws_NNO_kl.png',
'windDirection.2'=>'ws_NO_kl.png',
'windDirection.3'=>'ws_ONO_kl.png',
'windDirection.4'=>'ws_O_kl.png',
'windDirection.5'=>'ws_OSO_kl.png',
'windDirection.6'=>'ws_SO_kl.png',
'windDirection.7'=>'ws_SSO_kl.png',
'windDirection.8'=>'ws_S_kl.png',
'windDirection.9'=>'ws_SSW_kl.png',
'windDirection.a'=>'ws_SW_kl.png',
'windDirection.b'=>'ws_WSW_kl.png',
'windDirection.c'=>'ws_W_kl.png4',
'windDirection.d'=>'ws_WNW_kl.png',
'windDirection.e'=>'ws_NW_kl.png',
'windDirection.f'=>'ws_NNW_kl.png',
'windDirection.g'=>'ws_N_kl.png',
'windDirection.h'=>'ws_N_kl.png'
}
→do↑p!dnʇs↓shit←

dieter114

Hallo Ratman,

kann es sein das in der Definition noch ein kleiner "Denkfehler" ist?
Z.B. die Pos 45 = 2 wird nur ausgegeben wenn es genau 45 Grad sind.
Diesen Wert wird es in der Realität nie geben.
Also wird immer dann die Pos 1 oder 3 ausgegeben.

Gruß Wolfdieter
RPi II+III+V,OWX,div.1W Module,HM Zisterne,div. CUL, sduino MAPLESDuino(adv), div ESPEasy, div Tasmota, MQTT2Server,WU-Upload,TabletUI,Poolsteuerung mit fhem, Fronius, BYD Solaranlage

the ratman

jo, wird so sein ... hab ich ja nur kopiert damals *g*
→do↑p!dnʇs↓shit←