sinbrive / Jeedom_Widget_Json

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jeedom_Widget_Json

  • Widget managing Json data instead of simple string as done by core widgets.
  • Thanks to the Jeedom Community

Json Input

  • The json data is submitted to Jeedom as raw string as the following:
     "{'Battery': '90', 'Temperature':'16,5', Humidity':'55'}"
  • if your data is the output of PHP script, make sure the format is OK.
  • Example of PHP code
$json_string="{";
foreach($result as $x => $val) {
  // ....
  $json_string .= "'".$x."':"."'".$val."',"; // add ' instead of " bcse widget remove " ==> see widget script : ' replaced back by "
}
$json_string[strlen($json_string)-1] = "}";  // replace last ',' by '}'
$scenario->setData('JSON', $json_string);

Intallation

image

image

image

image

image

image

Virtual Creation

image

image

image

image

Still Open

  • manage options
  • manage unities (nested Json)

About


Languages

Language:HTML 100.0%