From fb2ca2138210b7170718dc26e5c210ecbb3ae159 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sat, 1 Oct 2016 17:42:08 +0000 Subject: [PATCH] 99_Venetion.pm: Delete it, wrong prefix/module name (Forum #57801) git-svn-id: https://svn.fhem.de/fhem/trunk@12230 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/99_Venetian.pm | 251 --------------------------------------- 1 file changed, 251 deletions(-) delete mode 100644 fhem/FHEM/99_Venetian.pm diff --git a/fhem/FHEM/99_Venetian.pm b/fhem/FHEM/99_Venetian.pm deleted file mode 100644 index 05fef39e0..000000000 --- a/fhem/FHEM/99_Venetian.pm +++ /dev/null @@ -1,251 +0,0 @@ -############################################## -# -# This is open source software licensed unter the Apache License 2.0 -# http://www.apache.org/licenses/LICENSE-2.0 -# -############################################## - -# $Id$ - -use v5.10.1; -use strict; -use warnings; -use POSIX; -use experimental "smartmatch"; - - -#add FHEM/lib to @INC if it's not allready included. Should rather be in fhem.pl than here though... -BEGIN { - if (!grep(/FHEM\/lib$/,@INC)) { - foreach my $inc (grep(/FHEM$/,@INC)) { - push @INC,$inc."/lib"; - }; - }; -}; - -use VenetianBlinds::VenetianMasterController; -use VenetianBlinds::VenetianRoomController; -use VenetianBlinds::VenetianBlindController; - -my %valid_types = ( - "master" =>"VenetianMasterController", - "room" => "VenetianRoomController", - "blind" => "VenetianBlindController", - ); - -sub Venetian_Initialize { - my ($hash) = @_; - $hash->{DefFn} = 'Venetian_Define'; - #$hash->{UndefFn} = 'Venetian_Undef'; - $hash->{SetFn} = 'Venetian_Set'; - #$hash->{GetFn} = 'Venetian_Get'; - #$hash->{AttrFn} = 'Venetian_Attr'; - #$hash->{ReadFn} = 'Venetian_Read'; - $hash->{NotifyFn} = 'Venetian_Notify'; - $hash->{parseParams} = 1; - return; -} - -sub Venetian_Define { - my ($hash, $a, $h) = @_; - $hash->{type} = $valid_types{$h->{type}}; - if (!defined $hash->{type}) { - return "Type $h->{type} is not supported!"; - } - return vbc_call("Define",$hash, $a, $h); -} - -sub Venetian_Set { - my ( $hash, $a,$h ) = @_; - my $result = undef; - return vbc_call("Set",$hash, $a, $h); -} - - -sub Venetian_Notify { - my ($own_hash, $dev_hash) = @_; - my $ownName = $own_hash->{NAME}; # own name / hash - return "" if(IsDisabled($ownName)); # Return without any further action if the module is disabled - - my $devName = $dev_hash->{NAME}; # Device that created the events - my $events = main::deviceEvents($dev_hash,1); - return if( !$events ); - - return vbc_call("Notify",$own_hash, $devName, $events); -} - -sub vbc_call{ - my ($func,$hash,$a,$h) = @_; - $func = "VenetianBlinds::$hash->{type}::$func"; - my $result; - { - ## no critic (ProhibitNoStrict) - no strict 'refs'; - $result = &$func($hash, $a, $h); - ## use critic - } - return $result; -} -1; - -=pod -=item summary automates venetian blinds depending on sun and weather -=begin html - - -
define <name> Venetian type=master twilight=<name> weather=<name> wind_speed_threshold=<value>
- define <name> Venetian type=room [rooms=<name>,<name>,... ]
- define <name> Venetian type=blind master=<name> device=<name> could_index_threshold=<number> azimuth=<start>-<end> elevation=<start>-<end> months=<start>-<end>
- could_index_threshold=5
means broken
- azimuth
- The range of the azimuth of the sun, in which the blinds shall be closed.
- This is measured in degrees.
- This is defined by the pyhiscal orientation of your window.
- You can use a compass to measure this for every window.
- azimuth=90-120
means from 90° to 120°
- elevation
- The range of the elevation of the sun, in which the blinds shall be closed.
- This is measured in degrees.
- You can guess this from the pyhsical localtion of your window and obstacles around your building.
- azimuth=10-90
means from 10° to 90°
- months
- The range of months in which the blinds shall be closed, e.g. summer.
- azimuth=5-10
means from May to October
- rooms=Kitchen,Living
means that all blinds in the rooms named "Kitchen" and "Living" are controlled.
- set automatic
- Set blinds to automatic mode. This is the normal mode, if blinds should be set accoring to the sun position.
- set stop
- Stop the blind movement
- set windalarm
- Trigger the wind alarm. This will cause the blinds to be opened, regardless of the current state.
- set <scene>
- Disable the automatic and set a scene manually. The currently available scenes are:
- open
closed
see_through
shaded
adaptive
set automatic
- Set all blinds in this room to automatic mode.
- set stop
- Stop all blinds in this room.
- set <scene>
- Set all blinds in this room to a certain scene.
- set automatic
- Set all blinds to automatic mode.
- set stop
- Stop all blinds.
- set trigger_update
- Trigger all blinds in automatic mode to update their scenes to the current sun position.
- This should not be neccesary in normal operation but is useful when trying our different parameters.
-