Yesterday I got this awesome LaMetric clock for my birthday. It opens a whole new era on how you can use clocks by adding them to your smarthouse. Since I couldn’t find a PHP ‘Hello World!’ script I decided to built my own, maybe it can help you too.

Follow these three steps to get the data you need:

  1. Create a ‘Notification App’ on
  2. Get your API key at
  3. Find the IP address of your LaMetric clock, help can be found here:

// start program
echo "Sending 'Hello World' to your LaMetric Clock...";

// message
$message = "Hello World!";

// settings
$header  = array("Content-Type: application/json");
$apikey  = "**************************************";
$url     = "";

$post    = '{
   "model": {
        "frames": [
               "text":"' . $message . '"

// curl
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_USERPWD, "dev:" . $apikey);  
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// execute
$response = curl_exec($ch);
if (strpos($response, "success") !== false) {
  echo 'Success!';
} else {
  echo 'Failed!';

// close