Git Product home page Git Product logo

Comments (5)

mg3point avatar mg3point commented on July 17, 2024 1

Thanks for this, I really wasnt suggesting you HAD to do them, just some enhancements i was thinking of.

I was thinking about the PP issue of recalling it everytime and thoought about an if state set up like this...

////// Power Play Checker
////// based on api ("powerPlay" : false)
currentPPState = false;

if powerPlay == true {
if curentPPState = false{
PlayPPAudio()
currentPPState = True;
}
}
else {
currentPPState = false;
}

as for the period timer, I saw something along the lines of ordinalNumber and end time you could perhaps use and compare to current time to decipher if the period was over then give it a 15 minute delay on the audio que.

Just some thoughts. Thanks again for your work on this. (hopefully i can get my other issue sorted out to get this working) Now if only the CBJ could wake back up and play good hockey again.

from nhl_goal_light.

arim215 avatar arim215 commented on July 17, 2024

Hello and thank you for commenting. (I'd like to say that i watched your video a long time ago when i started my goal light project! Really like how the light behind the tv rotate!)

You bring very interesting points. I will fix the reset to zero for new game, since i now detect end of games. So ill put the reset score with the end of game.

For the disallowed goal... i've only encountered it once and the way it worked out was : the goal went in, but the NHL didn't add it to the API i used cause it was being reviewed (i guess they dont post goals where there is a good enough doubt. But i'd have to think how to go back 1 goal in case a goal is disallowed.

For the special 3rd goal horn, that shouldn't be too hard (i don't think ill add it to my code since it's a special case... the Canadians have a 5goals = chicken wings...!) but i could send you the code you'd need to add to get it...

I never looked into the powerplay sound ... if it's in the api, can't be too hard... my only concern is how to make it sound once and not continuously (because i do a continuous loop to check api variables...)

and i haven't found a var in the api to tell me that the game is in intermission (i'll keep looking...) but it's a good idea.

But all those are all custom function that not EVERYONE would want... thus not sure if theyr are worth adding to my code, since it would make the setting up harder... but i'll think about it!

Thanks a lot for the comment and i'll try to work soon on some of theses ideas!

from nhl_goal_light.

arim215 avatar arim215 commented on July 17, 2024

@mg3point , commit a8889e0 fixes goal disallowed and game reset score!

from nhl_goal_light.

arim215 avatar arim215 commented on July 17, 2024

@mg3point , good news! i prepared you a code that would allow to have a special 3rd goal horn!

replace the light.py file in /lib folder with this one:
light.zip

make sure to have a "3rdgoal.mp3" in the /audio folder ...

if anyone else wants to use this for a different team and different score, just change the team_id in the url and the var. and change the "if" compare value to the amount of goal to check. and place a "3rdgoal.mp3" in /audio folder or rename de "command_play_song" .mp3 to the name of the file

enjoy! ill try to keep working on your other requests and improvements

from nhl_goal_light.

arim215 avatar arim215 commented on July 17, 2024

I looked in to this and there is no powerplay indication on "statsapi.web.nhl.com/api/v1/schedule?teamId=#". So I can't check for powerplay... for now I can't put more energy into this to find a more elaborate solution. Same goes for the intermission.

from nhl_goal_light.

Related Issues (19)

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.