Originally posted by GaryDN
View Post
Announcement
Collapse
No announcement yet.
HS3 Pushover Plugin
Collapse
X
-
This is a fantastic plugin mrhappy - thanks very much!
I notice that emergency messages provide a receipt/callback of sorts. IS that something the plugin handles? That could be used as an event trigger? For instance, I send a Pushover emergency message that the alarm has gone off and if it's not acknowledged within a certain period, HS3 will send an e-mail, SMS, etc?Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin
Comment
-
I was only looking at this this morning to see if I can implement it. The problem I have is that I can possibly add a trigger for it but it will be non specific as to which message it has come from which means I don't know whether it has any value. The issue being it would in theory be possible to send two emergency notifications and not know which trigger came from which message. Do you think this would be a problem or are you ok with this?
Comment
-
HS3 Pushover Plugin
I see your concern and you're right. While it may suit most situations but you need to handle all use cases and not being able to map event to receipt would be of little use.Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin
Comment
-
Hello,
I have been using this plugin and have found it to work perfectly. Anyway I have now integrated a number of things with tasker (e.g. triggering events when I dial specific numbers) and I would like to push out a message if a do dial a specific number).
I have the event stuff working fine, however part of what I need to do involves me getting information from a database to 'push' to the client.
I am hoping you might have some documentation on the script call and what each variable means, I understand the title, URL and so on, but I am not really sure what the variable numbers are for priority, so for example:
Public Sub PushMessage(ByVal Message As String, Optional ByVal Title As String = Nothing, Optional ByVal Priority As Integer = 0, Optional ByVal Sound As Integer = -1, Optional ByVal sURL As String = Nothing, Optional ByVal sURLTitle As String = Nothing, Optional ByVal sTimeStamp As String = Nothing, Optional ByVal DeviceName As String = Nothing)
I understand the Message, Title, sURL, sURLTitle,DeviceName and so on but I am not sure about the Sound as Integer, Priority as Integer and what they translate to.
I should note I am running HS3 as well
Comment
-
Looking at the tread, I actually think the trigger on a message not being acknowledged is a good idea, I am not entirely sure you really need to know what the message is as that could be handled in events / scripts on the users side.
For example if the alarm goes off, then you probably won't trigger 5 emergency messages just the one, you could have a device value which becomes ON when the alarm is triggered and a notification is sent, then another device which also becomes ON when the notification is sent but when the message is acknowledged it gets turned off, then if the latter device is left ON for greater than x minutes you could run a script to see what triggered the sending of the message, and resend the information or do some other task.
I know it is not perfect, but I do thing the idea of an unacknowledged message trigger is a good idea .
Thanks for the great plugin by the way, this has been great for my system!
Comment
-
Originally posted by travisdh View PostHello,
I have been using this plugin and have found it to work perfectly. Anyway I have now integrated a number of things with tasker (e.g. triggering events when I dial specific numbers) and I would like to push out a message if a do dial a specific number).
I have the event stuff working fine, however part of what I need to do involves me getting information from a database to 'push' to the client.
I am hoping you might have some documentation on the script call and what each variable means, I understand the title, URL and so on, but I am not really sure what the variable numbers are for priority, so for example:
Public Sub PushMessage(ByVal Message As String, Optional ByVal Title As String = Nothing, Optional ByVal Priority As Integer = 0, Optional ByVal Sound As Integer = -1, Optional ByVal sURL As String = Nothing, Optional ByVal sURLTitle As String = Nothing, Optional ByVal sTimeStamp As String = Nothing, Optional ByVal DeviceName As String = Nothing)
I understand the Message, Title, sURL, sURLTitle,DeviceName and so on but I am not sure about the Sound as Integer, Priority as Integer and what they translate to.
I should note I am running HS3 as well
Public Function PushMessage(ByVal DeviceName As String, ByVal Message As String, Optional ByVal Title As String = Nothing, Optional ByVal Priority As String = Nothing, Optional ByVal Sound As String = Nothing, Optional ByVal sURL As String = Nothing, Optional ByVal sURLTitle As String = Nothing, Optional ByVal sTimeStamp As String = Nothing) As Boolean
so it is now a string, you need to send the string contained in the Pushover sounds list here https://pushover.net/api#sounds - sending nothing will leave it to the default tone.
The priority has also now changed to a string parameter, there are only four priorities. They are "low", "normal", "high" and "emergency".
I must have moved away from using integers for some reason but can't remember why at the minute, I think it was something to do with the event actions.
Comment
-
Originally posted by travisdh View PostLooking at the tread, I actually think the trigger on a message not being acknowledged is a good idea, I am not entirely sure you really need to know what the message is as that could be handled in events / scripts on the users side.
For example if the alarm goes off, then you probably won't trigger 5 emergency messages just the one, you could have a device value which becomes ON when the alarm is triggered and a notification is sent, then another device which also becomes ON when the notification is sent but when the message is acknowledged it gets turned off, then if the latter device is left ON for greater than x minutes you could run a script to see what triggered the sending of the message, and resend the information or do some other task.
I know it is not perfect, but I do thing the idea of an unacknowledged message trigger is a good idea .
Thanks for the great plugin by the way, this has been great for my system!
Comment
-
I would be happy to test, I am not sure if you were aware but I have been speaking to the developers and they have added tasker support to pushover messages. This is fantastic as it opens up all sorts of automation opportunities, I am working on my fire stuff with this, and I already have tasker set up so that if i get a fire call it reads me the message through pushover, and then gets my phone ready to dial the responding number.
I have another task on tasker that looks to see if I have dialed the number, then contacts the HS server (through PHLocation's custom HTTP post feature) and triggers another event.
The next event I trigger I just really do so as I want to 'push' an address to the phone, I do a database lookup to get the information but I am abit stuck on how to get it to send a pushover message by scripting.
I tried variations of the following and get errors saying it does not accept this number of arguments:
hs.PluginFunction("Pushover 3P","","PushMessage",{"Travis Phone", dr(0).ToString, "FireMap", "", "", "", dr(3).Tostring & "," & dr(4).ToString, ""})
Could you point me in the right direction with doing a pushover message this way.
I tried with and without the "" between Pushover 3P and the PushMessage
I would be happy to test with any future Pushover plugin versions as well.
Thanks!!
Comment
-
Originally posted by travisdh View PostI would be happy to test, I am not sure if you were aware but I have been speaking to the developers and they have added tasker support to pushover messages. This is fantastic as it opens up all sorts of automation opportunities, I am working on my fire stuff with this, and I already have tasker set up so that if i get a fire call it reads me the message through pushover, and then gets my phone ready to dial the responding number.
I have another task on tasker that looks to see if I have dialed the number, then contacts the HS server (through PHLocation's custom HTTP post feature) and triggers another event.
The next event I trigger I just really do so as I want to 'push' an address to the phone, I do a database lookup to get the information but I am abit stuck on how to get it to send a pushover message by scripting.
I tried variations of the following and get errors saying it does not accept this number of arguments:
hs.PluginFunction("Pushover 3P","","PushMessage",{"Travis Phone", dr(0).ToString, "FireMap", "", "", "", dr(3).Tostring & "," & dr(4).ToString, ""})
Could you point me in the right direction with doing a pushover message this way.
I tried with and without the "" between Pushover 3P and the PushMessage
I would be happy to test with any future Pushover plugin versions as well.
Thanks!!
Scripting
The scripting calls have changed in HS3. To send a message from a script please pass an object array
in the following order to the plugin function 'PushScript'. All array elements should be sent even if they
are optional, if they are optional please send 'Nothing'. This function will return a boolean value of
true/false depending on whether or not the message was successful:
Index(0) = Device Name (Required All Clients to send to all devices)
Index(1) = Message Body (Required)
Index(2) = Message Title (Optional)
Index(3) = Message Priority (Optional normal/low/emergency/high)
Index(4) = Message Sound (Optional 'pushover' etc, from the sound list)
Index(5) = Message URL (Optional)
Index(6) = Message URL Title (Optional)
I did spot on twitter that Tasker was now supported and thought it was just a happy coincidence I have found the developers to be quite good at explaining and adding features.
I'll work on a version with acknowledgements today, my preference at the minute is to use the http get rather than a callback to find out if a message has been acknowledged but I will see how I get on.
Comment
-
Has anyone used a scripting call with this plugin, I am sure it is just me but when I try with the amended information to send a test message I just get errors about invalid char.
PHP Code:&hs.PluginFunction("Pushover 3P","PushScript",{"Travis Phone","Test","Test","Normal","pushover","Nothing","Nothing"})
Thanks
Comment
-
Originally posted by travisdh View PostHas anyone used a scripting call with this plugin, I am sure it is just me but when I try with the amended information to send a test message I just get errors about invalid char.
PHP Code:&hs.PluginFunction("Pushover 3P","PushScript",{"Travis Phone","Test","Test","Normal","pushover","Nothing","Nothing"})
Thanks
Comment
Comment