Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New version in works w/ several updates #28

Open
lavolp3 opened this issue Feb 20, 2020 · 22 comments
Open

New version in works w/ several updates #28

lavolp3 opened this issue Feb 20, 2020 · 22 comments

Comments

@lavolp3
Copy link

lavolp3 commented Feb 20, 2020

I am working on a new version of this module with several changes, updates and fixes. I have done so many changes that it might be difficult to implement them here.
A few examples:

  • several leagues
  • optional matches and table
  • focus on one team per league in table and matches
  • cup mode for CL.
  • fixed focus
    Planned
  • live mode (focus on matches in play)
  • include more leagues/cups using another API

I'd also try to include the issues on this repository.

@fewieden what is your opinion? Should I send a PR to the develop branch or publish an own repository with the changes references this rep? I'd rather do the latter.

@lavolp3
Copy link
Author

lavolp3 commented Feb 20, 2020

already included are fixes for #24 , #26 , #22 , #11 (CL)

@Studentenfutter
Copy link

Studentenfutter commented Apr 1, 2020

It would be awesome if you would release your code and I would love to give it a try! I suggest just opening your own repo/fork as there has been no response up until now.

This Repo is released under MIT license so it should be no problem.

@lavolp3
Copy link
Author

lavolp3 commented Apr 1, 2020

It's online. See my fork
However not much soccer to follow at the moment. The postponements are messing the data up unfortunately.

I'll consider de-forking it since I don't plan to send PRs unless explicitely wished for. There are just too many changes

@fewieden
Copy link
Owner

fewieden commented Apr 6, 2020

@lavolp3 feel free to either send a pr or creating your own module

@robertybob
Copy link

@lavolp3 I've installed your fork but I can't get the PL table to display

{ module: 'MMM-soccer', position: 'bottom_right', config: { api_key: 'xxxxxxxxxxx', show: ['PL'], colored: true, updateInterval: 60, showTables: true, matchType: 'league' } },
image

@lavolp3
Copy link
Author

lavolp3 commented Jul 26, 2020

@robertybob hm. It works for me. Can you include

debug: true

in your config and post any errors shown in the browser dev tools (press F12)?

@robertybob
Copy link

@robertybob hm. It works for me. Can you include
debug: true

in your config and post any errors shown in the browser dev tools (press F12)?

Uncaught TypeError: Cannot read property 'standings' of MMM-soccer.js:249
undefined
    at Class.filterTables (MMM-soccer.js:249)
    at Class.socketNotificationReceived (MMM-soccer.js:123)
    at module.js:243
    at r.<anonymous> (socketclient.js:39)
    at r.emit (index.js:83)
    at r.onevent (index.js:83)
    at r.MMSocket.self.socket.onevent (socketclient.js:33)
    at r.onpacket (index.js:83)
    at r.<anonymous> (index.js:83)
    at r.emit (index.js:83)

and then

Uncaught TypeError: Cannot read proerty 'standings' of MMM-soccer.js:249 
undefined
    at Class.filterTables (MMM-soccer.js:249)
    at MMM-soccer.js:113

@lavolp3
Copy link
Author

lavolp3 commented Jul 27, 2020

OK, I see that this message also appears when I leave out the API key. That needs improvement.
Meanwhile please re-check your API key.

@robertybob
Copy link

OK, I see that this message also appears when I leave out the API key. That needs improvement.
Meanwhile please re-check your API key.

Thank you. I’ve packed away my Pi for tonight but I’ll check this again tomorrow. I’m sure I copied it correctly directly from the email I received, however I will also set the api to false too (just to be sure it’s definitely my api key)

@robertybob
Copy link

OK, I see that this message also appears when I leave out the API key. That needs improvement.
Meanwhile please re-check your API key.

I've just tried it with api_key: false and I'm still having that exact same issue

 { 			module: 'MMM-soccer', 
			position: 'bottom_right', 
			config: { 
				show: ['PL'], 
				colored: true, 
				updateInterval: 60, 
				api_key: false, 
				showTables: true, 
				matchType: 'league' 
				} 
	},
