• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

[MMM-JaST] Just another Stock Ticker (new: version 2.x)

Scheduled Pinned Locked Moved Utilities
166 Posts 37 Posters 164.9k Views 39 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    Jalibu Module Developer
    last edited by Jan 14, 2021, 12:41 PM

    I have refactored this module from scratch. It now should also support DepotGrowth calculation in currencies other than EUR. A few internal and UI bugs were also fixed.

    Please let me know if you are facing any issues with the latest version.

    K 1 Reply Last reply Mar 25, 2021, 4:29 PM Reply Quote 0
    • K Offline
      Koert 0 @Jalibu
      last edited by Koert 0 Mar 25, 2021, 4:34 PM Mar 25, 2021, 4:29 PM

      @jalibu I’m facing some problems with displaying the correct value of my stocks.

      modules: [
      
      
      
      {
      module: "MMM-Jast",
      position: "fullscreen_above",
      config: {
      
      maxWidth: "100%",
      updateIntervalInSeconds: 0, 
      fadeSpeedInSeconds: 90.5, 
      scroll: "horizontal",
      defaultCurrency: "EUR",
      showDepotGrowth: false,
      apiKey: "MY API KEY",
      stocks: [
      	{ name: "Porsche", symbol: "PAH3.DE" },
      	{ name: "STS", symbol: "SF3.DE"},
      	{ name: "Haier", symbol: "690D.DE" },
      	{ name: "Siemens Energy", symbol: "ENR.DE" },
      	{ name: "TUI", symbol: "TUI1.DE" },
      	{ name: "HochTief", symbol: "HOT.DE" },
      	{ name: "Siemens", symbol: "SIE.DE" },
      	{ name: "Allianz", symbol: "ALV.DE" },
      	],
      	},
      	},
      		
      	]
         };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      
      

      Problem 1: The ticker is showing me Values. But also a value for BTC (which isn’t mentioned in the code?!?!)

      Problem 2: Values from the stock list are old Values from the beginning of the Day (or maybe last value of the day before)

      maybe a Log can help you:

      /home/pi/.pm2/logs/mm-out.log last 100 lines:
      0|mm       | [25.03.2021 16:08.16.922] [LOG]   Sending Stock result: { symbol: 'PAH3.DE', current: 84.68, last: 87.42 }
      0|mm       | [25.03.2021 16:08.16.936] [LOG]   Sending Stock result: { symbol: '690D.DE', current: 1.832, last: 1.9368 }
      0|mm       | [25.03.2021 16:08.16.971] [LOG]   Sending Stock result: { symbol: 'TUI1.DE', current: 4.396, last: 4.133 }
      0|mm       | [25.03.2021 16:09.18.891] [LOG]   Sending Stock result: { symbol: 'HOT.DE', current: 73.35, last: 73 }
      0|mm       | [25.03.2021 16:09.18.913] [LOG]   Sending Stock result: { symbol: 'SIE.DE', current: 135.56, last: 135.98 }
      0|mm       | [25.03.2021 16:09.18.974] [LOG]   Sending Stock result: { symbol: 'ALV.DE', current: 212.55, last: 211.45 }
      0|mm       | [25.03.2021 16:09.19.845] [LOG]   Sending Crypto result: { symbol: 'BTC', current: 52417.17, last: 52303.65 }
      0|mm       | 
      0|mm       | > magicmirror@2.14.0 start /home/pi/MagicMirror
      0|mm       | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      0|mm       | 
      0|mm       | [25.03.2021 16:26.45.698] [LOG]   Starting MagicMirror: v2.14.0
      0|mm       | [25.03.2021 16:26.45.712] [LOG]   Loading config ...
      0|mm       | [25.03.2021 16:26.45.733] [LOG]   Loading module helpers ...
      0|mm       | [25.03.2021 16:26.46.100] [LOG]   Initializing new module helper ...
      0|mm       | [25.03.2021 16:26.46.105] [LOG]   Module helper loaded: updatenotification
      0|mm       | [25.03.2021 16:26.46.111] [LOG]   No helper found for module: helloworld.
      0|mm       | [25.03.2021 16:26.46.112] [LOG]   All module helpers loaded.
      0|mm       | [25.03.2021 16:26.46.305] [LOG]   Starting server on port 8080 ... 
      0|mm       | [25.03.2021 16:26.46.329] [LOG]   Server started ...
      0|mm       | [25.03.2021 16:26.46.331] [LOG]   Connecting socket for: updatenotification
      0|mm       | [25.03.2021 16:26.46.332] [LOG]   Sockets connected & modules started ...
      0|mm       | [25.03.2021 16:26.46.743] [LOG]   Launching application.
      0|mm       | 
      0|mm       | > magicmirror@2.14.0 start /home/pi/MagicMirror
      0|mm       | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      0|mm       | 
      0|mm       | [25.03.2021 16:27.41.491] [LOG]   Starting MagicMirror: v2.14.0
      0|mm       | [25.03.2021 16:27.41.506] [LOG]   Loading config ...
      0|mm       | [25.03.2021 16:27.41.519] [LOG]   Loading module helpers ...
      0|mm       | [25.03.2021 16:27.41.524] [LOG]   No helper found for module: clock.
      0|mm       | [25.03.2021 16:27.42.080] [LOG]   Initializing new module helper ...
      0|mm       | [25.03.2021 16:27.42.082] [LOG]   Module helper loaded: MMM-Jast
      0|mm       | [25.03.2021 16:27.42.084] [LOG]   All module helpers loaded.
      0|mm       | [25.03.2021 16:27.42.238] [LOG]   Starting server on port 8080 ... 
      0|mm       | [25.03.2021 16:27.42.269] [LOG]   Server started ...
      0|mm       | [25.03.2021 16:27.42.271] [LOG]   Connecting socket for: MMM-Jast
      0|mm       | [25.03.2021 16:27.42.273] [LOG]   MMM-Jast helper method started...
      0|mm       | [25.03.2021 16:27.42.274] [LOG]   Sockets connected & modules started ...
      0|mm       | [25.03.2021 16:27.42.755] [LOG]   Launching application.
      0|mm       | [25.03.2021 16:27.47.791] [LOG]   Sending Stock result: { symbol: 'ALV.DE', current: 212.55, last: 211.45 }
      0|mm       | [25.03.2021 16:27.47.868] [LOG]   Sending Stock result: { symbol: 'SF3.DE', current: 7.88, last: 7.68 }
      0|mm       | [25.03.2021 16:27.47.890] [LOG]   Sending Stock result: { symbol: 'ENR.DE', current: 29.38, last: 30.03 }
      0|mm       | [25.03.2021 16:27.47.916] [LOG]   Sending Stock result: { symbol: '690D.DE', current: 1.832, last: 1.9368 }
      0|mm       | [25.03.2021 16:27.47.960] [LOG]   Sending Stock result: { symbol: 'PAH3.DE', current: 84.68, last: 87.42 }
      

      For Example Porsche received the same value twice
      Greetings from BW to RP ;)

      J 1 Reply Last reply Mar 29, 2021, 7:09 AM Reply Quote 0
      • J Offline
        Jalibu Module Developer @Koert 0
        last edited by Mar 29, 2021, 7:09 AM

        Hi @koert-0 ,

        thank you for your message.

        Problem 1:
        There was a hidden sample crypto entry in the default settings. I removed that and improved the Readme, to avoid this confusion in the future.

        Problem 2:
        The problem for this is more likely to be found with the data provider than with the module.
        The module displays what it gets. If the values are not up to date, then unfortunately I can’t influence that.

        In general, I am rather dissatisfied with Alphavantage. Unfortunately, I don’t know a free alternative. I am open for suggestions.

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jalibu Module Developer
          last edited by Mar 29, 2021, 12:41 PM

          I refactored this module again to use Yahoo’s financial API instead of Alphavantage and need some voluntary testers.

          It should now support many more Symbols and be more accurate and much simpler.

          Please check out this Feature Branch:
          https://github.com/jalibu/MMM-Jast/tree/feat/useYahoo

          B 1 Reply Last reply Mar 30, 2021, 8:01 AM Reply Quote 0
          • B Offline
            BravoOscar @Jalibu
            last edited by Mar 30, 2021, 8:01 AM

            @jalibu

            I will test it later today, but I need to know of this is this a upgrade or is it a new install.

            I use the originale MMM-JaST, should this be removed before a new install?

            J 1 Reply Last reply Mar 30, 2021, 8:20 AM Reply Quote 0
            • J Offline
              Jalibu Module Developer @BravoOscar
              last edited by Mar 30, 2021, 8:20 AM

              @bravooscar
              Well, the word “install” is fuzzy…

              You don’t need to uninstall your old one and even your configuration is compatible.

              You can switch between them by just changing the branch.
              In your modules/MMM-Jast folder execute

              Switch to Yahoo test branch:

              git fetch
              git checkout feat/useYahoo
              npm i
              

              Switch back to stable master:

              git checkout master
              
              B 1 Reply Last reply Mar 30, 2021, 7:03 PM Reply Quote 0
              • B Offline
                BravoOscar @Jalibu
                last edited by Mar 30, 2021, 7:03 PM

                @jalibu

                pi@raspberrypi:~/MagicMirror/modules/MMM-Jast $ git fetch
                From https://github.com/jalibu/MMM-Jast
                   1cd91dc..c18758f  master        -> origin/master
                 * [new branch]      feat/useYahoo -> origin/feat/useYahoo
                 * [new tag]         v1.1.0        -> v1.1.0
                 * [new tag]         v1.2.0        -> v1.2.0
                pi@raspberrypi:~/MagicMirror/modules/MMM-Jast $ git checkout feat/useYahoo
                error: Your local changes to the following files would be overwritten by checkout:
                	MMM-Jast.css
                	MMM-Jast.js
                Please commit your changes or stash them before you switch branches.
                Aborting
                pi@raspberrypi:~/MagicMirror/modules/MMM-Jast $ npm i
                
                > magicmirror@2.14.0 install /home/pi/MagicMirror
                > echo "Installing vendor files ...
                " && cd vendor && npm install --loglevel=error
                
                Installing vendor files ...
                
                audited 24 packages in 1.694s
                
                

                It looks like there is a error when using “git checkout feat/useYahoo”.

                Now the alert message on MM says there is a update for MMM-Jast

                B 1 Reply Last reply Mar 30, 2021, 9:33 PM Reply Quote 0
                • B Offline
                  BravoOscar @BravoOscar
                  last edited by Mar 30, 2021, 9:33 PM

                  @bravooscar @jalibu

                  pi@raspberrypi:~/MagicMirror/modules/MMM-Jast $ git fetch
                  pi@raspberrypi:~/MagicMirror/modules/MMM-Jast $ git checkout feat/useYahoo
                  Branch 'feat/useYahoo' set up to track remote branch 'feat/useYahoo' from 'origin'.
                  Switched to a new branch 'feat/useYahoo'
                  pi@raspberrypi:~/MagicMirror/modules/MMM-Jast $ npm i
                  npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
                  added 262 packages from 267 contributors and audited 263 packages in 33.609s
                  
                  35 packages are looking for funding
                    run `npm fund` for details
                  
                  found 0 vulnerabilities
                  
                  

                  I removed MMM-Jast folder, and did a clean install of MMM-Jast.
                  Then I did this

                  git fetch
                  git checkout feat/useYahoo
                  npm i
                  

                  Everythink works now, and also one of my stocks that was not available before.

                  Good work!
                  Think is should be made as master, maby make a config option, so its possible to cange from Yahoo to the other one.

                  1 Reply Last reply Reply Quote 0
                  • earnestrichardsE Offline
                    earnestrichards
                    last edited by earnestrichards Mar 31, 2021, 1:30 AM Mar 31, 2021, 1:18 AM

                    I guess I’ve done something wrong…

                    I copied the link, installed to my modules folder, ran the “npm i” command, and updated my config .js file

                    {
                    			module: "MMM-Jast",
                    			position: "top_left",
                    			config: {
                    				maxWidth: "100%",
                    				updateIntervalInSeconds: 300,
                    				fadeSpeedInSeconds: 3.5, // Higher value: vertical -> faster // horizontal -> slower
                    				scroll:"none", // "<none, vertical, horizontal>",
                    				showChangePercent: true,
                    				showChangeValue: false,
                    				showChangeValueCurrency: false,
                    				showDepotGrowth: false,
                    				stocks: [
                    					{ name: "FFFEX", symbol: "FFFEX",quantity: 1},
                    					{ name: "FFFDX", symbol: "FFFDX", quantity: 1},
                    					{ name: "PLFJX", symbol: "PLFJX", quantity: 1}
                    					// { name: "DJIA", symbol: "DJIA"}
                    				]
                    			}
                    		},
                    

                    20831a5a-ef15-43c7-9d3e-6ec28deafa68-image.png

                    J 1 Reply Last reply Mar 31, 2021, 8:23 AM Reply Quote 0
                    • J Offline
                      Jalibu Module Developer @earnestrichards
                      last edited by Jalibu Mar 31, 2021, 8:49 AM Mar 31, 2021, 8:23 AM

                      @earnestrichards I sent you a PM.
                      I think you are not on the feat/useYahoo branch.

                      No matter. I have now made the feature branch the master.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 16
                      • 17
                      • 4 / 17
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy