Code Monkey home page Code Monkey logo

mmm-resrobot's People

Contributors

alexbergsland avatar alvinger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mmm-resrobot's Issues

New column with Undefined after update

After update the 2019-05-06, a new colum appears with undefined values.
screenshot

		{
		module: "MMM-ResRobot",
		position: "bottom_left",
		header: "Avgångar",
		config: {
			routes: [
				{from: "740061474", to: "740000161"},	// ResRobot Station IDs of starting and destination station(s). At least one route must be defined.
				{from: "740061474", to: "740001524"},	// "from" is required but "to" is optional (set "to" to empty string to indicate all destinations)
			],
			skipMinutes: 0,		// Skip departures that happens within the next <value> minutes.
			maximumEntries: 6,	// Number of departures to show on screen
			truncateAfter: 0,	// A value > 0 will truncate direction name at first space after <value> characters. 0 = no truncation
			apiKey: "***"		// Your ResRobot apiKey

Very high CPU usage with latest electron

Using this module results in electron running very CPU heavy.

See result from running top:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 941 pi 20 0 400560 159456 78664 R 127.8 16.8 5:00.29 electron 938 pi 20 0 312916 86456 70300 R 88.9 9.1 3:42.10 electron 903 pi 20 0 487216 118084 77744 R 11.1 12.4 0:37.83 electron

Once I disabled the module, the problem went away. Just wanted to add this here in case other people notice very high CPU usage.

Multiple instances

Hi, is it possible to have 2 instances, i.e. one showing buses, the other one showing subway

Problem with fetching departures

Hi!
I'm creating a new MagicMirror and everything seems to be working except this module. I've followed the instructions in the readme and my magicMirror config for this module looks like:
{
module: "MMM-ResRobot",
position: "upper_third",
header: "Avgångar",
config: {
from: "740059152", // ResRobot Station ID (or a comma-separated string of IDs)
to: "", // ResRobot Station ID of destination (or a comma-separated string of IDs)
skipMinutes: 0, // Skip departures that happens within the next minutes.
maximumEntries: 6, // Number of departures to show on screen
truncateAfter: 5, // A value > 0 will truncate direction name at first space after characters. 0 = no truncation
apiKey: "my_api_key" // Your ResRobot apiKey
}
},
I see the text: "Avgångar" and for approx 1 minute the text: "Fetching departures ... " but after that no departures is shown.
If I paste in the apiurl(https://api.resrobot.se/v2/departureBoard?key=my_api_key&id=740059152&date=2017-10-23&time=17:05&passlist=0&format=json) in my browser with my apikey and my station id I get several departures as a response.
What can be wrong? And how can I debug this? Is there a log anywhere?
I have very little experience with Linux and .js/.json.
The other modules which is working is: time,calender,current weather, weather forecast, neewsfeed and the pir-motion detection for turning on hdmi output.
Any help is appreciated!

Stuck on Fetching, when sudo reboot black screen

Hi,
Have dibbled with my MM for a while and wanted to add the busstop on the road.
Installed this module and took the config from readme, updated with a api-key (worked in this test https://api.resrobot.se/v2/departureBoard?key=&id=<HÅLLPLATSID>&maxJourneys=).

When i add the config in MM, it gets stuck on "Fetching departures". After a Sudo reboot, MagicMiror does not load, and all I get is a black screen with a cursor.
I only changed API key and Station ID

If I remove config of module, MM works again.

	{
		module: "MMM-ResRobot",
		position: "top_right",
		header: "Departures",
		config: {
			routes: [
				{from: "740075694", to: ""},	// ResRobot Station IDs of starting and destination station(s). At least one route must be defined.
				{from: "", to: ""},	// "from" is required but "to" is optional (set "to" to empty string to indicate all destinations)
			],
			skipMinutes: 0,		// Skip departures that happens within the next <value> minutes.
			maximumEntries: 6,	// Number of departures to show on screen
	                getRelative: 0,         // Show relative rather than absolute time when less than <valute> minutes left to departure, 0 = stay absolute
			truncateAfter: 5,	// A value > 0 will truncate direction name at first space after <value> characters. 0 = no truncation
			truncateLineAfter: 5,	// A value > 0 will truncate line number <value> characters. 0 = no truncation
	                showTrack: true,        // If true, track number will be displayed
                	coloredIcons: false,    // Setting this to true will color transportation type icons according to colors in colorTable
			apiKey: "MYAPIKEY"		// Your ResRobot apiKey
        }
    },

Differentiate between types of buses

I'm just curious if there's a possibility to differentiate between regional buses and city buses. As it is commuter traffic i Region Skåne (Sweden) is closely associated with the color schemes (green is city buses, yellow is regional buses and purple for the trains). The color is only astethics but would be nice to get correct. More than that it would be nice to be able to show only city or regional buses.

Possibilitys and options?

Just made my MM and this module have been performing really well. Big thanks

getDom() is called over and over

Line 63 in MMM-ResRobot.js "this.scheduleUpdate(0);", is causing getDom() to be called repeatedly over and over again every 0 seconds. This, in turn, causes the CPU to overheat and sometimes my mirror freezes!
I changed it to "this.scheduleUpdate();", and now GetDom() is only called every 30 seconds or whatever I set "nextLoad" to in scheduleUpdate()!

Tram and bus icons not aligned

Hi!

Thank you for a great and easy to use module.

I found that the tram and bus icons are not aligned, which is really annoying. Should be very easy to fix with CSS?

2023-07-27 22_29_28-MagicMirror²

Error: Cannot find module 'node-fetch'

I messed up my MagicMirror install and is now reinstalling all my modules on a fresh Raspberry Pi.
When adding MMM-ResRobot I get UnhandledPromiseRejectionWarning: Error: Cannot find module 'node-fetch' which point to MMM-ResRobot needing this module.

After looking around I found this:
https://forum.magicmirror.builders/post/98964

So I changed node_helper.js from const fetch = require("node-fetch"); to const fetch = import("node-fetch");
And then npm install.
I don't really understand what this does but it helped me.

Something is wrong with the API?

Hi, after a restart of the MM I have gotten wrong stations. It is now showing stations in Stockholm area.
Usually it's from Eslöv station - Lund/MAalmö etc bus/trains. Has there been an update recently, anything you know?

{ module: "MMM-ResRobot", position: "top_right", header: "Eslöv - Voyado", config: { routes: [ {from: "740000260", to: "740017330"}, // to Telefonplan - ResRobot Station IDs of starting and destination station(s). At least one route must be defined. {from: "740000260", to: "740012588"}, // to Brunnshög - "from" is required but "to" is optional (set "to" to empty string to indicate all destinations) ], apiKey: "API_KEY", // Your ResRobot apiKey skipMinutes: 0, // Skip departures that happens within the next <value> minutes. maximumEntries: 6, // Number of departures to show on screen maximumDuration: 360, // Number of minutes to search for departures getRelative: 15, // Show relative rather than absolute time when less than <value> minutes left to departure, 0 = stay absolute truncateAfter: 5, // A value > 0 will truncate direction name at first space after <value> characters. 0 = no truncation truncateLineAfter: 5, // A value > 0 will truncate line number <value> characters. 0 = no truncation showTrack: true, // If true, track number will be displayed coloredIcons: true, // Setting this to true will color transportation type icons according to colors in colorTable iconTable: { "B": "fa fa-bus", "S": "fa fa-subway", "J": "fa fa-train", "U": "fa fa-subway", "F": "fa fa-ship", }, colorTable: { "B": "#fec900", "S": "#FFFFFF", "J": "#716cb8", "U": "#FFFFFF", "F": "#FFFFFF", }, }, },

image

Custom table view

Hi!

I would like to write out full text of some fields in my table, right now I'm using your module to show ferry departures. Its working but I want to show the full name of the "lineno" and "to" fields. Right now it says "Älvsna" instead of Älvsnabben and "Lilla" instead of Lilla Bommen as I want it to be. Tried to search among the module files but I cannot find where this can be modified.

Best regards

Screenshot

On the one hand, users will then have a better view of your module and furthermore, your module will then be displayed with the image in the new module list I am working on 🙂

List of departures slowly fades, then stuck in "fetching..."

Hi,

Thanks for a great MM plugin, it is greatly appreciated!

I have this issue where the the list of departures works for a while (couple of hours or a day) and then it fades and shortens as departure times pass. No new departures are fetched and finally it is stuck in "fetching departures". After restarting/reloading MM everything works fine again, until it eventually does not.

I think it is the same behavior as described here.

Any idea why this could be?

Only fetches data once on serveronly

I'm running the module on serveronly mode and had problems with fetching data. Noticed that the data fetches the first time I connect to the server, but if I update my window the data won't fetch again. Restarting the device makes it work again (with one fetch request).

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.