This is a sample how to use it on Modbus WeMos how to readout with json.
Download source
<?php
$Server = "http://192.168.9.104:8084"; // Domoticz IP
$Pad = "/json.htm?type=command¶m=udevice&idx="; // Path for Domoticz
$json = file_get_contents('http://192.168.9.164/json'); // Read json Modbus Wemos
$obj = json_decode($json); // Decode
$TotalSensors = count($obj->Sensors); // Get total of sensors
for ($x = 0; $x < $TotalSensors; $x++) { // All Sensors
$TotalVal = count($obj->Sensors[$x]->TaskValues); // Get count of values
$TaskN = $obj->Sensors[$x]->TaskName; // Get Sensor Name
print("\n"); // print blank line
print($TaskN ."\n"); // print actual task name
for ($y = 0; $y < $TotalVal; $y++) { // All values
$Task1v1 = $obj->Sensors[$x]->TaskValues[$y]->Value; // Get value
$Task1v1n = $obj->Sensors[$x]->TaskValues[$y]->Name; // Get name value
print($Task1v1 . ' ' . $Task1v1n ."\n"); // print value and name
}
}
?>