Giter Site home page Giter Site logo

mmm-bring's Introduction

MMM-Bring

Alt text

A module for the MagicMirror² that displays your Bring! shopping list.

Features

  • Touch Support
  • Locale Support
  • Auto-Layout

Installing

Step 1 - Install the module

cd ~/MagicMirror/modules
git clone https://github.com/werthdavid/MMM-Bring.git
cd MMM-Bring
npm install

Step 2 - Add module to ~MagicMirror/config/config.js

Add this configuration into config.js file's

{
    module: "MMM-Bring",
    position: "bottom_bar",
    config: {
       email: "[email protected]",
       password: "SECRET",
       updateInterval: 15, // in Minutes
       listName: "Zuhause", // optional
       showListName: true,
       activeItemColor: "#EE524F",
       latestItemColor: "#4FABA2",
       showLatestItems: false,
       maxItems: 0,
       maxLatestItems: 0,
       locale: "de-DE",
       useKeyboard: false,
       customTitle: "My shopping list", // optional
       listDropdown: true
    }
}

Updating

Go to the module’s folder inside MagicMirror modules folder and pull the latest version from GitHub and install:

git pull
npm install

Configuring

Here is the configurable part of the module

Option Description
email Required Email-address.
password Required password.
updateInterval How often the module should load the list.
Type: number in minutes
Default value: 15
listName The name of the list to be displayed.
Type: string
Default value: your default list
showListName Flag for displaying list name.
Type: boolean
Default value: true
activeItemColor Color for active items.
Type: string
Default value: #EE524F
latestItemColor Color for recent items.
Type: string
Default value: #4FABA2
showLatestItems Flag for displaying recently bought items.
Type: boolean
Default value: false
maxItems Maximum items to display.
Type: number
Default value: 0 (all)
maxLatestItems Maximum recent items to display.
Type: number
Default value: 0 (all)
locale The locale.
Type: string
Default value: de-DE
useKeyboard Activate to use this module together with MMM-Keyboard
Type: boolean
Default value: false
customTitle Show the given text as generic module title
Type: string
Default value: undefined (empty)
listDropdown If you have more than 1 list, show a dropdown where the list can be selected
Type: boolean
Default value: true

Valid locales

  • de-AT
  • de-CH
  • de-DE
  • es-ES
  • en-GB
  • en-US
  • en-CA
  • en-AU
  • fr-CH
  • fr-FR
  • it-CH
  • it-IT
  • pt-BR
  • nl-NL
  • hu-HU
  • nb-NO
  • pl-PL
  • ru-RU
  • sv-SE
  • tr-TR

mmm-bring's People

Contributors

dependabot[bot] avatar evanhsu avatar jonixis avatar lavolp3 avatar pwilliv avatar werthdavid avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mmm-bring's Issues

module does not appear

hello, i'm french so sorry for english :)
I followed the instructions but the module does not appear on my magic mirror. I installed the application on my phone and created an account, I saved the account info in the config.js but its does not work!

Unhandled Promise Rejection: Request Error 401

The module throws an unhandled promise rejection if login credentials are not correct.

(node:22607) UnhandledPromiseRejectionWarning: Error: Request failed with status code 401
    at createError (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/core/cre
    at settle (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/core/settle.j
    at IncomingMessage.handleStreamEnd (/home/pi/MagicMirror/modules/MMM-Bring/node_module
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1090:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:22607) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)

Changing to the correct password removed the message in my case

possible user error?

Hello,

This Module seems really cool, unfortunately i am running into an issue, i get the error
":8080/modules/MMM-Bring//MMM-Bring.js:99 Uncaught (in promise) TypeError: Cannot read property 'imageSrc' of undefined"
I can post my config if you want, but it is exactly the same as the one in your readme except i put in my username and password and changed the name of the list to an existing one in my account.

Thank you so much for the assistance.

Bring List only displays in German

Hi, thank-you for creating the Magic Mirror module. However, I have an English version installed on my phone but when my list displays on my Magic Mirror its displays in German. Is there a way to fix this?

Items added without picture

When I add a new item, instead of moving it from the "recent" list to the "purchase" list, it just adds a new item with the same name and no picture (uses the Capital letter instead) and duplicates the product in the "recent" list.

Any clue?

Module doesn't load

Hello,

Module is well clone in Module folder of MM and using configuration below, nothing seems to be loaded from the module.
Tested with 1 different user, credentials are well tested on the web interface of bring.
Tested with/wo shopping list name, or different positions.
Module up to date at the last available version.

{
module: "MMM-Bring",
position: "bottom_left",
config: {
email: "xxxxxxxxxx",
password: "xxxxxxxx",
updateInterval: 15, // in Minutes
showListName: true,
activeItemColor: "#EE524F",
latestItemColor: "#4FABA2",
showLatestItems: false,
maxItems: 0,
maxLatestItems: 0,
locale: "fr-FR",
useKeyboard: false
}
},

Could someone please test or give me a direction ?
I would really like to use this module, it is very valuable :)
thks

