Giter Site home page Giter Site logo

homebridge-pushover's Introduction

homebridge-pushover

Sends messages via Pushover from HomeKit. Can be used in HomeKit automation so that you may be alerted when things happends in your home.

Installation

First, install Homebridge. See https://www.npmjs.com/package/homebridge for more information.

Then install this plugin.

$ sudo npm install homebridge-pushover -g

Configuration File

Configure your ~/.homebridge/config.json with the following platform.

{
    "bridge": {
        "name": "Pushover",
        "username": "CC:22:3D:F3:CE:37",
        "port": 51826,
        "pin": "031-45-154"
    },

    "description": "This is an example configuration file",

    "platforms": [
        {
            "platform": "Pushover",
            "name": "Messages",

            "pushover": {
                "user": "your-pushover-user",
                "token": "your-pushover-token"
            },

            "messages": [
                {
                    "name": "Larm på",
                    "message": "Larm aktiverat"
                },
                {
                    "name": "Larm av",
                    "message": "Larm avaktiverat"
                },
                {
                    "name": "Ringklocka",
                    "message": "Det ringer på dörren",
                    "priority": "high"
                }
            ]

        }
    ]
}

What This Plugin Does

This plugin simply creates buttons with text labels. When pushed to state ON a message is sent using Pushover with the specified Pushover credentials.

I suggest you create all your messages in the config file and then group all messages in a seperate room named 'Messages' in HomeKit.

Bugfixes/Updates

See https://github.com/meg768/homebridge-pushover/releases

Useful Links

homebridge-pushover's People

Contributors

meg768 avatar

Stargazers

 avatar  avatar Valery Semichev avatar Gene Clark avatar Timm Stokke avatar Stefan Kuper avatar Petrus Repo avatar Graham avatar Scott Murray avatar Dyllon Gunawardhana avatar Joel Kirchmeyer avatar  avatar Sean Sweda avatar sorriso93 avatar Rob avatar

Watchers

Phil B avatar James Cloos avatar Sean Sweda avatar  avatar  avatar Rob avatar  avatar  avatar Jason Allen Shoulders avatar  avatar

homebridge-pushover's Issues

Instances that use a custom storage path can not use this plugin.

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')});

Ability To Define Message Title?

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

Full message is shown in Name of the Switch

Hello,

I am testing your plugin an it will be very nice to use.

When I creat a switch with a longer message, the text will be shown fully in the HomeKit switch:

"name": "Test Test 💧💧💧 🚨🚨🚨 🚚🚚🚚", "priority": "high"

bild 02 03 19 um 20 21

Can you please separate the name for the switch and the message?

Thx very lot!!

high priority not working

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"

Make the master switch optional

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.

TypeError: Cannot read property 'forEach' of undefined

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

Master Switch

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?)

NPMJS

Hey,

Can you Publish also to npmjs.com ?

Thats better to install on my PI in Homebridge.

Dynamic message content

Is there any way to get dynamic content in the message?
E.g.sensor data (like temperature)?

index.js path Windows 10

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)

Add „Emergency Priority“ optional for „high priority“?

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.“

Error when pushing

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

Master switch no effect after 1.0.4 update

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.