Pushsafer – Push messages in ioBroker

With Pushsafer, we can easily and securely send real-time push notifications to iOS, Android and Windows devices from ioBroker.

Beelink SER5 Mini PC

ad

Beelink SER5 Mini PC

AMD Ryzen 7 5800H Processor,Mini Computer with 16G DDR4 RAM/500GB M.2 NVMe 2280 SSD,4K FPS/Three-Screen Display/WiFi 6/BT5.2/Support Auto Power On.

Ideal for Smart Home, Mosquitto, ioBrokers or media servers.

To send push messages, we need an account on pushsafer.com. After registration, log in to access your private key.

Here on the pushsafer page, we also need to register the devices with which we want to receive Push messages. Make a note of the device identifier (ID), you will need it later.

To send push messages, we need an account on pushsafer.com

To receive pushsafer messages, download the application to your mobile phone or PC from the appropriate store.


Before we can send push messages from ioBroker, we need to install the pushsafer adapter. Open the “Adapters” page of ioBroker, find the pushsafer adapter, and then install a copy.

find the pushsafer adapter and install a copy.

After successful installation, you will be taken to the settings page of the pushsafer instance. The private key obtained after logging in from the pushsafer.com page must be entered here.

In the “Notification settings” section, we can specify the default settings for sending Push messages, such as the ID of our default device with which we receive the message, the default address of the message, etc.

When done, save the settings page.

enter the private key obtained from pushsafer.com

With this we are ready to send and receive pushsafer messages.

CanaKit Raspberry Pi 4 8GB Extreme Kit – 128GB Edition (8GB RAM)

Includes Raspberry Pi 4 8GB Model B with 1.5GHz 64-bit quad-core CPU (8GB RAM), 128GB Samsung EVO+ Micro SD Card (Class 10), USB MicroSD Card Reader, Premium High-Gloss Raspberry Pi 4 Case with Integrated Fan, CanaKit 3.5A USB-C Raspberry Pi 4 Power Supply, Heat Sinks, 2 Micro HDMI to HDMI Cables

ad

Includes Raspberry Pi 4 8GB Model B with 1.5GHz 64-bit quad-core CPU (8GB RAM), 128GB Samsung EVO+ Micro SD Card (Class 10), USB MicroSD Card Reader, Premium High-Gloss Raspberry Pi 4 Case with Integrated Fan, CanaKit 3.5A USB-C Raspberry Pi 4 Power Supply, Heat Sinks, 2 Micro HDMI to HDMI Cables

Let’s send a push message from ioBroker using javascript code simply with the sendTo() function.

sendTo("pushsafer.0", "Greetings from ioBroker.");

The code above sends a push message with the text specified in the second parameter of the function. The first parameter of the function is the pushsafer.0 instance with which we send the push message.

If another copy of the pushsafer adapter has been installed, the second copy must be sent as follows.

sendTo("pushsafer.1", "Greetings from ioBroker.");

If only one copy is installed or if you want to send from all copies, do it according to the following code snippet.

sendTo("pushsafer", "Greetings from ioBroker.");

When sending a push message, you can specify other options in the second parameter of the sendTo() function. We can see the options in the following code.

sendTo("pushsafer", {
   message:   'Pushsafer message from ioBroker.',
   title:     'ioBroker',
   device:    '31332',
   sound:     '6', 
   icon:      '1',
   vibration: '1',
   priority:  '2',
   time2live: '2',
   url:       'https://myhomethings.eu',
   urlTitle:  'Myhomethings - pushsafer presentation'
});

The details of the parameters of the code snippet above:

message : The text of the push message, this parameter is mandatory.

title : The title of the message. Optional, if not specified, the default value specified on the settings page of the pushsafer instance will be used.

device : The identifier of the recipient device. if not specified, the message will be sent to the default device.

sound : The sequence number of the notification sound in the pushsafer API. This number can be between 0-62. Optional, if not specified, the default value will be used.

icon : Serial number of the icon displayed in the pushsafer message, value between 1-181.

vibration : Turn on the device’s vibration when notified, the value can be 1-3. If not specified, the default value will be used.

priority : Defines the priority of the message. its value can be between -2 and +2.

url : We can add a clickable link to the push message.

urlTitle : The title of the link.

time2live : Time in minutes after which the message is automatically deleted. Integer between 0-43200.