I need to change the grid layout

Hi, thank you for this awesome module,
would you please point me wich number into the css or js to change to make it print 8 items per line instead of 4? I guess it's just the width of the block but I cannot find it anywhere

reduce the size of the MMM-BRING module displayed while keeping the same proportions

Hello,
I can not reduce the size of the MMM-BRING module displayed on my MM, I can try with my custom.css it does not work or does not keep the same proportions.
more and more I cannot display the elements in the middle of my screen, there is always a shift to the left or right.
I enclose my custom.css and styles.css of MMM-BRING which I may have modified by mistake.
Thank you for your help.
My custom.css :
MMM-WiFiPassword { widht: 150px; margin-right: 200px; text-align: auto; } .MMM-WiFiPassword .qr-image { width : 60%; margin-left: auto; margin-right: center; } .MMM-WiFiPassword #WiFiPassword { text align: auto; } .calendar { text-align: center; max-height: 100%; } .MMM-Bring { max-width: 80 %; max-height: auto; margin-left: auto; margin-right: auto; }
My styles.css of MMM-BRING : ` /*****************************************************

  • Magic Mirror *
  • MMM-Bring CSS *
  •                                               *
    
  • By David Werth *
  •                                               *
    
  • Edit this file ONLY if you know what you're doing *
    *****************************************************/

@font-face {
font-family: "MuseoSans-300";
src: url("MuseoSans-300.woff") format("woff");
}

@font-face {
font-family: "MuseoSans-500";
src: url("MuseoSans-500.woff") format("woff");
}

.bring-list {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}

/*

  • DROPDOWN TITLE
    */

.bring-titleBtn {
background: none;
margin: 10px 5px;
padding: 5px 20px;
border: 2px solid #eee;
border-radius: 5px;
font-size: 1em;
cursor: pointer;
}

.bring-titleBtn:hover {
background-color: #2980B9;
}

#bring-dropList {
position: relative;
display: inline-block;
}

#bring-dropList .show {
display: block;
}

#bring-dropItems {
display: none;
position: absolute;
padding: 0px 12px;
min-width: 160px;
top: 20px;
left: -100px;
background-color: #000;
}

.bring-dropItem {
color: white;
padding: 5px 5px;
display: block;
overflow: auto;
position: relative;
z-index: 2;
border-bottom: 2px solid white;
font-size: 0.7em;
}

.bring-dropItem:hover {
background-color: #2980B9;
}

/*

  • LISTS
    */

.bring-list-item-content {
display: flex;
flex-direction: column;
width: 98px;
height: 116px;
margin: 4px;
border-radius: 6px;
font-size: 14px;
font-style: normal;
color: white;
text-align: center;
border: 1px solid black;
border-radius: 5px;
}

.bring-list-item-add {
display: flex;
flex-direction: column;
width: 98px;
height: 116px;
margin: 2px;
font-size: 70px;
font-weight: bold;
color: white;
text-align: center;
border: 1px solid black;
border-radius: 5px;
background-color: grey;
justify-content: center;
}

.bring-list-item-upper-part-container {
display: flex;
flex-direction: row;
justify-content: center;
width: 100%;
height: 70px;
align-items: center;
}

.bring-list-item-image-container {
display: flex;
justify-content: center;
align-items: center;
height: 60px;
width: 65px;
min-width: 65px;
}

.bring-list-item-image-container > img {
max-height: 50px;
max-width: 65px;
}

.bring-list-item-text-container {
width: 100%;
display: flex;
flex-direction: column;
height: 43px;
align-items: center;
justify-content: flex-end;
}

.bring-list-item-name {
display: block;
width: 90px;
min-height: 17px;
max-height: 27px;
padding-top: 2px;
margin: 0 auto;
font-size: 14px;
line-height: .95em;
overflow: hidden;
text-overflow: ellipsis;
overflow-wrap: break-word;
font-family: MuseoSans-500, sans-serif;
}

.bring-list-item-specification-label {
height: 16px;
width: 90px;
font-size: 11px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding-top: 1px;
line-height: .95em;
font-family: MuseoSans-300, sans-serif;
}

.bring-top_right, .bring-top_left, .bring-top_center, .bring-bottom_left, .bring-bottom_center, .bring-bottom_right {
max-width: 33vw;
}my config.js : {
module: "MMM-Bring",
position: "bottom_bar",
config: {
email: "XXXXXXXr",
password: "JXXXX",
updateInterval: 15, // in Minutes
listName: "Courses", // optional
showListName: true,
activeItemColor: "#EE524F",
latestItemColor: "#4FABA2",
showLatestItems: false,
maxItems: 0,
maxLatestItems: 0,
locale: "fr-FR",
useKeyboard: false,
showListName: false,

			}
		}
]

};
`

