2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

10_MYSENSORS_DEVICE.pm: uppdate to latest MYSENSORS api

git-svn-id: https://svn.fhem.de/fhem/trunk@15135 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Hauswart 2017-09-25 14:01:02 +00:00
parent 15c7236d0f
commit 55ade35235
4 changed files with 122 additions and 84 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it. # Do not insert empty lines here, update check depends on it.
- feature: 10_MYSENSORS_DEVICE: updated to latest MYSENSORS version
- feature: 50_TelegramBot: hide cmd in favorites/changed favorites confirm - feature: 50_TelegramBot: hide cmd in favorites/changed favorites confirm
- feature: 49_SSCam: V2.9.0, function get homeModeState, minor fixes, - feature: 49_SSCam: V2.9.0, function get homeModeState, minor fixes,
commandref revised commandref revised

View File

@ -1,4 +1,4 @@
############################################## P##############################################
# #
# fhem bridge to MySensors (see http://mysensors.org) # fhem bridge to MySensors (see http://mysensors.org)
# #
@ -19,7 +19,6 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with fhem. If not, see <http://www.gnu.org/licenses/>. # along with fhem. If not, see <http://www.gnu.org/licenses/>.
# #
# $Id$ # $Id$
# #
############################################## ##############################################
@ -42,16 +41,16 @@ sub MYSENSORS_DEVICE_Initialize($) {
$hash->{AttrFn} = "MYSENSORS::DEVICE::Attr"; $hash->{AttrFn} = "MYSENSORS::DEVICE::Attr";
$hash->{AttrList} = $hash->{AttrList} =
"config:M,I ". "config:M,I " .
"mode:node,repeater ". "mode:node,repeater " .
"version:1.4 ". "version:1.4 " .
"setCommands ". "setCommands " .
"setReading_.+ ". "setReading_.+ " .
"mapReadingType_.+ ". "mapReadingType_.+ " .
"mapReading_.+ ". "mapReading_.+ " .
"requestAck:1 ". "requestAck:1 " .
"IODev ". "IODev " .
"showtime:0,1 ". "showtime:0,1 " .
$main::readingFnAttributes; $main::readingFnAttributes;
main::LoadModule("MYSENSORS"); main::LoadModule("MYSENSORS");
@ -85,26 +84,26 @@ BEGIN {
my %static_types = ( my %static_types = (
S_DOOR => { receives => [], sends => [V_TRIPPED,V_ARMED] }, # Door and window sensors S_DOOR => { receives => [], sends => [V_TRIPPED,V_ARMED] }, # Door and window sensors
S_MOTION => { receives => [], sends => [V_TRIPPED] }, # MotionSensor S_MOTION => { receives => [], sends => [V_TRIPPED,V_ARMED] }, # Motion sensors
S_SMOKE => { receives => [], sends => [V_TRIPPED,V_ARMED] }, # Smoke sensor S_SMOKE => { receives => [], sends => [V_TRIPPED,V_ARMED] }, # Smoke sensor
S_LIGHT => { receives => [V_STATUS,V_WATT], sends => [V_STATUS,V_WATT] }, # Binary device (on/off), Alias for S_BINARY S_BINARY => { receives => [V_STATUS,V_WATT], sends => [V_STATUS,V_WATT] }, # Binary device (on/off)
S_DIMMER => { receives => [V_STATUS,V_PERCENTAGE,V_WATT], sends => [V_STATUS,V_PERCENTAGE,V_WATT] }, # Dimmable device of some kind S_DIMMER => { receives => [V_STATUS,V_PERCENTAGE,V_WATT], sends => [V_STATUS,V_PERCENTAGE,V_WATT] }, # Dimmable device of some kind
S_COVER => { receives => [V_UP,V_DOWN,V_STOP,V_PERCENTAGE], sends => [V_PERCENTAGE] }, # Window covers or shades S_COVER => { receives => [V_UP,V_DOWN,V_STOP,V_PERCENTAGE], sends => [V_PERCENTAGE] }, # Window covers or shades
S_TEMP => { receives => [], sends => [V_TEMP] }, # Temperature sensor S_TEMP => { receives => [], sends => [V_TEMP,V_ID] }, # Temperature sensor
S_HUM => { receives => [], sends => [V_HUM] }, # Humidity sensor S_HUM => { receives => [], sends => [V_HUM] }, # Humidity sensor
S_BARO => { receives => [], sends => [V_PRESSURE,V_FORECAST] }, # Barometer sensor (Pressure) S_BARO => { receives => [], sends => [V_PRESSURE,V_FORECAST] }, # Barometer sensor (Pressure)
S_WIND => { receives => [], sends => [V_WIND,V_GUST] }, # Wind sensor S_WIND => { receives => [], sends => [V_WIND,V_GUST,V_DIRECTION] }, # Wind sensor
S_RAIN => { receives => [], sends => [V_RAIN,V_RAINRATE] }, # Rain sensor S_RAIN => { receives => [], sends => [V_RAIN,V_RAINRATE] }, # Rain sensor
S_UV => { receives => [], sends => [V_UV] }, # UV Sensor S_UV => { receives => [], sends => [V_UV] }, # UV sensor
S_WEIGHT => { receives => [], sends => [V_WEIGHT,V_IMPEDANCE] }, # Weight sensor for scales etc. S_WEIGHT => { receives => [], sends => [V_WEIGHT,V_IMPEDANCE] }, # Weight sensor for scales etc.
S_POWER => { receives => [V_VAR1], sends => [V_WATT,V_KWH,V_VAR1] }, # Power measuring device, like power meters S_POWER => { receives => [V_VAR1], sends => [V_WATT,V_KWH,V_VAR,V_VA,V_POWER_FACTOR] }, # Power measuring device, like power meters
S_HEATER => { receives => [], sends => [V_HVAC_SETPOINT_HEAT,V_HVAC_FLOW_STATE,V_TEMP] }, # Heater device S_HEATER => { receives => [], sends => [V_HVAC_SETPOINT_HEAT,V_HVAC_FLOW_STATE,V_TEMP,V_STATUS] }, # Heater device
S_DISTANCE => { receives => [], sends => [V_DISTANCE] }, # Distance sensor S_DISTANCE => { receives => [], sends => [V_DISTANCE,V_UNIT_PREFIX] }, # Distance sensor
S_LIGHT_LEVEL => { receives => [], sends => [V_LIGHT_LEVEL] }, # Light sensor S_LIGHT_LEVEL => { receives => [], sends => [V_LIGHT_LEVEL] }, # Light sensor
S_ARDUINO_NODE => { receives => [], sends => [] }, # Arduino node device S_ARDUINO_NODE => { receives => [], sends => [] }, # Arduino node device
S_ARDUINO_REPEATER_NODE => { receives => [], sends => [] }, # Arduino repeating node device S_ARDUINO_REPEATER_NODE => { receives => [], sends => [] }, # Arduino repeating node device
S_LOCK => { receives => [V_LOCK_STATUS], sends => [V_LOCK_STATUS] }, # Lock device S_LOCK => { receives => [V_LOCK_STATUS], sends => [V_LOCK_STATUS] }, # Lock device
S_IR => { receives => [V_IR_SEND], sends => [V_IR_RECEIVE] }, # Ir sender/receiver device S_IR => { receives => [V_IR_SEND], sends => [V_IR_RECEIVE,V_IR_RECORD] }, # Ir sender/receiver device
S_WATER => { receives => [V_VAR1], sends => [V_FLOW,V_VOLUME,V_VAR1] }, # Water meter S_WATER => { receives => [V_VAR1], sends => [V_FLOW,V_VOLUME,V_VAR1] }, # Water meter
S_AIR_QUALITY => { receives => [], sends => [V_LEVEL,V_UNIT_PREFIX] }, # Air quality sensor e.g. MQ-2 S_AIR_QUALITY => { receives => [], sends => [V_LEVEL,V_UNIT_PREFIX] }, # Air quality sensor e.g. MQ-2
S_CUSTOM => { receives => [V_VAR1,V_VAR2,V_VAR3,V_VAR4,V_VAR5], sends => [V_VAR1,V_VAR2,V_VAR3,V_VAR4,V_VAR5] }, # Use this for custom sensors where no other fits. S_CUSTOM => { receives => [V_VAR1,V_VAR2,V_VAR3,V_VAR4,V_VAR5], sends => [V_VAR1,V_VAR2,V_VAR3,V_VAR4,V_VAR5] }, # Use this for custom sensors where no other fits.
@ -113,13 +112,17 @@ my %static_types = (
S_RGB_LIGHT => { receives => [V_RGB,V_WATT], sends => [V_RGB,V_WATT] }, # RGB light S_RGB_LIGHT => { receives => [V_RGB,V_WATT], sends => [V_RGB,V_WATT] }, # RGB light
S_RGBW_LIGHT => { receives => [V_RGBW,V_WATT], sends => [V_RGBW,V_WATT] }, # RGBW light (with separate white component) S_RGBW_LIGHT => { receives => [V_RGBW,V_WATT], sends => [V_RGBW,V_WATT] }, # RGBW light (with separate white component)
S_COLOR_SENSOR => { receives => [V_RGB], sends => [V_RGB] }, # Color sensor S_COLOR_SENSOR => { receives => [V_RGB], sends => [V_RGB] }, # Color sensor
S_HVAC => { receives => [], sends => [V_HVAC_SETPOINT_HEAT,V_HVAC_SETPOINT_COOL,V_HVAC_FLOW_STATE,V_HVAC_FLOW_MODE,V_HVAC_SPEED] }, # Thermostat/HVAC device S_HVAC => { receives => [], sends => [V_STATUS,V_TEMP,V_HVAC_SETPOINT_HEAT,V_HVAC_SETPOINT_COOL,V_HVAC_FLOW_STATE,V_HVAC_FLOW_MODE,V_HVAC_SPEED] }, # Thermostat/HVAC device
S_MULTIMETER => { receives => [], sends => [V_VOLTAGE,V_CURRENT,V_IMPEDANCE] }, # Multimeter device S_MULTIMETER => { receives => [], sends => [V_VOLTAGE,V_CURRENT,V_IMPEDANCE] }, # Multimeter device
S_SPRINKLER => { receives => [], sends => [V_STATUS,V_TRIPPED] }, # Sprinkler device S_SPRINKLER => { receives => [], sends => [V_STATUS,V_TRIPPED] }, # Sprinkler device
S_WATER_LEAK => { receives => [], sends => [V_TRIPPED,V_ARMED] }, # Water leak sensor S_WATER_LEAK => { receives => [], sends => [V_TRIPPED,V_ARMED] }, # Water leak sensor
S_SOUND => { receives => [], sends => [V_LEVEL,V_TRIPPED,V_ARMED] }, # Sound sensor S_SOUND => { receives => [], sends => [V_LEVEL,V_TRIPPED,V_ARMED] }, # Sound sensor
S_VIBRATION => { receives => [], sends => [V_LEVEL,V_TRIPPED,V_ARMED] }, # Vibration sensor S_VIBRATION => { receives => [], sends => [V_LEVEL,V_TRIPPED,V_ARMED] }, # Vibration sensor
S_MOISTURE => { receives => [], sends => [V_LEVEL,V_TRIPPED,V_ARMED] }, # Moisture sensor S_MOISTURE => { receives => [], sends => [V_LEVEL,V_TRIPPED,V_ARMED] }, # Moisture sensor
S_INFO => { receives => [V_TEXT], sends => [V_TEXT] }, # LCD text device
S_GAS => { receives => [], sends => [V_FLOW,V_VOLUME] }, # Gas meter
S_GPS => { receives => [], sends => [V_POSITION] }, # GPS Sensor
S_WATER_QUALITY => { receives => [], sends => [V_TEMP,V_PH,V_ORP,V_EC,V_STATUS] }, # Water quality sensor
); );
my %static_mappings = ( my %static_mappings = (
@ -176,6 +179,16 @@ my %static_mappings = (
V_HVAC_SETPOINT_COOL => { type => "hvacsetpointcool" }, V_HVAC_SETPOINT_COOL => { type => "hvacsetpointcool" },
V_HVAC_SETPOINT_HEAT => { type => "hvacsetpointheat" }, V_HVAC_SETPOINT_HEAT => { type => "hvacsetpointheat" },
V_HVAC_FLOW_MODE => { type => "hvacflowmode" }, V_HVAC_FLOW_MODE => { type => "hvacflowmode" },
V_TEXT => { type => "text" },
V_CUSTOM => { type => "custom" },
V_POSITION => { type => "position" },
V_IR_RECORD => { type => "ir_record" },
V_PH => { type => "ph" },
V_ORP => { type => "orp" },
V_EC => { type => "ec" },
V_VAR => { type => "value" },
V_VA => { type => "va" },
V_POWER_FACTOR => { type => "power_factor" },
); );
sub Define($$) { sub Define($$) {
@ -186,6 +199,7 @@ sub Define($$) {
$hash->{sets} = { $hash->{sets} = {
'time' => "", 'time' => "",
reboot => "", reboot => "",
# clear => "",
}; };
$hash->{ack} = 0; $hash->{ack} = 0;
$hash->{typeMappings} = {map {variableTypeToIdx($_) => $static_mappings{$_}} keys %static_mappings}; $hash->{typeMappings} = {map {variableTypeToIdx($_) => $static_mappings{$_}} keys %static_mappings};
@ -209,10 +223,13 @@ sub Set($@) {
return grep (/(^on$)|(^off$)/,keys %{$hash->{sets}}) == 2 ? SetExtensions($hash, $list, $name, $command, @values) : "Unknown argument $command, choose one of $list"; return grep (/(^on$)|(^off$)/,keys %{$hash->{sets}}) == 2 ? SetExtensions($hash, $list, $name, $command, @values) : "Unknown argument $command, choose one of $list";
} }
COMMAND_HANDLER: { COMMAND_HANDLER: {
$command eq "clear" and do { # $command eq "clear" and do {
sendClientMessage($hash, childId => 255, cmd => C_INTERNAL, subType => I_CHILDREN, payload => "C"); # # Test 102 anstatt 255 :) und Log
last; # sendClientMessage($hash, childId => 255, cmd => C_INTERNAL, subType => I_CHILDREN, payload => "C");
}; # Log3 ($name,3,"MYSENSORS_DEVICE $name: clear");
# # Test
# last;
# };
$command eq "time" and do { $command eq "time" and do {
sendClientMessage($hash, childId => 255, cmd => C_INTERNAL, subType => I_TIME, payload => time); sendClientMessage($hash, childId => 255, cmd => C_INTERNAL, subType => I_TIME, payload => time);
last; last;
@ -260,10 +277,10 @@ sub Attr($$$$) {
$attribute eq "mode" and do { $attribute eq "mode" and do {
if ($command eq "set" and $value eq "repeater") { if ($command eq "set" and $value eq "repeater") {
$hash->{repeater} = 1; $hash->{repeater} = 1;
$hash->{sets}->{clear} = ""; # $hash->{sets}->{clear} = "";
} else { } else {
$hash->{repeater} = 0; $hash->{repeater} = 0;
delete $hash->{sets}->{clear}; # delete $hash->{sets}->{clear};
} }
last; last;
}; };
@ -425,7 +442,7 @@ sub onPresentationMessage($$) {
push @ret,"no setReading for $id, $typeStr"; push @ret,"no setReading for $id, $typeStr";
} }
} }
Log3 ($hash->{NAME},4,"MYSENSORS_DEVICE $hash->{NAME}: errors on C_PRESENTATION-message for childId $id, subType ".sensorTypeToStr($nodeType)." ".join (", ",@ret)) if @ret; Log3 ($hash->{NAME}, 4, "MYSENSORS_DEVICE $hash->{NAME}: errors on C_PRESENTATION-message for childId $id, subType ".sensorTypeToStr($nodeType)." ".join (", ",@ret)) if @ret;
} }
} }
@ -434,11 +451,11 @@ sub onSetMessage($$) {
if (defined $msg->{payload}) { if (defined $msg->{payload}) {
eval { eval {
my ($reading,$value) = rawToMappedReading($hash,$msg->{subType},$msg->{childId},$msg->{payload}); my ($reading,$value) = rawToMappedReading($hash,$msg->{subType},$msg->{childId},$msg->{payload});
readingsSingleUpdate($hash,$reading,$value,1); readingsSingleUpdate($hash, $reading, $value, 1);
}; };
Log3 ($hash->{NAME},4,"MYSENSORS_DEVICE $hash->{NAME}: ignoring C_SET-message ".GP_Catch($@)) if $@; Log3 ($hash->{NAME}, 4, "MYSENSORS_DEVICE $hash->{NAME}: ignoring C_SET-message ".GP_Catch($@)) if $@;
} else { } else {
Log3 ($hash->{NAME},5,"MYSENSORS_DEVICE $hash->{NAME}: ignoring C_SET-message without payload"); Log3 ($hash->{NAME}, 5, "MYSENSORS_DEVICE $hash->{NAME}: ignoring C_SET-message without payload");
} }
} }
@ -454,7 +471,7 @@ sub onRequestMessage($$) {
payload => ReadingsVal($hash->{NAME},$readingname,$val) payload => ReadingsVal($hash->{NAME},$readingname,$val)
); );
}; };
Log3 ($hash->{NAME},4,"MYSENSORS_DEVICE $hash->{NAME}: ignoring C_REQ-message ".GP_Catch($@)) if $@; Log3 ($hash->{NAME}, 4, "MYSENSORS_DEVICE $hash->{NAME}: ignoring C_REQ-message ".GP_Catch($@)) if $@;
} }
sub onInternalMessage($$) { sub onInternalMessage($$) {
@ -464,16 +481,16 @@ sub onInternalMessage($$) {
my $typeStr = internalMessageTypeToStr($type); my $typeStr = internalMessageTypeToStr($type);
INTERNALMESSAGE: { INTERNALMESSAGE: {
$type == I_BATTERY_LEVEL and do { $type == I_BATTERY_LEVEL and do {
readingsSingleUpdate($hash,"batterylevel",$msg->{payload},1); readingsSingleUpdate($hash, "batterylevel", $msg->{payload}, 1);
Log3 ($name,4,"MYSENSORS_DEVICE $name: batterylevel $msg->{payload}"); Log3 ($name, 4, "MYSENSORS_DEVICE $name: batterylevel $msg->{payload}");
last; last;
}; };
$type == I_TIME and do { $type == I_TIME and do {
if ($msg->{ack}) { if ($msg->{ack}) {
Log3 ($name,4,"MYSENSORS_DEVICE $name: response to time-request acknowledged"); Log3 ($name, 4, "MYSENSORS_DEVICE $name: response to time-request acknowledged");
} else { } else {
sendClientMessage($hash,cmd => C_INTERNAL, childId => 255, subType => I_TIME, payload => time); sendClientMessage($hash,cmd => C_INTERNAL, childId => 255, subType => I_TIME, payload => time);
Log3 ($name,4,"MYSENSORS_DEVICE $name: update of time requested"); Log3 ($name, 4, "MYSENSORS_DEVICE $name: update of time requested");
} }
last; last;
}; };
@ -495,11 +512,11 @@ sub onInternalMessage($$) {
}; };
$type == I_CONFIG and do { $type == I_CONFIG and do {
if ($msg->{ack}) { if ($msg->{ack}) {
Log3 ($name,4,"MYSENSORS_DEVICE $name: response to config-request acknowledged"); Log3 ($name, 4, "MYSENSORS_DEVICE $name: response to config-request acknowledged");
} else { } else {
readingsSingleUpdate($hash,"parentId",$msg->{payload},1); readingsSingleUpdate($hash, "parentId", $msg->{payload}, 1);
sendClientMessage($hash,cmd => C_INTERNAL, childId => 255, subType => I_CONFIG, payload => AttrVal($name,"config","M")); sendClientMessage($hash,cmd => C_INTERNAL, childId => 255, subType => I_CONFIG, payload => AttrVal($name,"config","M"));
Log3 ($name,4,"MYSENSORS_DEVICE $name: respond to config-request, node parentId = " . $msg->{payload}); Log3 ($name, 4, "MYSENSORS_DEVICE $name: respond to config-request, node parentId = " . $msg->{payload});
} }
last; last;
}; };
@ -516,18 +533,18 @@ sub onInternalMessage($$) {
last; last;
}; };
$type == I_CHILDREN and do { $type == I_CHILDREN and do {
readingsSingleUpdate($hash,"state","routingtable cleared",1); readingsSingleUpdate($hash, "state", "routingtable cleared", 1);
Log3 ($name,4,"MYSENSORS_DEVICE $name: routingtable cleared"); Log3 ($name, 3, "MYSENSORS_DEVICE $name: routingtable cleared");
last; last;
}; };
$type == I_SKETCH_NAME and do { $type == I_SKETCH_NAME and do {
$hash->{$typeStr} = $msg->{payload}; $hash->{$typeStr} = $msg->{payload};
readingsSingleUpdate($hash,"SKETCH_NAME",$msg->{payload},1); readingsSingleUpdate($hash, "SKETCH_NAME", $msg->{payload}, 1);
last; last;
}; };
$type == I_SKETCH_VERSION and do { $type == I_SKETCH_VERSION and do {
$hash->{$typeStr} = $msg->{payload}; $hash->{$typeStr} = $msg->{payload};
readingsSingleUpdate($hash,"SKETCH_VERSION",$msg->{payload},1); readingsSingleUpdate($hash, "SKETCH_VERSION", $msg->{payload}, 1);
last; last;
}; };
$type == I_REBOOT and do { $type == I_REBOOT and do {
@ -594,6 +611,10 @@ sub mappedReadingToRaw($$$) {
1; 1;
=pod =pod
=item device
=item summary includes MYSENSOR clients
=item summary_DE integriert MYSENSOR Sensoren
=begin html =begin html
<a name="MYSENSORS_DEVICE"></a> <a name="MYSENSORS_DEVICE"></a>

View File

@ -66,6 +66,16 @@ use constant {
V_HVAC_SETPOINT_COOL => 44, V_HVAC_SETPOINT_COOL => 44,
V_HVAC_SETPOINT_HEAT => 45, V_HVAC_SETPOINT_HEAT => 45,
V_HVAC_FLOW_MODE => 46, V_HVAC_FLOW_MODE => 46,
V_TEXT => 47,
V_CUSTOM => 48,
V_POSITION => 49,
V_IR_RECORD => 50,
V_PH => 51,
V_ORP => 52,
V_EC => 53,
V_VAR => 54,
V_VA => 55,
V_POWER_FACTOR => 56,
}; };
use constant variableTypes => qw{ V_TEMP V_HUM V_STATUS V_PERCENTAGE V_PRESSURE V_FORECAST V_RAIN use constant variableTypes => qw{ V_TEMP V_HUM V_STATUS V_PERCENTAGE V_PRESSURE V_FORECAST V_RAIN
@ -73,7 +83,8 @@ use constant variableTypes => qw{ V_TEMP V_HUM V_STATUS V_PERCENTAGE V_PRESSURE
V_IMPEDANCE V_ARMED V_TRIPPED V_WATT V_KWH V_SCENE_ON V_SCENE_OFF V_IMPEDANCE V_ARMED V_TRIPPED V_WATT V_KWH V_SCENE_ON V_SCENE_OFF
V_HVAC_FLOW_STATE V_HVAC_SPEED V_LIGHT_LEVEL V_VAR1 V_VAR2 V_VAR3 V_VAR4 V_VAR5 V_HVAC_FLOW_STATE V_HVAC_SPEED V_LIGHT_LEVEL V_VAR1 V_VAR2 V_VAR3 V_VAR4 V_VAR5
V_UP V_DOWN V_STOP V_IR_SEND V_IR_RECEIVE V_FLOW V_VOLUME V_LOCK_STATUS V_UP V_DOWN V_STOP V_IR_SEND V_IR_RECEIVE V_FLOW V_VOLUME V_LOCK_STATUS
V_LEVEL V_VOLTAGE V_CURRENT V_RGB V_RGBW V_ID V_UNIT_PREFIX V_HVAC_SETPOINT_COOL V_HVAC_SETPOINT_HEAT V_HVAC_FLOW_MODE}; V_LEVEL V_VOLTAGE V_CURRENT V_RGB V_RGBW V_ID V_UNIT_PREFIX V_HVAC_SETPOINT_COOL V_HVAC_SETPOINT_HEAT V_HVAC_FLOW_MODE
V_TEXT V_CUSTOM V_POSITION V_IR_RECORD V_PH V_ORP V_EC V_VAR V_VA V_POWER_FACTOR };
sub variableTypeToStr($) { sub variableTypeToStr($) {
(variableTypes)[shift]; (variableTypes)[shift];
@ -120,7 +131,7 @@ use constant {
S_DOOR => 0, S_DOOR => 0,
S_MOTION => 1, S_MOTION => 1,
S_SMOKE => 2, S_SMOKE => 2,
S_LIGHT => 3, S_BINARY => 3,
S_DIMMER => 4, S_DIMMER => 4,
S_COVER => 5, S_COVER => 5,
S_TEMP => 6, S_TEMP => 6,
@ -153,13 +164,17 @@ use constant {
S_SOUND => 33, S_SOUND => 33,
S_VIBRATION => 34, S_VIBRATION => 34,
S_MOISTURE => 35, S_MOISTURE => 35,
S_INFO => 36,
S_GAS => 37,
S_GPS => 38,
S_WATER_QUALITY => 39,
}; };
use constant sensorTypes => qw{ S_DOOR S_MOTION S_SMOKE S_LIGHT S_DIMMER S_COVER S_TEMP S_HUM S_BARO S_WIND use constant sensorTypes => qw{ S_DOOR S_MOTION S_SMOKE S_BINARY S_DIMMER S_COVER S_TEMP S_HUM S_BARO S_WIND
S_RAIN S_UV S_WEIGHT S_POWER S_HEATER S_DISTANCE S_LIGHT_LEVEL S_ARDUINO_NODE S_RAIN S_UV S_WEIGHT S_POWER S_HEATER S_DISTANCE S_LIGHT_LEVEL S_ARDUINO_NODE
S_ARDUINO_REPEATER_NODE S_LOCK S_IR S_WATER S_AIR_QUALITY S_CUSTOM S_DUST S_SCENE_CONTROLLER S_ARDUINO_REPEATER_NODE S_LOCK S_IR S_WATER S_AIR_QUALITY S_CUSTOM S_DUST S_SCENE_CONTROLLER
S_RGB_LIGHT S_RGBW_LIGHT S_COLOR_SENSOR S_HVAC S_MULTIMETER S_SPRINKLER S_WATER_LEAK S_SOUND S_VIBRATION S_RGB_LIGHT S_RGBW_LIGHT S_COLOR_SENSOR S_HVAC S_MULTIMETER S_SPRINKLER S_WATER_LEAK S_SOUND S_VIBRATION
S_MOISTURE}; S_MOISTURE S_INFO S_GAS S_GPS S_WATER_QUALITY};
sub sensorTypeToStr($) { sub sensorTypeToStr($) {
(sensorTypes)[shift]; (sensorTypes)[shift];
@ -196,9 +211,10 @@ use constant {
P_LONG32 => 4, P_LONG32 => 4,
P_ULONG32 => 5, P_ULONG32 => 5,
P_CUSTOM => 6, P_CUSTOM => 6,
P_FLOAT32 => 7,
}; };
use constant payloadTypes => qw{ P_STRING P_BYTE P_INT16 P_UINT16 P_LONG32 P_ULONG32 P_CUSTOM }; use constant payloadTypes => qw{ P_STRING P_BYTE P_INT16 P_UINT16 P_LONG32 P_ULONG32 P_CUSTOM P_FLOAT32 };
sub payloadTypeToStr($) { sub payloadTypeToStr($) {
(payloadTypes)[shift]; (payloadTypes)[shift];

View File

@ -65,7 +65,7 @@ FHEM/10_KOPP_FC.pm raspii Sonstige Systeme
FHEM/10_MAX.pm rudolfkoenig/orphan MAX FHEM/10_MAX.pm rudolfkoenig/orphan MAX
FHEM/10_MQTT_BRIDGE eisler MQTT FHEM/10_MQTT_BRIDGE eisler MQTT
FHEM/10_MQTT_DEVICE eisler MQTT FHEM/10_MQTT_DEVICE eisler MQTT
FHEM/10_MYSENSORS_DEVICE ntruchsess Sonstige Systeme FHEM/10_MYSENSORS_DEVICE Hauswart Sonstige Systeme
FHEM/10_OWServer.pm neubert/mfr69bs 1Wire FHEM/10_OWServer.pm neubert/mfr69bs 1Wire
FHEM/10_SOMFY.pm viegener Sonstige Systeme FHEM/10_SOMFY.pm viegener Sonstige Systeme
FHEM/10_UNIRoll.pm C_Herrmann SlowRF FHEM/10_UNIRoll.pm C_Herrmann SlowRF
@ -489,7 +489,7 @@ FHEM/UConv.pm loredo FHEM Development
FHEM/Unit.pm loredo FHEM Development FHEM/Unit.pm loredo FHEM Development
FHEM/YahooWeatherAPI.pm neubert Unterstuetzende Dienste/Wettermodule FHEM/YahooWeatherAPI.pm neubert Unterstuetzende Dienste/Wettermodule
FHEM/lib/Device/Firmata/* ntruchsess Sonstige Systeme FHEM/lib/Device/Firmata/* ntruchsess Sonstige Systeme
FHEM/lib/Device/MySensors/* ntruchsess Sonstige Systeme FHEM/lib/Device/MySensors/* Hauswart Sonstige Systeme
FHEM/lib/MP3/* Reinerlein Multimedia FHEM/lib/MP3/* Reinerlein Multimedia
FHEM/lib/Net/MQTT.pod eisler MQTT FHEM/lib/Net/MQTT.pod eisler MQTT
FHEM/lib/Net/MQTT/* eisler MQTT FHEM/lib/Net/MQTT/* eisler MQTT