mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-07 16:59:18 +00:00
70_PushNotifier.pm: bugfix regex deviceID
git-svn-id: https://svn.fhem.de/fhem/trunk@9226 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d45cfb6023
commit
1ecac8e995
@ -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.
|
||||
- bugfix: 70_PushNotifier: bugfix regex deviceID
|
||||
- feature: new Module 74_AMAD to request Information and control Android Devices
|
||||
in cooperation with AutomagicApp on the Device (Forum #39773)
|
||||
(by M. Oldenburg)
|
||||
|
@ -1,5 +1,5 @@
|
||||
###############################################
|
||||
#$Id: 70_PushNotifier.pm 2015-09-10 06:30:00 xusader
|
||||
#$Id: 70_PushNotifier.pm 2015-09-10 20:30:00 xusader
|
||||
#
|
||||
# regex part by pirmanji
|
||||
#
|
||||
@ -76,8 +76,7 @@ PushNotifier_Define($$)
|
||||
'appToken' => $appToken]);
|
||||
my $strg_chkID = $responseID->as_string;
|
||||
|
||||
$strg_chkID =~ /\[(.*),(.*)\]/;
|
||||
my $devIDs = $1;
|
||||
(my $devIDs = $strg_chkID) =~ s/.*\{"status":.*,"devices":\[(.*)\]\}/$1/s;
|
||||
$devIDs =~ s/[-"{}_]//g;
|
||||
$hash->{devices} = $devIDs;
|
||||
|
||||
@ -108,7 +107,7 @@ PushNotifier_Send_Message
|
||||
my $mc=0;
|
||||
|
||||
try {
|
||||
while ($hash->{devices} =~ /title:(.*?),id:(\d+),model:(.*?)(?=,title:|\])/g) {
|
||||
while ($hash->{devices} =~ /title:(.*?),id:(\d+),model:(.*?)(?=,title:|$)/g) {
|
||||
my ($nd_title, $nd_id, $nd_model) = ("$1", "$2", "$3");
|
||||
|
||||
# Log3 (undef, 3, "PushNotifier: Send Message $msg to device title: $nd_title, id: $nd_id, model: $nd_model");
|
||||
|
Loading…
x
Reference in New Issue
Block a user