emoncms / event_archived

Setup actions to occur when a feed goes above, below or is equal a set value. Set another feed or send an email
8 stars 25 forks source link

Implemented support for iPhone + Android notifications using Pushover.net #29

Closed dazzag24 closed 10 years ago

dazzag24 commented 10 years ago

Implemented support for iPhone + Android notifications using Pushover.net.

Changes are fairly self contained, except for some minor indentation/whitespace cleanup in event_model.php.

avenantsoftware commented 10 years ago

weird they don't add this, this is a great improvement

elyobelyob commented 10 years ago

Not overly weird, I've got a full time job and don't really have the time at present to go through this and test it.

In fact, this is really just adding existing a different flavour of functionality that already exists .. I don't want to have to keep adding new services because someone wants a different provider. Can this be justified as to what makes it better than existing services? I'm not really prepared to spend my money on an android and ipad client when it adds not much extra to what is already there. And I guess, this brings me around to, I'm not adding in functionality I can't test.

On Sun, Mar 23, 2014 at 1:09 AM, spambus notifications@github.com wrote:

weird they don't add this, this is a great improvement

Reply to this email directly or view it on GitHubhttps://github.com/emoncms/event/pull/29#issuecomment-38369954 .

dazzag24 commented 10 years ago

Hi elyobelyob,

All fair points. Perhaps it would have been nice if you could have stated your concerns 2 months ago? ;-)

I would argue that by providing a plugin framework there is a certain expectation that people will implement plugins. No matter, my emoncms is functioning well. I just wondered if others would like this and so I did a pull request.

Thanks

elyobelyob commented 10 years ago

Hi, to be honest, it was only the nudge that made me notice the request. I've basically handed across this to Trystan, but am still authorised to do pulls. I don't spend much time on it, as it seems to be working a charm.

Don't get me wrong, I'm not against adding in different stuff .. but I made a choice on the best services I had at the time. Perhaps if others want this, then it can be added. It's not a 'the buck stops here' thing.

One justification, I guess, would be that it is not a single os service. Is that right? AFAIK, I just had prowl running for OSX and NMA for Android.

Any reason you decided not to use the existing and spend your time on adding in the new system?

On Mon, Mar 24, 2014 at 11:50 AM, dazzag24 notifications@github.com wrote:

Hi elyobelyob,

All fair points. Perhaps it would have been nice if you could have stated your concerns 2 months ago? ;-)

I would argue that by providing a plugin framework there is a certain expectation that people will implement plugins. No matter, my emoncms is functioning well. I just wondered if others would like this and so I did a pull request.

Thanks

Reply to this email directly or view it on GitHubhttps://github.com/emoncms/event/pull/29#issuecomment-38435222 .

elyobelyob commented 10 years ago

Oh, and in terms of getting stuff done - i've been trying since Christmas 2012 (when I wrote event module) to get this added as a default module. I cannot really see why people wouldn't want to have alerts set.

On Mon, Mar 24, 2014 at 12:02 PM, Nick Boyle nick@elyob.com wrote:

Hi, to be honest, it was only the nudge that made me notice the request. I've basically handed across this to Trystan, but am still authorised to do pulls. I don't spend much time on it, as it seems to be working a charm.

Don't get me wrong, I'm not against adding in different stuff .. but I made a choice on the best services I had at the time. Perhaps if others want this, then it can be added. It's not a 'the buck stops here' thing.

One justification, I guess, would be that it is not a single os service. Is that right? AFAIK, I just had prowl running for OSX and NMA for Android.

Any reason you decided not to use the existing and spend your time on adding in the new system?

On Mon, Mar 24, 2014 at 11:50 AM, dazzag24 notifications@github.comwrote:

Hi elyobelyob,

All fair points. Perhaps it would have been nice if you could have stated your concerns 2 months ago? ;-)

I would argue that by providing a plugin framework there is a certain expectation that people will implement plugins. No matter, my emoncms is functioning well. I just wondered if others would like this and so I did a pull request.

Thanks

Reply to this email directly or view it on GitHubhttps://github.com/emoncms/event/pull/29#issuecomment-38435222 .

dazzag24 commented 10 years ago

Hi,

Agree that it would be great to have the event module adopted into core EmonCMS. Who do we poke to see about this? Is there a pull request I can comment on?

As for why I went down the Pushover.net route; I wasn't happy with the 5 notification/day limit on the NMA Android client (https://play.google.com/store/apps/details?id=com.usk.app.notifymyandroid).

I have since discovered another free Android notification service that doesn't have such limits: https://newtifry.appspot.com/page/gettingstarted

I'd certainly prefer free, but I had some play credit hanging around, so I thought I'd give pushover.net a go.

elyobelyob commented 10 years ago

I bought the premium upgrade, which makes it unlimited for life ... prefer to pay for it so they keep the lights on ...

On Mon, Mar 24, 2014 at 2:29 PM, dazzag24 notifications@github.com wrote:

Hi,