Uncaught TypeError: Cannot read property 'standings' of MMM-soccer.js.249
undefined
at Class.filterTables (MMM-soccer.js:249)
at MMM-soccer.js:113

@robertybob
Copy link

robertybob commented Jul 28, 2020

@lavolp3 I've even copied your example one from your README and even that doesn't work (I'll include my API key this time too)

{
    module: 'MMM-soccer',
    position: 'bottom_right',
    config: {
        api_key: '0cff872ba97b443cbd1762d6ae167d23',
        show: ['CL', 'BL1', 'PL'],
        colored: true,
        updateInterval: 60,
        focus_on: {'BL1': 'FC Bayern München'},
        max_teams: 5,
        matchType: 'league'
    }
},

I'm trying to run this on a Raspberry Pi, I assume you're doing the same? :) 

@lavolp3
Copy link
Author

lavolp3 commented Jul 29, 2020

Can you run the mirror in dev mode

pm2 stop all
npm start dev

and post any error showing up in the console?

@robertybob
Copy link

image

and the debug log from that error:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start', 'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose config Skipping project config: /home/pi/.npmrc. (matches userconfig)
5 verbose stack Error: ENOENT: no such file or directory, open '/home/pi/package.json'
6 verbose cwd /home/pi
7 verbose Linux 5.4.51-v7+
8 verbose argv "/usr/bin/node" "/usr/bin/npm" "start" "dev"
9 verbose node v10.22.0
10 verbose npm v6.14.6
11 error code ENOENT
12 error syscall open
13 error path /home/pi/package.json
14 error errno -2
15 error enoent ENOENT: no such file or directory, open '/home/pi/package.json'
16 error enoent This is related to npm not being able to find a file.
17 verbose exit [ -2, true ]

@lavolp3
Copy link
Author

lavolp3 commented Jul 30, 2020

You need to be inside the MagicMirror folder when executing this.

Also, you had three mm instances running via pm2. I doubt that this was intended? That might create lots of issues.
You need to be sure to run one instance at a time, otherwise there will be several node_helpers running and you would send requests to APIs much more often than intended.
Might be the reason for this issue as well

@robertybob
Copy link

Thank you. I've no idea how I've managed to get multiple pm2 instances running, it happens automatically when I turn on the Pi. I don't know how to stop that, at this rate I think I'll just format the SD card and start again

@lavolp3
Copy link
Author

lavolp3 commented Jul 31, 2020

Id suggest to have a look into the documentation for pm2 and find it how to disable two of the three autostarts. It's surely not difficult.

@robertybob
Copy link

@lavolp3 I created a new MM from scratch and it's seemingly working fine. Sorry for being a pain. Would you like me to delete my comments above?

@lavolp3
Copy link
Author

lavolp3 commented Sep 8, 2020

@robertybob no, no problem. Happy your issues have been solved.

@lavolp3
Copy link
Author

lavolp3 commented Jan 7, 2021

closing this since I haven't send a PR and you have made many changes as well. Let me know if you have an interest to merge our work somehow.

@lavolp3 lavolp3 closed this as completed Jan 7, 2021
@fewieden fewieden reopened this Jan 8, 2021
@fewieden
Copy link
Owner

fewieden commented Jan 8, 2021

@lavolp3 I cleaned up the repository a lot, as I didn't touch it for about 2 years. I'm curious about the changes you did and will try to check them out this weekend.

I'm interested in extending the functionality, therefore reopening the discussion.

Would you be interested in pair programming in order to merge our two versions?

@lavolp3
Copy link
Author

lavolp3 commented Jan 8, 2021

I don't know exactly what you mean but sounds good!
Im thinking about giving me co-ownership or write-access and making together a plan of what to integrate/work on. Would be open for that. Sounds fun!

@fewieden
Copy link
Owner

fewieden commented Jan 8, 2021

@lavolp3 I added you on discord, we can discuss further details there

@fewieden fewieden added this to ToDos Jul 9, 2022
@fewieden fewieden moved this to 📋 Backlog in ToDos Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

4 participants