[OBSOLETE] NHL Game Notifications

Once I get this app solid, I am going to look into either adding additional sports or separate app for each sport. Right now what I use is specifically for NHL, I;m actually more of a football fan myself, but my wife is a big hockey (ie. Pengiuns) fan (she is actually in a women’s hockey league too). In order to get her more in favor of my HA addiction, I decided to write this app to show her some of the possibilities (she kind of has to be dragged into technology). Anyway, I’ll definately be looking into expanding into other sports (NFL and College football being the logical next one for me)

1 Like

If you go to the smartapp link above, there is a donate button I setup.

1 Like

So this being a HA app, my intent was a setup and forget (let it do the work). The Smartapps in general are made to be a set and forget - not really an environment to start/stop all the time. However, I do see the advantage of using a “switch” enable/disable it. I will add this functionality, as I don’t think it would be difficult. I’ve been also thinking about adding support so a momentary button can trigger a goal manually (this would also replace the debug option to trigger a goal for testing).

I use to have just a single page, but I seperated it as more and more options were added. When testing, I do get a bit annoyed at having to go thru all 4 screens - I’ll look to see if there is a way to shortcut this on the first page or something.

1 Like

Eric, can you elaborate on the color changing option? Can this be used in conjunction with the flash command? Should the light change back to its original state (color)?

Seth

In this particular case, I might see a scenario in which the status became “unknown” in between the game start and the first goal - a glitch could have caused this and I think I know what I can to do work around it. I’ll look into make a change.

Yes, and Yes :wink: Under the section Goal Options you can set light color, level, and delay in goal notification. for each light selected, if the light supports color changing it will save the color settings, change the light color and level before and set it back after. I don’t currently have a color light to test with, so it is kind of untested right now. I get my speaker delivered today and I’ll look at getting a colored light soon. I have a red police light that I have hooked to the On/Off logic right now.

OK, just want to know whats expected while I test. also this turns all lights selected to one specific color correct? I do not see individual control. lets say I select two bulbs, I can not change them each to a color I assume.

I’m pretty sure I only have one instance, and I know only 1 team. Here is are screen shot of one of the times I got multiple messages. Some a duplicate some are not.

I only offer this as data to show what I’m talking about. If you wanted to look into it, great if not that’s fine to. Most likely not even the app could be something else.
I appreciate what this app does and I can understand how much work something like this can be.

Correct, all lights change to the same color and then ‘attempts’ to restore the original settings for each light.

Got it. Ill let you know!

1 Like

That is helpfull… If there is something going on in which the stored status or team goals is getting reset, this might cause what your seeing. These should only get reset when checking for game day scheduled at the beginning of the day or when the app settings are updated (after selecting Done). Anytime you update the app settings, it’s going to reset the app. Now it’s possible that the status is getting set to an unknown value, and I’ll be looking into a change to prevent that during the game.

I also notice that if you set the app after the game has started AND your team has already scored, it will trigger the alert as soon as you commit the changes.

Yes, once it determines it is game day and the game is in process, it will run the check status routine immediately and since the scores were reset, the first time it will notice a score change and initiate a goal notification. And if the opposing team has scored, soon after it will notify that the opposing team scored as well. That is kind of a side effect if you start or update the app in the middle of a game.

Okay so more info. I did not have smarthings open and I know I was not in the app during the either of the message burst. First time I was eating a late dinner after work, 2nd time phone was sitting off to side as I was watching the game with family.

Thanks again for your work.

I’m making some changes to the logic … it’s possible if there were network issues (like the request failed) it was resetting the game status to unknown. I’ll have another update later today, which should also include support for a Button (or virtual Button) to trigger the goal manually and a Switch (or virtual switch) to enable/disable game status and goal notifications.

2 Likes

I don’t want to be the type who’s always begging for changes based on my use case… but if possible, can it be programmed so that all SmartApp instances can listen for a single virtual button, but only activate on individual virtual switches? That would make the room I set up as per this screen shot work perfectly. A big button to trigger whichever one is on if I want to manually do it, and switches to turn on the team I’m watching at the time.

The way I implemented it right now (I’ll release it in a little while), you have a manual button (simulated Button) to trigger goals and a separate switch (simulated Switch) for enabling/disabling notifications. I think this can be setup to do what you want, manual goals will only trigger on the team you have the switch enabled for. Now, if you enable multiple teams, then you will get multiple team goal notifications all at once.which is kind of a side effect and prob won’t work well together. It’s not ideal, but I think it should work for now - I’m looking into a way to possibly better support multiple teams in a future release, but baby steps for now :wink:

1 Like

This is a great idea / change. Can disable it when your not watching the game. :smile:

I just committed changes, as follows:

  • Added version info
  • Added selectable button to manually trigger goal
  • Added selectable switch to enable/disable game notifications
  • Changed some logic attempting to prevent unknown status to trigger duplicate game messages

See the following link:

So the trigger for manual operation is set to only buttons? I wondering how to create a virtual button. any tips? and then what do you think, ifttt can make a button to put on my iOS home screen?