Exactly what I needed. Thanks!dduff617 wrote:if your energy meter usage value is a property of an indigo device, then you can use the syntax "%%d:nnnnnn:stateid%%", where you would replace "nnnnnn" with the numeric deviceID and "stated" with the name of the state.
Pushover Plugin - push notifications
Re: Pushover Plugin - push notifications
Re: Pushover Plugin - push notifications
Is there a link to a list of all possible substitutions and their syntax? A user manual of sorts?FlyingDiver wrote:If it's a device state, then you can do that substitution as well.
Cheers
John
- FlyingDiver
- Posts: 7326
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Pushover Plugin - push notifications
There's only variable substitutions and device state substitutions, both of which are described in the last few posts in this thread.Dual wrote: Is there a link to a list of all possible substitutions and their syntax? A user manual of sorts?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Pushover Plugin - push notifications
Thanks! Pushover is awesome. I am using it extensively. Great plugin!FlyingDiver wrote:There's only variable substitutions and device state substitutions, both of which are described in the last few posts in this thread.
Sent from my iPhone using Tapatalk
Re: Pushover Plugin - push notifications
When entering my message in the Message field how do I include a carriage return (line feed) in my message so I can delineate my message across several lines?
John
Sent from my iPhone using Tapatalk
John
Sent from my iPhone using Tapatalk
Re: Pushover Plugin - push notifications
I don't know of a way to do it via the plugin menu dialogue, but you can do it in a Python script:
Code: Select all
alertPlugin = indigo.server.getPlugin('io.thechad.indigoplugin.pushover')
if alertPlugin.isEnabled():
msgTitle = "Test"
message = "Hello\nsailor"
try:
alertProps = {'msgTitle':msgTitle, 'msgBody':message, 'msgSound':'pushover', 'msgPriority':0, 'msgDevice':'', 'msgSupLinkUrl':'', 'msgSupLinkTitle':''}
alertPlugin.executeAction("send", props=alertProps)
except:
indigo.server.log('Message send error', isError=True)
else:
indigo.server.log('Pushover plugin not available', isError=True)
Re: Pushover Plugin - push notifications
If you have a multi-line text field saved as a variable, you can use that variable in the pushover message and it will do the carriage returns.
If you are going to have to write a script to build the variable first, either include sending the pushover message from that script or add a slight delay to allow the script to run before the pushover plugin fires.
Most of my pushover actions are currently done via python script outside of the plugin so I can segregate my notifications by type. I've created Application APIs for various subjects (Climate, Security, Network, Motion, Access Control, etc.)
This is one I use with the Fing plugin to notify me via email, pushover and indigo log entry when a new device joins my network. (I stole this from someone else on the forum... credit to that guy )
I hope that helps. FYI, I never figured out how to do a pushover subject line via python.... my script only captures the subject line for the email part of my script.
If you are going to have to write a script to build the variable first, either include sending the pushover message from that script or add a slight delay to allow the script to run before the pushover plugin fires.
Most of my pushover actions are currently done via python script outside of the plugin so I can segregate my notifications by type. I've created Application APIs for various subjects (Climate, Security, Network, Motion, Access Control, etc.)
This is one I use with the Fing plugin to notify me via email, pushover and indigo log entry when a new device joins my network. (I stole this from someone else on the forum... credit to that guy )
Code: Select all
ipDev = indigo.variables["ipDevsNewDeviceNo"]
ipDevVarNumber = ipDev.value.split(";")[0]
devName = ipDev.value.split(";")[1]
dev = indigo.devices[devName]
st = dev.states # shortcut
theSubject = "New device on network: " + st["ipNumber"]
theBody = "New device on network: " + st["ipNumber"] +"\n"
theBody += "MACNumber: " +st["MACNumber"] +"\n"
theBody += "hardwareVendor: " +st["hardwareVendor"] +"\n"
theBody += "indigoID: " +str(dev.id) +"\n"
theBody += "Name : " +devName +"\n"
indigo.server.log(theBody)# also send it to the indigo log file
indigo.server.sendEmailTo("YourEmail@gmail.com", subject=theSubject, body=theBody)
import requests
r = requests.post("https://api.pushover.net/1/messages.json", data = {
"token": "ApplicationToken", #your application token, I used a specific one for network
"user": "YourPushoverUserNumber",
"message": theBody
})
print(r.text)
Bill
My Plugin: My People
My Plugin: My People
Re: Pushover Plugin - push notifications
Here is another example (used for letting me know if the thermostat setting change) that creates the message by combining different variable. (of course this references my variables and you'd have to change that)
Code: Select all
#Build the message
import datetime
Time = "{date:%H%:%M}".format(date=datetime.datetime.now())
DTG = u"{}_{}".format(Time, Title)
theMode = indigo.variables[143562231].value
isCool = indigo.variables[285071090].value
isHeat = indigo.variables[1231095420].value
Temp = indigo.variables[796298002].value
TheMessage = '%s\n%s at %s\n%s is %s\n%s is %s\n%s is %s' % ("Thermostat Mode Change", theMode, Time, "Cool Setpoint", isCool, "Heat Setpoint", isHeat, "Current Temp", Temp)
indigo.variable.updateValue(195713191, value=TheMessage) # I used this line for testing to see if it was building a message or error-ing out.
#Send Pushover message
import requests
r = requests.post("https://api.pushover.net/1/messages.json", data = {
"token": "YourApplicationToken", # I used a specific application token for climate
"user": "YourPushoveUserID",
"message": TheMessage
})
print(r.text)
Bill
My Plugin: My People
My Plugin: My People
- FlyingDiver
- Posts: 7326
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Pushover Plugin - push notifications
Please file an enhancement request for a multi-line message text field: https://github.com/IndigoDomotics/indig ... ver/issuesDual wrote:When entering my message in the Message field how do I include a carriage return (line feed) in my message so I can delineate my message across several lines?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Pushover Plugin - push notifications
The plugin is not working anymore for me. Seems like a connection error.
Pushover works over the website directly.
I'm running the latest version 1.5.4.
Pushover works over the website directly.
I'm running the latest version 1.5.4.
Pushover Error Error in plugin execution ExecuteAction:
Traceback (most recent call last):
File "plugin.py", line 114, in send
File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/api.py", line 111, in post
File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/api.py", line 57, in request
File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/sessions.py", line 477, in request
File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/sessions.py", line 587, in send
File "/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/adapters.py", line 467, in send
ConnectionError: ('Connection aborted.', error(54, 'Connection reset by peer'))
Re: Pushover Plugin - push notifications
I have a message sent via Pushover every hour. It has failed intermittently over the past several weeks. Yesterday 20 messages succeeded and 4 failed.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Re: Pushover Plugin - push notifications
The api is down due to a DoS attack.
https://twitter.com/pushoverapp/status/ ... 48416?s=21
Sent from my iPad using Tapatalk Pro
https://twitter.com/pushoverapp/status/ ... 48416?s=21
Sent from my iPad using Tapatalk Pro
Re: Pushover Plugin - push notifications
I have a recurring error from Pushover in my log:
It appears to be due to the degrees symbol included in my Pushover message:
I am using the latest version of Pushover from the Plugin store 1.5.3.
I checked on GitHub (I am not a user of GitHub nor knowledgable re GitHub) and see Issue #26 fix - unicode error ... @FlyingDiver committed on Apr 27, 2019. There is a Release 1.5.4 @FlyingDiver released this on Apr 27, 2019. It is labelled Pre-release.
I am guessing the fix by @FlyingDiver would correct my problem. Why is it pre-release and not available from the Indigo Plugin Store? Can I download it from GitHub somehow and use it with Indigo, replacing version 1.4.3? How do I do this?
Cheers
John
Code: Select all
2020-09-08 00:00:06.673 Pushover Error Error in plugin execution ExecuteAction:
Traceback (most recent call last):
File "plugin.py", line 121, in send
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 25: ordinal not in range(128)
Code: Select all
1.112 kWh energy used
83 °F west temperature
I checked on GitHub (I am not a user of GitHub nor knowledgable re GitHub) and see Issue #26 fix - unicode error ... @FlyingDiver committed on Apr 27, 2019. There is a Release 1.5.4 @FlyingDiver released this on Apr 27, 2019. It is labelled Pre-release.
I am guessing the fix by @FlyingDiver would correct my problem. Why is it pre-release and not available from the Indigo Plugin Store? Can I download it from GitHub somehow and use it with Indigo, replacing version 1.4.3? How do I do this?
Cheers
John
- FlyingDiver
- Posts: 7326
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Pushover Plugin - push notifications
Just go to the Releases section of the GitHub project and download it from there.Dual wrote: I checked on GitHub (I am not a user of GitHub nor knowledgable re GitHub) and see Issue #26 fix - unicode error ... @FlyingDiver committed on Apr 27, 2019. There is a Release 1.5.4 @FlyingDiver released this on Apr 27, 2019. It is labelled Pre-release.
I am guessing the fix by @FlyingDiver would correct my problem. Why is it pre-release and not available from the Indigo Plugin Store? Can I download it from GitHub somehow and use it with Indigo, replacing version 1.4.3? How do I do this?
Cheers
John
I expect I was waiting on testing feedback and no one ever got back to me on it. Let me know if you have any issues.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Pushover Plugin - push notifications
I downloaded and installed the 1.5.4 version.
My notification ran at the top of the hour error free.
Thanks @FlyingDiver for the fix and the help on how to get it from GitHub.
Cheers
John
My notification ran at the top of the hour error free.
Thanks @FlyingDiver for the fix and the help on how to get it from GitHub.
Cheers
John