Listname not working

hi !
i Have 5 lists, for example :
-Vétrigne
-Action
etc

When i enter "Vétrigne" in the listname parameter, the module don't show anything ! when the parameter is empty, it show the default Bring! list.
is there any way to choose the list to show on the mirror ?
Thanks :D

Local is not working

Hi David

great work!

The only issue I have found is with locals, I have tried to use fr-fr and en-au, en-gb and it is always displaying the texts in Deutch

Thanks

Input via MMM-Keyboard sent but not recognized

Hey :) Love the Bring Module! I use the MMM-Keyboard module too writhe on my Touch-MM .. The Keyboard module says its compatible with your module. It sends the input perfectly to the MMM-Bring module, but it doasnt work with it. Please help!
Thx :) Toby

Error with this module

Hi,
When I add your module, I have the error :
[2020-11-07 20:19:03.086] [ERROR] (node:10421) UnhandledPromiseRejectionWarning: Error: Request failed with status code 404
at createError (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/core/createError.js:16:15)
at settle (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/adapters/http.js:237:11)
at IncomingMessage.emit (events.js:205:15)
at endReadableNT (_stream_readable.js:1154:12)
at processTicksAndRejections (internal/process/task_queues.js:84:9)
[2020-11-07 20:19:03.090] [ERROR] (node:10421) UnhandledPromiseRejectionWarning: Error: Request failed with status code 404
at createError (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/core/createError.js:16:15)
at settle (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/adapters/http.js:237:11)
at IncomingMessage.emit (events.js:205:15)
at endReadableNT (_stream_readable.js:1154:12)
at processTicksAndRejections (internal/process/task_queues.js:84:9)
[2020-11-07 20:19:03.095] [ERROR] (node:10421) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by t hrowing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
[2020-11-07 20:19:03.097] [ERROR] (node:10421) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by t hrowing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
[2020-11-07 20:19:03.099] [ERROR] (node:10421) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promis e rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[2020-11-07 20:19:03.101] [ERROR] (node:10421) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promis e rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[2020-11-07 20:19:58.873] [ERROR] (node:10421) UnhandledPromiseRejectionWarning: Error: Request failed with status code 404
at createError (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/core/createError.js:16:15)
at settle (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/adapters/http.js:237:11)
at IncomingMessage.emit (events.js:205:15)
at endReadableNT (_stream_readable.js:1154:12)
at processTicksAndRejections (internal/process/task_queues.js:84:9)
[2020-11-07 20:19:58.883] [ERROR] (node:10421) UnhandledPromiseRejectionWarning: Error: Request failed with status code 404
at createError (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/core/createError.js:16:15)
at settle (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/adapters/http.js:237:11)
at IncomingMessage.emit (events.js:205:15)
at endReadableNT (_stream_readable.js:1154:12)
at processTicksAndRejections (internal/process/task_queues.js:84:9)
[2020-11-07 20:19:58.886] [ERROR] (node:10421) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by t hrowing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
[2020-11-07 20:19:58.888] [ERROR] (node:10421) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by t hrowing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
[2020-11-07 20:20:58.225] [ERROR] (node:10421) UnhandledPromiseRejectionWarning: Error: Request failed with status code 404
at createError (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/core/createError.js:16:15)
at settle (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/adapters/http.js:237:11)
at IncomingMessage.emit (events.js:205:15)
at endReadableNT (_stream_readable.js:1154:12)
at processTicksAndRejections (internal/process/task_queues.js:84:9)
[2020-11-07 20:20:58.231] [ERROR] (node:10421) UnhandledPromiseRejectionWarning: Error: Request failed with status code 404
at createError (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/core/createError.js:16:15)
at settle (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/home/pi/MagicMirror/modules/MMM-Bring/node_modules/axios/lib/adapters/http.js:237:11)
at IncomingMessage.emit (events.js:205:15)
at endReadableNT (_stream_readable.js:1154:12)
at processTicksAndRejections (internal/process/task_queues.js:84:9)
[2020-11-07 20:20:58.233] [ERROR] (node:10421) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by t hrowing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
[2020-11-07 20:20:58.235] [ERROR] (node:10421) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by t hrowing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
^C[2020-11-07 20:21:09.422] [LOG] Shutting down server...

