Select Page
This entry has been published on 2016-05-23 and may be out of date.

Last Updated on 2016-05-23.

[:en]In a smart home environment, you may want to send various notifications to every active OE / Kodi station, e.g. a “garage door is open” information at night.

This information might come from any source like KNX server or similar.

To open a popup window in Kodi, you can e.g. use a Ubuntu Server with PHP and Apache in your LAN, with the following code:

//Send Notifications to Kodi


$openelecStations = array(

function curl_request($url)
    $ch = curl_init($url);
    curl_setopt($ch ,CURLOPT_TIMEOUT, 1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);

$jsonParams = array(
    'title' => utf8_encode($title),
    'message' => utf8_encode($message),
    'displaytime' => 30000    

$jsonData = array(
    'jsonrpc' => '2.0',
    'method' => 'GUI.ShowNotification',
    'params' => $jsonParams,
    'id' => 1

$jsonStr = urlencode(json_encode($jsonData));

foreach($openelecStations as $oe)


The script accepts title and message parameters with special characters, e.g. German Umlaute.

Call it e.g. from your KNX server like:

$message='close your garage door';


Note the example is written in PHP again but of course, it depends on what your source server supports. Always make sure title and text values are encoded in common URL format when using special characters.[:]