Domotica gratuit › Forums › How can I …? › Synology NAS › Pushover: Sending message to specified user/device
Mots-clés : pushover devices user virtual device LOV
- Ce sujet contient 11 réponses, 3 participants et a été mis à jour pour la dernière fois par
djandib, le il y a 4 années.
-
AuteurMessages
-
juin 29, 2016 à 10:41 #3580
djandib
ParticipantHi!
As I read here: https://pushover.net/api it`s possible to send messages to specified devices.
Unfortunately in the Pulse-Station Blockly for Pushover I don`t see this possibility.
Is there a workaround?Why I need this?
As long as I work on new scences, I don`t want to receive the test-messages at all devices, but only e.g. at my mobile… (My wife got angry with me, because the got all messages at her mobile too ;-))Thanx
Andijuin 29, 2016 à 3:27 #3584Miss Laura
ModérateurHi,
You can use a blocky custom PHP block to send the Pushover messages in a custom way.
Example code:
<?php curl_setopt_array($ch = curl_init(), array( CURLOPT_URL => "https://api.pushover.net/1/messages.json", CURLOPT_POSTFIELDS => array( "token" => "APP_TOKEN", "user" => "USER_KEY", "message" => "hello world", ), CURLOPT_SAFE_UPLOAD => true, )); curl_exec($ch); curl_close($ch);
You can then set custom parameters any way you prefer 🙂
Have fun,
Laurajuillet 4, 2016 à 2:15 #3593djandib
ParticipantThanx a lot
juillet 4, 2016 à 3:14 #3594Miss Laura
ModérateurDid you manage to get it to work?
Feel free to share the code back 🙂Have fun,
Laurajuillet 5, 2016 à 12:52 #3596djandib
Participantyes.
It´s exactly like you said:
***
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => “https://api.pushover.net/1/messages.json”,
CURLOPT_POSTFIELDS => array(
“token” => “APP_Token”,
“user” => “USER_KEY”,
“device” => “DJ-mobile”,
“sound” => “alien”,
“message” => “Test”,
),
CURLOPT_SAFE_UPLOAD => true,
));
curl_exec($ch);
curl_close($ch);****
APP_Token = Your APP-Key from https://pushover.net/apps/
User_key = Your User-KEy from https://pushover.net/
device = Device-Name from https://pushover.net/
sound = from https://pushover.net/api#sounds@Laura:
Maybe you can pimp the Pushover-Blockly with “device” as a free field for the next update?
🙂juillet 5, 2016 à 4:00 #3597Miss Laura
ModérateurGreat, tx!
Added to the ideas list.Have fun,
Laurajanvier 8, 2017 à 1:33 #4039djandib
ParticipantHi Laura,
anything new about this topic?Andi
Btw: in the sound DDL “none” is missing, too.
janvier 9, 2017 à 12:08 #4041K.Rens
Maître des clésHi Djandib,
I’ve looked into the code and:
It’s compiled and encrypted, I cannot change itThis means I cannot add the sound and I cannot add a device specific message.
What I can do is completely rewrite it from scratch, which shouldn’t be too difficult, it just takes time.
I’m only now starting to figure out how to add custom blocky blocks inside PulseStation, so I can get started on that as well.
Nothing I can’t solve, just takes a lot more time for a free hobby project.
Kind regards,
K.Rensjanvier 9, 2017 à 11:43 #4045djandib
ParticipantThanx for answer.
Unfortunately I cannot programm Blocky until now….
So in that point I cannot help you 🙁janvier 11, 2017 à 12:11 #4053K.Rens
Maître des clésBut it works with the custom php blocky block, right?
You should be able to already do all you want untill we rewrite the full code?Kind regards,
K.Rensfévrier 12, 2017 à 6:24 #4143djandib
ParticipantHi Koen,
I took a little workaround:
1) Calling Scene:
2) Called Scene
Unfortunately Pulse-Station “forgets” the variables, so I have to save them for using them at the called Scene.
Andi
février 13, 2017 à 7:56 #4144djandib
ParticipantKoen told me that he uses for this the virtual devices LOV. With them you can use up to 4 values.
I think this should be another way:
1) Create a virtual LOV device (e.g. “Pushover”)
2) Calling Scene:
3) Called Scene:
Feel free to give some comments.
Andi
-
AuteurMessages
- Vous devez être connecté pour répondre à ce sujet.