riffnshred / nhl-led-scoreboard

๐Ÿšจ Display NHL live score, stats, and more of your favorite teams, on a Raspberry Pi driven RGB LED matrix. ๐Ÿšจ
GNU General Public License v3.0
421 stars 96 forks source link

Error after nhl-setup when not simple setup #374

Closed Overboard-code closed 2 years ago

Overboard-code commented 2 years ago

after trying simple config I wanted to add weather and other screens results were:


pi@hockey:~/nhl-led-scoreboard $ sudo python3 src/main.py --led-rows=64 --led-cols=128 --led-gpio-mapping=adafruit-hat-pwm --led-slowdown-gpio=2
INFO: Validating config.json.....
WARN: config.json fails validation: error: [data.preferences.goal_animations must contain ['pref_team_only'] properties]
WARN: Rerun the nhl_setup app to create a valid config.json

In the config file it looks like:

     "goal_animations": {}

it looks like goal animations didn't configure correctly: I think it should be

       "goal_animations": 
        {
                "pref_team_only": false
        }

Logs

pi@hockey:~/nhl-led-scoreboard $ ./nhl_setup
   _  ____ ____     __   _______
  / |/ / // / /    / /  / __/ _ \
 /    / _  / /__  / /__/ _// // /
/_/|_/_//_/____/ /____/___/____/

   _____________  ___  _______  ____  ___   ___  ___
  / __/ ___/ __ \/ _ \/ __/ _ )/ __ \/ _ | / _ \/ _ \
 _\ \/ /__/ /_/ / , _/ _// _  / /_/ / __ |/ , _/ // /
/___/\___/\____/_/|_/___/____/\____/_/ |_/_/|_/____/

   ________________  _____
  / __/ __/_  __/ / / / _ \
 _\ \/ _/  / / / /_/ / ___/
/___/___/ /_/  \____/_/

nhl_setup V1.6.2
nhl led scoreboard V1.6.9
Now validating config......
Your config.json passes validation and can be used with nhl led scoreboard
๐Ÿฅ…๐Ÿ’๐Ÿšจ Do you see a net,stick and horn? Yes
๐Ÿฅ… Do you want a simple default setup with one team selection (Y)? No
๐Ÿฅ… What kind of setup do you want? full
๐Ÿฅ… Do you want full debug on (only use this if asked to)? (outputs ALL log messages to console) No
๐Ÿฅ… What log level do you want?  INFO
๐Ÿฅ… Do you want live_mode on? (Shows live game data of favorite team) Yes
๐Ÿฅ… Select the time format 12h
๐Ÿฅ… When do you want end of day to be? 22:00
๐Ÿฅ… Your location to override latitude and longitude lookup via IP (City, State or City, Province or lat,lon or home address)
๐Ÿฅ… Live game refresh rate? (rate at which a live game will call the NHL API to catch the new data, 10 seconds is the lowest) 10
๐Ÿฅ… Select your preferred team: (Use arrow keys)
 ยป Hurricanes
   Avalanche
   Blackhawks
   Blues
   Blue Jackets
   Bruins
   Canadiens
   Canucks
   Capitals
   Coyotes
   Devils
   Ducks
   Flames
   Flyers
   Golden Knights
   Islanders
   Jets
   Kings
   Kraken
   Maple Leafs
   Lightning
   Oilers
   Panthers
   Penguins
   Predators
   Rangers
   Red Wings
