Send Push Notifications through pushsafer.com from a Homematic CCU2 or CCU1 to your Browser, Android, iOS and/or Windows 10 device.
With Pushsafer.com you give the CCU the opportunity to send a push notification for every event action. The push notification you can modify to your needs.
- The first step is to install the CUx daemon on your CCU2 or CCU1. The CUx daemon makes it possible to communicate with our API by using a CURL connection. The CUx-Daemon you can download here.
- Now login into your CCU with your favorite browser, afer that navigate to Preferences/Control Panel. Select additional software
- Now select the downloaded, not unzipped file and click install. After installation and a reboot of your CCU the Cux daemon is available under additional software. Noow set up the Cux Daemon
- In the window which opens you have to create a new device. Create a new device (28)System with the function Exec.
- After clicking on Create device you can close the window. In the devices inbox confirm the created device. Copy the serial number of the device in the settings window. This you will need later.
Send Push NotificationsCreate a new program in the area programs and associations. Configure the desired condition in which a push message should be sent. Select "Script" in the option field "Activity" and enter the following code:
string title = "Subject: Title";The defined variables and serial number (in this example: CUX2801000) you have to replaced by yours!
string message = "This message will be sent by push notification";
string sound = "5";
string icon = "11";
string vibration = "1";
string device = "325";
string privatekey = "4jK9Iod92jSA2WE4R5Un9dDsW";
dom.GetObject("CUxD.CUX2801000:1.CMD_EXEC").State("LD_LIBRARY_PATH=/usr/local/addons/cuxd /usr/local/addons/cuxd/curl -s -k -d k='"#privatekey#"' -d t='"#title#"' -d m='"#message#"' -d s='"#sound#"' -d i='"#icon#"' -d v='"#vibration#"' -d d='"#device#"' https://www.pushsafer.com/api");
For more information about replacing values (title, message, icon, icon color, sound, vibration) in your push notification, check out our API description!