mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
34_ESPEasy.pm: Added ESPeasy Mega internals
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@14153 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0b6247f25a
commit
4de9350b16
1
CHANGED
1
CHANGED
@ -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: 34_ESPEasy.pm: Added ESPeasy Mega internals build.*
|
||||||
- bugfix 73_km200.pm: Errorlist unsorted timestamp
|
- bugfix 73_km200.pm: Errorlist unsorted timestamp
|
||||||
- bugfix: 72_FB_CALLMONITOR: fix reverse-search of dasschnelle.at
|
- bugfix: 72_FB_CALLMONITOR: fix reverse-search of dasschnelle.at
|
||||||
- feature: 70_BRAVIA: command remoteControl supports 'PictureMode'
|
- feature: 70_BRAVIA: command remoteControl supports 'PictureMode'
|
||||||
|
@ -29,6 +29,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use MIME::Base64;
|
use MIME::Base64;
|
||||||
|
#use Encode qw(encode_utf8);
|
||||||
use TcpServerUtils;
|
use TcpServerUtils;
|
||||||
use HttpUtils;
|
use HttpUtils;
|
||||||
use Color;
|
use Color;
|
||||||
@ -36,7 +37,7 @@ use Color;
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# global/default values
|
# global/default values
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
my $module_version = 1.05; # Version of this module
|
my $module_version = 1.06; # Version of this module
|
||||||
my $minEEBuild = 128; # informational
|
my $minEEBuild = 128; # informational
|
||||||
my $minJsonVersion = 1.02; # checked in received data
|
my $minJsonVersion = 1.02; # checked in received data
|
||||||
|
|
||||||
@ -636,8 +637,9 @@ sub ESPEasy_Read($) {
|
|||||||
|
|
||||||
eval {$json = decode_json($data[1]);1;};
|
eval {$json = decode_json($data[1]);1;};
|
||||||
if ($@) {
|
if ($@) {
|
||||||
Log3 $bname, 2, "$btype $name: WARNING: deformed JSON data, check your ESP config ($peer)";
|
Log3 $bname, 2, "$btype $name: WARNING: invalid JSON data or utf-8 "
|
||||||
Log3 $bname, 2, "$btype $name: $@";
|
. "encoding failed ($peer).";
|
||||||
|
Log3 $bname, 2, "$btype $name: WARNING: $@";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -666,8 +668,9 @@ sub ESPEasy_Read($) {
|
|||||||
|
|
||||||
# push internals in @values (and in bridge helper for support reason, only)
|
# push internals in @values (and in bridge helper for support reason, only)
|
||||||
my @values;
|
my @values;
|
||||||
my @intVals = qw(unit sleep build);
|
my @intVals = qw(unit sleep build build_git build_notes version node_type_id);
|
||||||
foreach my $intVal (@intVals) {
|
foreach my $intVal (@intVals) {
|
||||||
|
next if !defined $json->{data}{ESP}{$intVal};
|
||||||
push(@values,"i||".$intVal."||".$json->{data}{ESP}{$intVal}."||0");
|
push(@values,"i||".$intVal."||".$json->{data}{ESP}{$intVal}."||0");
|
||||||
$bhash->{helper}{received}{$peer}{$intVal} = $json->{data}{ESP}{$intVal};
|
$bhash->{helper}{received}{$peer}{$intVal} = $json->{data}{ESP}{$intVal};
|
||||||
}
|
}
|
||||||
@ -1172,7 +1175,16 @@ sub ESPEasy_dispatchParse($$$) # called by logical device (defined by
|
|||||||
|
|
||||||
# --- setInternal ---------------------------------------------
|
# --- setInternal ---------------------------------------------
|
||||||
elsif ($cmd eq "i") {
|
elsif ($cmd eq "i") {
|
||||||
|
# add human readable text to node_type_id
|
||||||
|
$value .= defined $ESPEasy_build_id{$value}{type}
|
||||||
|
? ": " . $ESPEasy_build_id{$value}{type}
|
||||||
|
: ": unknown node type id"
|
||||||
|
if $reading eq "node_type_id";
|
||||||
|
|
||||||
|
# set internal
|
||||||
$hash->{"ESP_".uc($reading)} = $value;
|
$hash->{"ESP_".uc($reading)} = $value;
|
||||||
|
|
||||||
|
# add to log
|
||||||
push(@logInternals,"$reading:$value");
|
push(@logInternals,"$reading:$value");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2852,7 +2864,7 @@ sub ESPEasy_removeGit($)
|
|||||||
Play melodies via <a target="_NEW" href="https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language#Technical_specification">RTTTL</a>
|
Play melodies via <a target="_NEW" href="https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language#Technical_specification">RTTTL</a>
|
||||||
(ESPEasy >= 2.0.0-dev6)
|
(ESPEasy >= 2.0.0-dev6)
|
||||||
<br>
|
<br>
|
||||||
required arguments: <pin> <freq> <duration>
|
required arguments: <rtttl>
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<li><a name="">status</a><br>
|
<li><a name="">status</a><br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user