๐Ÿฅ… Select your preferred team: Hurricanes
๐Ÿฅ… Add another team? No
๐Ÿฅ… SOG Display Frequency? (How often do you want to see shots on goal) 4
๐Ÿฅ… Do you want goal animations for only preferred team?
๐Ÿฅ… Select a board to display for off_day clock
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for off_day weather
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for off_day wxalert
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for off_day wxforecast
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for off_day scoreticker
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for off_day seriesticker
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for off_day standings
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for off_day team_summary
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for off_day stanley_cup_champions
๐Ÿฅ… Add another board? No
๐Ÿฅ… Select a board to display for scheduled clock
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for scheduled weather
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for scheduled wxalert
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for scheduled wxforecast
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for scheduled seriesticker
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for scheduled standings
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for scheduled team_summary
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for scheduled scoreticker
๐Ÿฅ… Add another board? No
๐Ÿฅ… Select a board to display for intermission clock
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for intermission scoreticker
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for intermission seriesticker
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for intermission standings
๐Ÿฅ… Add another board? No
๐Ÿฅ… Select a board to display for post_game clock
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for post_game seriesticker
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for post_game standings
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for post_game team_summary
๐Ÿฅ… Add another board? Yes
๐Ÿฅ… Select a board to display for post_game stanley_cup_champions
๐Ÿฅ… Add another board? No
๐Ÿฅ… Duration clock is shown 15
๐Ÿฅ… Hide network indicator when clock displayed (for when there are network issues, red bar on bottom of display) No
๐Ÿฅ… Use your first preferred team's colors for clock and date? Yes
๐Ÿฅ… Flash seconds? Yes
๐Ÿฅ… Use weather data feed (this is required to get data for the weather and weather alert boards)? Yes
๐Ÿฅ… Units to display? (metric or imperial) imperial
๐Ÿฅ… How often to update weather in minutes?(minimum 5) 10
๐Ÿฅ… Weather observation display summary
๐Ÿฅ… How long to show weather board (minimum 30 seconds)? 30
๐Ÿฅ… Which weather data feed for current observations? EC=Environment Canada
OWM=Open Weather Map (requires a key: works for all locations) OWM
๐Ÿฅ… OpenWeatherMap API key if using OWM as data feed: (get key from https://openweathermap.org/appid) 584a45a2e53805b06ec4bb1ac18680ab
๐Ÿฅ… Display temperature and humidity on clock? Yes
๐Ÿฅ… Get weather forecast from your weather provider? Yes
๐Ÿฅ… Number of days forecast to show?(minimum 1, max 3) 3
๐Ÿฅ… How often to update weather forecast in hours?(minimum 1) 1
๐Ÿฅ… Show weather alerts? Yes
๐Ÿฅ… Which weather feed for alerts? EC=Environment Canada
NWS=National Weather Service (US only) NWS
๐Ÿฅ… On alert board, display title of alert (warning, watch, advisory)? Yes
๐Ÿฅ… For NWS alert feed use expire time rather than effective time? Yes
๐Ÿฅ… On alert board, scroll alert? Yes
๐Ÿฅ… How long (in seconds) to show the alert board 5
๐Ÿฅ… How often to update alert feed in minutes?(minimum 5) 5
๐Ÿฅ… Display alert notification (Fred) on clock? Yes
๐Ÿฅ… Score Ticker: Show preferred teams only? (Show only your preferred team or all games of the day) No
๐Ÿฅ… Score Ticker: Board rotation rate? (How often do you want to rotate the games shown) 3
๐Ÿฅ… Series Ticker: Show preferred teams only? (Show only your preferred team or all the series of the playoff) No
๐Ÿฅ… Series Ticker: Board rotation rate? (How often do you want to rotate the series shown) 3
๐Ÿฅ… Show preferred standings only? (Show all standings or your preferred division and conference) Yes
๐Ÿฅ… Select the type of standings to display division
๐Ÿฅ… Select the division to display metropolitan
๐Ÿฅ… Select the conference to display eastern
๐Ÿฅ… Use pushbutton No
๐Ÿฅ… Use dimmer Yes
๐Ÿฅ… Select source of dimmer, software (uses your IP to find sunrise/sunset) or hardware (a sensor attached) software
๐Ÿฅ… Frequency in minutes to check if dimming should happen 5
๐Ÿฅ… When to allow dimming, always or only on off days always
๐Ÿฅ… How bright the display should be at night (between 5 and 100) 5
๐Ÿฅ… How bright the display should be during the day  (between 5 and 100) 40
๐Ÿฅ… Override automatic sunrise/sunset with set times? No
๐Ÿฅ… Add offset in minutes to automatic sunrise/sunset? (+ value adds to time, - subtracts from time Yes
๐Ÿฅ… Offset in minutes to sunrise/sunset 30
๐Ÿฅ… Use screensaver Yes
๐Ÿฅ… Use animations stored in assets/animations/screensaver? Yes
๐Ÿฅ… When do you want to start the screensaver? (24h) 22:00
๐Ÿฅ… When do you want the dimmer to stop the screensaver? (24h) 07:00
๐Ÿฅ… Update data feeds while screensaver is on? (applies to all weather feeds and dimmer, nhl will always be blocked with screensaver on) No
๐Ÿฅ… Use motion sensor to stop/start screensaver? No
๐Ÿฅ…๐Ÿ’๐Ÿšจ Save config/config.json file? Yes

Your config file

 pi@hockey:~/nhl-led-scoreboard $ cat config/config.json
{
    "debug": false,
    "loglevel": "INFO",
    "live_mode": true,
    "preferences": {
        "time_format": "12h",
        "end_of_day": "22:00",
        "location": "",
        "live_game_refresh_rate": 10,
        "teams": [
            "Hurricanes"
        ],
        "sog_display_frequency": 4,
        "goal_animations": {}
    },
    "states": {
        "off_day": [
            "clock",
            "weather",
            "wxalert",
            "wxforecast",
            "scoreticker",
            "seriesticker",
            "standings",
            "team_summary",
            "stanley_cup_champions"
        ],
        "scheduled": [
            "clock",
            "weather",
            "wxalert",
            "wxforecast",
            "seriesticker",
            "standings",
            "team_summary",
            "scoreticker"
        ],
        "intermission": [
            "clock",
            "scoreticker",
            "seriesticker",
            "standings"
        ],
        "post_game": [
            "clock",
            "seriesticker",
            "standings",
            "team_summary",
            "stanley_cup_champions"
        ]
    },
    "boards": {
        "scoreticker": {
            "preferred_teams_only": false,
            "rotation_rate": 3
        },
        "seriesticker": {
            "preferred_teams_only": false,
            "rotation_rate": 3
        },
        "standings": {
            "preferred_standings_only": true,
            "standing_type": "division",
            "divisions": "metropolitan",
            "conference": "eastern"
        },
        "clock": {
            "duration": 15,
            "hide_indicator": false,
            "preferred_team_colors": true,
            "clock_rgb": "",
            "date_rgb": "",
            "flash_seconds": true
        },
        "weather": {
            "enabled": true,
            "view": "summary",
            "units": "imperial",
            "duration": 30,
            "data_feed": "OWM",
            "owm_apikey": "584a45a2e53805b06ec4bb1ac18680ab",
            "update_freq": 10,
            "show_on_clock": true,
            "forecast_enabled": true,
            "forecast_days": 3,
            "forecast_update": 1
        },
        "wxalert": {
            "alert_feed": "NWS",
            "update_freq": 5,
            "show_alerts": true,
            "nws_show_expire": true,
            "alert_title": true,
            "scroll_alert": true,
            "alert_duration": 5,
            "show_on_clock": true
        }
    },
    "sbio": {
        "screensaver": {
            "enabled": true,
            "animations": true,
            "start": "22:00",
            "stop": "07:00",
            "data_updates": false,
            "motionsensor": false,
            "pin": 7,
            "delay": 30
        },
        "dimmer": {
            "enabled": true,
            "source": "software",
            "daytime": "",
            "nighttime": "",
            "offset": 30,
            "frequency": 5,
            "light_level_lux": 400,
            "mode": "always",
            "sunset_brightness": 5,
            "sunrise_brightness": 40
        },
        "pushbutton": {
            "enabled": false,
            "bonnet": false,
            "pin": 25,
            "reboot_duration": 2,
            "reboot_override_process": "",
            "display_reboot": true,
            "poweroff_duration": 10,
            "poweroff_override_process": "",
            "display_halt": true,
            "state_triggered1": "weather",
            "state_triggered1_process": ""
        }
    }
}

Hardware you are using

Software

falkyre commented 2 years ago

I just downloaded a fresh install of the latest repository (1.6.9) so no config.json was included and I had to run the nhl_setup. Ran simple setup and the goal_animations has the pref_teams_only: true.

I see in another issue you raised that you were running an older version of the scoreboard. Did you create the simple config with that version?

Overboard-code commented 2 years ago

No. I deleted the whole directory tree. Then did a 'git' of the latest version 1.6.9 then I ran the config simple. Then I ran the config again making it complex. I expected'false' as the value Instead it was empty.

the simple config had 'true' for me as well.

falkyre commented 2 years ago

So when you redid the setup, you selected false for the goal animations? And it didn't write anything back to the config ?

Overboard-code commented 2 years ago

Correct.

On Fri, May 6, 2022, 5:13 PM Sean Ostermann @.***> wrote:

So when you redid the setup, you selected false for the goal animations? And it didn't write anything back to the config ?

โ€” Reply to this email directly, view it on GitHub https://github.com/riffnshred/nhl-led-scoreboard/issues/374#issuecomment-1120011762, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMVDFMOOJBSKHEKVKNZ6GODVIWDPBANCNFSM5VIWNSKQ . You are receiving this because you authored the thread.Message ID: @.***>

falkyre commented 2 years ago

Tried 3 times, can't recreate the issue you are seeing. What I do see from your run of the nhl_setup above is that it looks like the prompt specific to the goal animations did not render correctly.

๐Ÿฅ… Do you want goal animations for only preferred team?

There should be an answer (Yes or No) no matter what (it will default to whatever it pulled from your original config.json)

At this point, I'd chalk it up to one of those un reproducible things. Are you able to reproduce the issue consistently?

Overboard-code commented 2 years ago

Yes I agree. I ran nhl-setup again and saw: ๐Ÿฅ… Do you want goal animations for only preferred team? No And it worked fine in the config:

      "goal_animations": {
            "pref_team_only": false
        }

Thanks so much for your time.

Overboard-code commented 2 years ago

Found it. If I just hit Enter instead of 'Y' or 'N' for goal animations it fails. If I type 'Y' or 'N' on the keyboard it works. I tried it three times with the same results. Hit N and I see: ๐Ÿฅ… Do you want goal animations for only preferred team? No Hit Enter and I see: ๐Ÿฅ… Do you want goal animations for only preferred team?

falkyre commented 2 years ago

OK, was able to recreate and fix the problem. Thanks for finding it. I'll add the fix and the new binary in a PR for @riffnshred to add to the next release.

Overboard-code commented 2 years ago

Thanks so much! I really appreciate what you are doing.

falkyre commented 2 years ago

This is fixed in #377

@riffnshred will just need to merge it for the next release.

falkyre commented 2 years ago

@riffnshred this can be closed now. It's part of the 1.6.10 version you pushed out last week.