Modules to display Stock (Capital Stock)



  • I want to display few stocks on my MM2, but there are three plugings, and neither of them are usefull.

    Here are the 3 modules

    MMM-Stock by hakanmhmd

    Problem: Everytime I add this module, I get the message to check the config.js file.
    I tpyed the exact same thing as the readme (also updated the position tag and removed the comments ) but no sucess.

    MMM-stocks by khadiwala

    Problem: The name of the folder doesn’t match the name of the module in the .js file. Can that be the problem? If so, how to fix it? If no, then why does my MagicMirror load as a blank black screen whenever this module is added?

    MagicMirror works properly when the above modules are removed from the config.js.

    stocks by alexyak

    Problem: This works perfectly fine, except it is displayed as a ticker. I want to to be displayed a normal list (like calendar events). Also this module usess the google finance API (unlike the above two which use the yahoo finance API 8)), which doesn’t support other things like comodities, Currency, etc.

    Last thing, how do I uninstall a module? Simply delete the folder in the modules directory after removing he code from the config file? Yes that’s the way to do it.
    Because modules with similar names can also be causing problems. I think. :/



  • @qqqqqqqq

    first module

    {
                module: 'MMM-Stock',
                position: 'top_right',
                config: {
                    companies: ['MSFT', 'GOOG', 'ORCL', 'FB'],
                    currency: 'gbp'
                }
    }
    

    second module: you have to rename the folder to stocks, as you mentioned the directory and the js file and inside the js file the name has to be the same.

    third: create an issue on github and ask if he creates a list as config option



  • @strawberry-3.141

    I’ve already tried this. Did it work for you?



  • @qqqqqqqq yes its working for me, but its not documented in the readme that you have to install npm install request in the module directory



  • @strawberry-3.141

    @strawberry-3.141 said in Modules to display Stock (Capital Stock):

    @qqqqqqqq yes its working for me, but its not documented in the readme that you have to install npm install request in the module directory

    Do i have to run that command? From the modules folder?



  • @qqqqqqqq cd ~/MagicMirror/modules/MMM-Stock then the command above

    The second module does also not tell about installing the request dependency



  • The first module works, maybe I was doing something wrong. :/

    Does it take forever to load for you too?



  • @strawberry-3.141 said in Modules to display Stock (Capital Stock):

    @qqqqqqqq cd ~/MagicMirror/modules/MMM-Stock then the command above

    The second module does also not tell about installing the request dependency

    What do I make of this?

    pi@raspberrypi:~/MagicMirror/modules $ npm install request
    /home/pi/MagicMirror/modules
    `-- request@2.79.0 
      +-- aws-sign2@0.6.0 
      +-- aws4@1.6.0 
      +-- caseless@0.11.0 
      +-- combined-stream@1.0.5 
      | `-- delayed-stream@1.0.0 
      +-- extend@3.0.0 
      +-- forever-agent@0.6.1 
      +-- form-data@2.1.2 
      | `-- asynckit@0.4.0 
      +-- har-validator@2.0.6 
      | +-- chalk@1.1.3 
      | | +-- ansi-styles@2.2.1 
      | | +-- escape-string-regexp@1.0.5 
      | | +-- has-ansi@2.0.0 
      | | | `-- ansi-regex@2.1.1 
      | | +-- strip-ansi@3.0.1 
      | | `-- supports-color@2.0.0 
      | +-- commander@2.9.0 
      | | `-- graceful-readlink@1.0.1 
      | +-- is-my-json-valid@2.15.0 
      | | +-- generate-function@2.0.0 
      | | +-- generate-object-property@1.2.0 
      | | | `-- is-property@1.0.2 
      | | +-- jsonpointer@4.0.1 
      | | `-- xtend@4.0.1 
      | `-- pinkie-promise@2.0.1 
      |   `-- pinkie@2.0.4 
      +-- hawk@3.1.3 
      | +-- boom@2.10.1 
      | +-- cryptiles@2.0.5 
      | +-- hoek@2.16.3 
      | `-- sntp@1.0.9 
      +-- http-signature@1.1.1 
      | +-- assert-plus@0.2.0 
      | +-- jsprim@1.3.1 
      | | +-- extsprintf@1.0.2 
      | | +-- json-schema@0.2.3 
      | | `-- verror@1.3.6 
      | `-- sshpk@1.10.2 
      |   +-- asn1@0.2.3 
      |   +-- assert-plus@1.0.0 
      |   +-- bcrypt-pbkdf@1.0.1 
      |   +-- dashdash@1.14.1 
      |   | `-- assert-plus@1.0.0 
      |   +-- ecc-jsbn@0.1.1 
      |   +-- getpass@0.1.6 
      |   | `-- assert-plus@1.0.0 
      |   +-- jodid25519@1.0.2 
      |   +-- jsbn@0.1.1 
      |   `-- tweetnacl@0.14.5 
      +-- is-typedarray@1.0.0 
      +-- isstream@0.1.2 
      +-- json-stringify-safe@5.0.1 
      +-- mime-types@2.1.14 
      | `-- mime-db@1.26.0 
      +-- oauth-sign@0.8.2 
      +-- qs@6.3.1 
      +-- stringstream@0.0.5 
      +-- tough-cookie@2.3.2 
      | `-- punycode@1.4.1 
      +-- tunnel-agent@0.4.3 
      `-- uuid@3.0.1 
    
    npm WARN enoent ENOENT: no such file or directory, open '/home/pi/MagicMirror/modules/package.json'
    npm WARN enoent ENOENT: no such file or directory, open '/home/pi/MagicMirror/modules/node_modules/node_helper/package.json'
    npm WARN modules No description
    npm WARN modules No repository field.
    npm WARN modules No README data
    npm WARN modules No license field.
    
    


  • @qqqqqqqq you can ignore these warnings



  • 3rd module with google finance works for me just fine, all you need it to find the correct ticker. For currency try “CURRENCY:EURUSD”, for commodities unfortunately you will need to find some substitute. You can try “NYSEARCA: USO” or “NYSEARCA: BNO” in case of crude oil.


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.