Agree that it would be great to have the event module adopted into core EmonCMS. Who do we poke to see about this? Is there a pull request I can comment on?

As for why I went down the Pushover.net route; I wasn't happy with the 5 notification/day limit on the NMA Android client ( https://play.google.com/store/apps/details?id=com.usk.app.notifymyandroid ).

I have since discovered another free Android notification service that doesn't have such limits: https://newtifry.appspot.com/page/gettingstarted

I'd certainly prefer free, but I had some play credit hanging around, so I thought I'd give pushover.net a go.

Reply to this email directly or view it on GitHubhttps://github.com/emoncms/event/pull/29#issuecomment-38450675 .

elyobelyob commented 10 years ago

Trystan is the man to make core .. but doubt it's a priority ...

On Mon, Mar 24, 2014 at 2:42 PM, Nick Boyle nick@elyob.com wrote:

I bought the premium upgrade, which makes it unlimited for life ... prefer to pay for it so they keep the lights on ...

On Mon, Mar 24, 2014 at 2:29 PM, dazzag24 notifications@github.comwrote:

Hi,

Agree that it would be great to have the event module adopted into core EmonCMS. Who do we poke to see about this? Is there a pull request I can comment on?

As for why I went down the Pushover.net route; I wasn't happy with the 5 notification/day limit on the NMA Android client ( https://play.google.com/store/apps/details?id=com.usk.app.notifymyandroid ).

I have since discovered another free Android notification service that doesn't have such limits: https://newtifry.appspot.com/page/gettingstarted

I'd certainly prefer free, but I had some play credit hanging around, so I thought I'd give pushover.net a go.

Reply to this email directly or view it on GitHubhttps://github.com/emoncms/event/pull/29#issuecomment-38450675 .

TrystanLea commented 10 years ago

I've been thinking about this and am keen for it. I think the event module could potentially be merged into the input processing interface, or somehow part of that. So that at the same time that you set up logging to a feed etc you can select to be notified. You could then be notified on an input change rather than a feed change if you didnt need to log to a feed..

dazzag24 commented 10 years ago

While we are discussing if and how this could be pulled into emoncms itself, there is another kind of event that I don't think you can currently alert on. See:

https://github.com/emoncms/event/issues/27

for my thoughts. Basically, it would be very desirable to alert on historic conditions as well as instantateous changes.

TrystanLea commented 10 years ago

I think we need a better way of triggering events so that they dont hang off feed_insert, feed_update being part of the input processing section could be a neater place to bring it in.

TrystanLea commented 10 years ago

The other thought I had was should we start thinking in terms of a pus sub bus with things like events hanging off it..

elyobelyob commented 10 years ago

In terms of all this, I'd probably consider making the services databased also. So, stuff like pushover.net etc can be added by the user rather than force them to use the ones I initially decided on.

On Mon, Mar 24, 2014 at 3:39 PM, Trystan Lea notifications@github.comwrote:

I think we need a better way of triggering events so that they dont hang off feed_insert, feed_update being part of the input processing section could be a neater place to bring it in.

Reply to this email directly or view it on GitHubhttps://github.com/emoncms/event/pull/29#issuecomment-38459486 .

elyobelyob commented 10 years ago

MQTT - do it .. all of the sensor stuff should be going through that. You can then hang whatever you like off the feeds.

On Mon, Mar 24, 2014 at 3:43 PM, Trystan Lea notifications@github.comwrote:

The other thought I had was should we start thinking in terms of a pus sub bus with things like events hanging off it..

Reply to this email directly or view it on GitHubhttps://github.com/emoncms/event/pull/29#issuecomment-38460017 .

dazzag24 commented 10 years ago

MQTT sounds ideal

elyobelyob commented 10 years ago

Would mean rewriting the Pi stuff as well. I already have a bespoke script that runs data into the API from my power MQTT feed. However, I bemoan the overhead of calling http when the core emoncms would be ideally listening to the MQTT feeds.

It brings so much with it over the current process. However, this is getting off topic for this ticket.

On Mon, Mar 24, 2014 at 4:44 PM, dazzag24 notifications@github.com wrote:

MQTT sounds ideal

Reply to this email directly or view it on GitHubhttps://github.com/emoncms/event/pull/29#issuecomment-38468322 .

avenantsoftware commented 10 years ago

@ elyobelyob I have added the code to emoncms running on my server, and tested it for a couple of weeks, and it works perfectly...

@ elyobelyob pushover is for both android and ios

elyobelyob commented 10 years ago

I think we've moved on from whether it works or not, to whether there needs to be a generic system which allows anyone to add their service of choice. However, it's not something i've got time to do. Anyone else fancy the challenge?

On Mon, Mar 24, 2014 at 9:11 PM, spambus notifications@github.com wrote:

I have added the code to emoncms running on my server, and tested it for a couple of weeks, and it works perfectly...

Reply to this email directly or view it on GitHubhttps://github.com/emoncms/event/pull/29#issuecomment-38501665 .