meg768 / homebridge-pushover Goto Github PK
View Code? Open in Web Editor NEWSend messages via Pushover from HomeKit
Send messages via Pushover from HomeKit
Hey,
Can you Publish also to npmjs.com ?
Thats better to install on my PI in Homebridge.
To avoid accidental message disablement it would be nice to have a config option to only have the master switch if specified in config file.
Is there any way to get dynamic content in the message?
E.g.sensor data (like temperature)?
After updating to 1.0.11, receive error as follows. Suggestions welcome.
TypeError: Cannot read property 'forEach' of undefined
at Platform.accessories (/usr/local/lib/node_modules/homebridge-pushover/src/platform.js:63:30)
at Server._loadPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:403:20)
at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:341:16)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:90:36)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:59:10)
at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
After the 1.0.4 update the master switch has no effect anymore. Notifications are pushed anyway regardless of the setting.
Besides that, great changes in 1.0.4.
Thank you.
Hi, I installed everything and just took your example of the messages and got this message, when I push my first message
[2019-2-14 14:05:44] [Pushover] Sending message: Larm avaktiverat
/usr/local/lib/node_modules/homebridge-pushover/node_modules/pushover-notifications/lib/pushover.js:83
throw new Error(d.errors[0]);
^
Error: application token is invalid
at Pushover.errors (/usr/local/lib/node_modules/homebridge-pushover/node_modules/pushover-notifications/lib/pushover.js:83:12)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-pushover/node_modules/pushover-notifications/lib/pushover.js:167:11)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
I copied the token directly from Pushover and tried as user my mail account, with which I log into Pushover as well as the Pushover-notification email. Result is the same.
node -v is 8.11.3
Hi,
is there some way to define the Message title, rather than it just being "HomeBridge" for every message that gets sent? If not, is it possible to add that functionality?
Thanks - otherwise, great plugin!
cheers
Chris
The priority function does not seem to work as designed.
This is my config:
{ "name": "Deep Freeze Open", "message": "Deep Freeze Open", "priority": "high" }
This does send a message, but as a regular priority
According to pushover documentation, the request to api.pushover.net should be "1" and not "0" or "-1"
Not a proper solution but I just ended hardcoding it to my path.
[8/18/2019, 11:37:36 PM] Loaded plugin: homebridge-pushover
path.js:39
throw new ERR_INVALID_ARG_TYPE('path', 'string', path);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at assertPath (path.js:39:11)
at Object.join (path.js:432:7)
at Plugin.module.exports [as initializer] (C:\Users\pax07\AppData\Roaming\npm\node_modules\homebridge-pushover\index.js:8:42)
Homebridge has a flag that allows you to change your config path. It isn't guaranteed to be in ~/.homebridge
.
There is a method available in the homebridge.user
object variable called storagePath
. This should be used.
Here is an example from your index.js
file.
require('dotenv').config({path: Path.join(homebridge.user.storagePath(), '.env')});
Hello,
thanks for this plugin! It works great!
Would it be possible to add the option emergency Priority?
Text from pushover.net:
„Emergency-priority notifications are similar to high-priority notifications, but they are repeated until the notification is acknowledged by the user. These are designed for dispatching and on-call situations where it is critical that a notification be repeatedly shown to the user (or all users of the group that the message was sent to) until it is acknowledged. The first user in a group to acknowledge a message will cancel retries for all other users in the group.
Applications sending emergency notifications are issued a receipt that can be used to get the status of a notification and find out whether it was acknowledged, or automatically receive a callback when the user has acknowledged the notification.
To send an emergency-priority notification, the priority parameter must be set to 2 and the retry and expire parameters must be supplied.
The retry parameter specifies how often (in seconds) the Pushover servers will send the same notification to the user. In a situation where your user might be in a noisy environment or sleeping, retrying the notification (with sound and vibration) will help get his or her attention. This parameter must have a value of at least 30 seconds between retries.
The expire parameter specifies how many seconds your notification will continue to be retried for (every retry seconds). If the notification has not been acknowledged in expire seconds, it will be marked as expired and will stop being sent to the user. Note that the notification is still shown to the user after it is expired, but it will not prompt the user for acknowledgement. This parameter must have a maximum value of at most 10800 seconds (3 hours).
For example, sending a retry parameter of 60 and an expire parameter of 3600 will cause your notification to be retried every 60 seconds for 1 hour.
The optional callback parameter may be supplied with a publicly-accessible URL that our servers will send a request to when the user has acknowledged your notification.
When your application sends an emergency-priority notification, our API will respond with a receipt value that can be used to get information about whether the notification has been acknowledged. See our receipts and callbacks section for more information.
If your application is not capable of storing receipt identifiers, you can send a tags parameter of comma-separated, arbitrary tags which will be stored with the receipt on our servers. You can then use the cancel_by_tag API call to cancel all receipts with a specific tag.“
When starting homebridge, the automatically created master switch defaults to off, preventing use.
Is there a way to default this behavior to on, or disable the master switch (IE always on?)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.