Hallo
Kann mir jemand hiermit weiterhelfen:
Dies hatte immer funktioniert:
var_dump(json_decode($content1, true));
$info1 = json_decode($content1, True);
SetValueInteger(45355, $info->batteries->capacity->full);
Die neue ausgabe ist folgendes
array(2) {
["batteries"]=>
array(1) {
[0]=>
array(6) {
["id"]=>
int(0)
["charge"]=>
int(39)
["voltage"]=>
int(17623)
["current"]=>
int(-84)
["temperature"]=>
int(257)
["capacity"]=>
array(2) {
["full"]=>
int(1200)
["remaining"]=>
int(468)
}
}
}
["successful"]=>
bool(true)
}
Das ganze hat sich jetzt so verändert dass dies hinzu gekommen ist
array(1) {
[0]=>
Jetz bekomme ich immer fogende Fehler:
Notice: Undefined property: stdClass::$batteries in C:\IP-Symcon\scripts\53117.ips.php on line 47
Notice: Trying to get property ‚capacity‘ of non-object in C:\IP-Symcon\scripts\53117.ips.php on line 47
Notice: Trying to get property ‚full‘ of non-object in C:\IP-Symcon\scripts\53117.ips.php on line 47
Kann mir jemand bitte erklären wie ich es anstelle wieder den Wert zu bekommen
Vielen Dank