diff --git a/CHANGED b/CHANGED
index 1223a603f..001bd47a0 100644
--- a/CHANGED
+++ b/CHANGED
@@ -1,5 +1,6 @@
# 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.
+ - feature: 34_ESPEasy.pm: Added ESPeasy Mega internals build.*
- bugfix 73_km200.pm: Errorlist unsorted timestamp
- bugfix: 72_FB_CALLMONITOR: fix reverse-search of dasschnelle.at
- feature: 70_BRAVIA: command remoteControl supports 'PictureMode'
diff --git a/FHEM/34_ESPEasy.pm b/FHEM/34_ESPEasy.pm
index a903e737a..2f409f01e 100644
--- a/FHEM/34_ESPEasy.pm
+++ b/FHEM/34_ESPEasy.pm
@@ -29,6 +29,7 @@ use strict;
use warnings;
use Data::Dumper;
use MIME::Base64;
+#use Encode qw(encode_utf8);
use TcpServerUtils;
use HttpUtils;
use Color;
@@ -36,7 +37,7 @@ use Color;
# ------------------------------------------------------------------------------
# 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 $minJsonVersion = 1.02; # checked in received data
@@ -636,9 +637,10 @@ sub ESPEasy_Read($) {
eval {$json = decode_json($data[1]);1;};
if ($@) {
- Log3 $bname, 2, "$btype $name: WARNING: deformed JSON data, check your ESP config ($peer)";
- Log3 $bname, 2, "$btype $name: $@";
- return;
+ Log3 $bname, 2, "$btype $name: WARNING: invalid JSON data or utf-8 "
+ . "encoding failed ($peer).";
+ Log3 $bname, 2, "$btype $name: WARNING: $@";
+ return;
}
# check that ESPEasy software is new enough
@@ -666,8 +668,9 @@ sub ESPEasy_Read($) {
# push internals in @values (and in bridge helper for support reason, only)
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) {
+ next if !defined $json->{data}{ESP}{$intVal};
push(@values,"i||".$intVal."||".$json->{data}{ESP}{$intVal}."||0");
$bhash->{helper}{received}{$peer}{$intVal} = $json->{data}{ESP}{$intVal};
}
@@ -1172,7 +1175,16 @@ sub ESPEasy_dispatchParse($$$) # called by logical device (defined by
# --- setInternal ---------------------------------------------
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;
+
+ # add to log
push(@logInternals,"$reading:$value");
}
@@ -2852,7 +2864,7 @@ sub ESPEasy_removeGit($)
Play melodies via RTTTL
(ESPEasy >= 2.0.0-dev6)
- required arguments: <pin> <freq> <duration>
+ required arguments: <rtttl>