HELP!

Bring stopped working.

Hi, after several months of Bring working without a hitch I noticed that the magic mirror display was not updating to reflect what was showing on the Bring App on my mobile.
Restarted pi and all items work OK but Bring not showing anything on MM. Mobile phone App still working fine.
The startup logs show a certificate error (see below) and other errors but its not clear to a novice coder what this all means.
Hope someone can help or give me a direction to explore this issue.


[email protected] start /home/pi/MagicMirror
DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
[07.10.2021 16:43.17.965] [LOG] Starting MagicMirror: v2.15.0
[07.10.2021 16:43.17.978] [LOG] Loading config ...
[07.10.2021 16:43.17.997] [LOG] Loading module helpers ...
[07.10.2021 16:43.19.144] [LOG] Initializing new module helper ...
[07.10.2021 16:43.19.146] [LOG] Module helper loaded: MMM-Wallpaper
[07.10.2021 16:43.19.151] [LOG] No helper found for module: clock.
[07.10.2021 16:43.19.154] [LOG] No helper found for module: calendar_monthly.
[07.10.2021 16:43.19.692] [LOG] Initializing new module helper ...
[07.10.2021 16:43.19.693] [LOG] Module helper loaded: calendar
[07.10.2021 16:43.19.695] [LOG] No helper found for module: weather.
[07.10.2021 16:43.19.699] [LOG] No helper found for module: MMM-WiFiPassword.
[07.10.2021 16:43.19.933] [LOG] Initializing new module helper ...
[07.10.2021 16:43.19.935] [LOG] Module helper loaded: MMM-Bring
[07.10.2021 16:43.19.937] [LOG] All module helpers loaded.
[07.10.2021 16:43.20.240] [LOG] Starting server on port 8080 ...
[07.10.2021 16:43.20.287] [LOG] Server started ...
[07.10.2021 16:43.20.289] [LOG] Connecting socket for: MMM-Wallpaper
[07.10.2021 16:43.20.291] [LOG] Starting node helper for: MMM-Wallpaper
[07.10.2021 16:43.20.312] [LOG] Connecting socket for: calendar
[07.10.2021 16:43.20.315] [LOG] Starting node helper for: calendar
[07.10.2021 16:43.20.318] [LOG] Connecting socket for: MMM-Bring
[07.10.2021 16:43.20.320] [LOG] Sockets connected & modules started ...
[07.10.2021 16:43.20.941] [LOG] Launching application.
[07.10.2021 16:43.29.454] [LOG] Create new calendar fetcher for url: http://calendar.google.com/calendar/ical/tonyjubb123%40gmail.com/public/basic.ics - Interval: 300000
[07.10.2021 16:43.31.392] [INFO] Calendar-Fetcher: Broadcasting 10 events.
[07.10.2021 16:43.32.734] [ERROR] (node:23613) UnhandledPromiseRejectionWarning: Error: certificate has expired
at TLSSocket.onConnectSecure (_tls_wrap.js:1501:34)
at TLSSocket.emit (events.js:315:20)
at TLSSocket._finishInit (_tls_wrap.js:936:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:710:12)
[07.10.2021 16:43.32.736] [ERROR] (node:23613) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
[07.10.2021 16:43.32.738] [ERROR] (node:23613) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


touch not working

As per my title.
Touch does not seem to work.
Touch is implemented through a Kinect driven pointer in my setup and simulated clicks (XTestFakeButtonEvent function).
Works fine for other touch enabled modules.

How can I supply more info to debug?

Adding new items via input

I wonder if there is a possibility to put in new values via an input and submit button. I have it set up in my fork but you would need a virtual keyboard for that and that's where I'm currently lost.
Do you know of a solution for a virtual keyboard for a mirror module? # #

Colors

Is there a way to make the background color transparent?

No Data

Hello,

unfortunately no more data is displayed.
I have not made any changes and the rest of the MagicMirrors works fine.

Thank you very much in advance.

Header ?

Hello
Would it be possible to add a header with the default configuration of MagicMirror when there is at least one item in the list and hide it when the list is empty?

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.