00_Neuron.pm: switched from encode_json to toJSON

git-svn-id: https://svn.fhem.de/fhem/trunk@17860 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
klausw
2018-11-27 20:35:35 +00:00
parent e5786996c9
commit b494e84c4e

View File

@@ -439,9 +439,9 @@ sub Neuron_ParseAll(@){
#$value = $rsetsP{$value} if ($subdev->{dev} eq 'input' || $subdev->{dev} eq 'relay' || $subdev->{dev} eq 'led'); # on,off anstelle von 1,0
readingsBulkUpdateIfChanged($hash,$subdev->{dev}."_".$subdev->{circuit},$value) if defined($value);
Dispatch($hash, $subdev, (%addvals ? \%addvals : undef)) if index(AttrVal($hash->{NAME}, 'logicalDev', 'relay,input,led,ao'), $subdev->{dev}) != -1;
delete $subdev->{value};
readingsBulkUpdateIfChanged($hash,".".$subdev->{dev}."_".$subdev->{circuit},encode_json $subdev,0);
Log3 ($hash, 4, "$hash->{TYPE} ($hash->{NAME}) ".$subdev->{dev}."_".$subdev->{circuit} .": ".encode_json $subdev);
delete $subdev->{value};
readingsBulkUpdateIfChanged($hash,".".$subdev->{dev}."_".$subdev->{circuit},toJSON($subdev),0);
Log3 ($hash, 4, "$hash->{TYPE} ($hash->{NAME}) ".$subdev->{dev}."_".$subdev->{circuit} .": ". toJSON($subdev));
}
}
readingsBulkUpdate($hash,"state",$result->{status}) if ref $result eq 'HASH';