Giter VIP home page Giter VIP logo

mmm-bmw-cc's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

cowboysdude

mmm-bmw-cc's Issues

Display Error on MMM-BMW-CC

Hello,

I noticed this module didn't display correctly out of the box. Note that instead of displaying the day "Fri", it says "undefined".
Also, the last day of the forecast "Thu" is missing the icon.

shot3

I did a little troubleshooting and here are my insights:

The variable 'today' has the wrong scope:

      // if the data date is the same as today then today's forecast says "today" See line 120
        if (moment(forecast[0].observation_time.value).format('ddd') == moment().format('ddd')){
       var today = "Today";
        }

Since the variable is created inside the IF statement, its scope only exists inside the IF statement. So that is why the screen displays "undefined" because the variable isn't accessible outside the IF statement. I simply defined it outside the IF statement to get it to display.

var today = moment(forecast[0].observation_time.value).format('ddd') ;
     
     // if the data date is the same as today then today's forecast says "today" See line 120
        if (moment(forecast[0].observation_time.value).format('ddd') == moment().format('ddd')){
       today = "Today";
        }

That should solve the first item.

For the second item, I added some debugging to print the icon path so I could see what was breaking.
shot4

You can see that the weather API returned mostly_clear, but the icon is named mostlyclear.png in the folder. So you just need to update the icon name to mostly_clear.png. Mine worked after doing that. I don't know if other icons have similar naming issues or not, but I'll try to remember to report them if I come across any others. I looked at the names in the icon folder, and it does seem inconsistent when there is a "_" and when it's omitted. I'm not sure if the actual weather API is this way, or perhaps you can just look in the icon folder and know which ones need updating.

Last question, I noticed that this module seems to break my touchscreen when using MMM-page-indicator. Normally, I have MMM-page-indicator on the bottom bar, and it works fine on the bottom bar until I enable MMM-BMW-CC on the bottom_bar. Once MMM-BMW-CC is enabled, the touchscreen functionality stops working, and I can no longer touch the "circles" to change pages. The page display indicators show up as expected, but I can no longer touch them. The temporary workaround is I moved the MMM-page-indicator to the upper left hand corner (as you can see in the screenshots) and touch works there, but it's almost like MMM-BMW-CC has an invisible hit area that covers up the page controls, and they can't be used anymore. Any thoughts about how the module might break touchscreen control?

Another fascinating thing: on my second page, I have MMM-Climacell-Hourly on the bottom-bar with MMM-page-indicator on the bottom-bar, and they work flawlessly together. The touch works fine, and MMM-Climacell-Hourly doesn't interfere with the ability to touch to select a page. Is there a significant difference in how climacell and bmw achieve their output? For some reason, there seems to be a difference for touchscreen controls since BMW breaks touchscreen and climacell does not.
shot6

EDIT: Upon testing this again when getting the data and screenshots for this post, BMW and MMM-page-indicator are now working together nicely with both in the bottom bar. So I am not sure what the difference is, but I will continue to monitor.

EDIT2: Well sometimes touch control does stop working. Maybe I am too quick to blame the module and it's something else. I have found that if I execute (touch) page controls to change pages before BMW finishes loading everything, touch works fine, even after returning to the homepage and letting it sit. If I let the BMW module fully load up, sometimes touch will continue working, and other times, it's just completely dead. So I'm not sure 100% if it's an issue with the module or the mirror in general, but it seems to only happen if MMM-page-indicator AND something else are in the bottom_bar together. And climacell and bmw are the only modules i've tested in the bottom_bar.

Climacell API Keys Still Working?

Thanks for building a great module. Attempted for the last two weeks to get MMM-BMW-CC to work with new Climacell API keys, however nothing seems to work. Also, Climacell no longer sends a confirmation email to verify the account.

Here is the error message:
2021-01-04 22:09:22.021] [LOG] Whoops! There was an uncaught exception...
[2021-01-04 22:09:22.021] [ERROR] TypeError: result.slice is not a function
at Request._callback (/home/pi/MagicMirror/modules/MMM-BMW-CC/node_helper.js:44:33)
at Request.self.callback (/home/pi/MagicMirror/modules/node_modules/request/request.js:185:22)
at Request.emit (events.js:200:13)
at Request. (/home/pi/MagicMirror/modules/node_modules/request/request.js:1161:10)
at Request.emit (events.js:200:13)
at IncomingMessage. (/home/pi/MagicMirror/modules/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:288:20)
at IncomingMessage.emit (events.js:205:15)
at endReadableNT (_stream_readable.js:1154:12)
at processTicksAndRejections (internal/process/task_queues.js:84:9)

TypeError: result.slice is not a function

Got the follwing issue when running the MBW-CC module.

[2020-12-16 07:36:31.093] [ERROR] Whoops! There was an uncaught exception...
[2020-12-16 07:36:31.095] [ERROR] TypeError: result.slice is not a function
at Request._callback (/home/pi/MagicMirror/modules/MMM-BMW-CC/node_helper.js:44:33)
at Request.self.callback (/home/pi/MagicMirror/node_modules/request/request.js:185:22)
at Request.emit (events.js:198:13)
at Request. (/home/pi/MagicMirror/node_modules/request/request.js:1154:10)
at Request.emit (events.js:198:13)
at IncomingMessage. (/home/pi/MagicMirror/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:286:20)
at IncomingMessage.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

Following settings were used:
{
disabled: false,
module: "MMM-BMW-CC",
position: "bottom_bar", // designed for bottom_bar(best) thirds should be good too
config: {
apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxx", // Get at https://www.climacell.co/weather-api/pricing/
ownTitle: "Current Conditions",
tempUnits: "C", // us = F or si = C
lat: '50.000000', // Your latitude
lon: '8.000000', // Your longitude
css: "2", // 1-6
playSounds: "no",
useHeader: false, // true if you want a header
header: "Your header",
maxWidth: "100%",
updateInterval: 5 * 60 * 1000,
}
},

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.