MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. lavolp3
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    Offline
    • Profile
    • Following 0
    • Followers 11
    • Topics 38
    • Posts 892
    • Groups 3

    Posts

    Recent Best Controversial
    • axios request returns no data, while http request does

      I have set up an axios request for a module I’M trying to fix (MMM-Fantasy-Premier league)

                                  axios.get(url)
                                      .then(function(response){
                                              console.log(response);
                                      }).catch(function(err){
                                              console.log(self.name + " : getleagueData : " + err);
                                      });
      

      The axios request gives me a this:

      {
        status: 200,
        statusText: 'OK',
        headers: {
          connection: 'close',
          'content-length': '0',
          server: 'Varnish',
          'retry-after': '0',
          'content-type': 'application/json',
          'accept-ranges': 'bytes',
          date: 'Fri, 11 Sep 2020 07:17:50 GMT',
          via: '1.1 varnish',
          'x-served-by': 'cache-hhn4058-HHN',
          'x-cache': 'MISS',
          'x-cache-hits': '0',
          'x-timer': 'S1599808670.050178,VS0,VE0'
        },
        config: {
          url: 'https://fantasy.premierleague.com/api/leagues-classic/63436/standings',
          method: 'get',
          headers: {
            Accept: 'application/json, text/plain, */*',
            'User-Agent': 'axios/0.20.0'
          },
          transformRequest: [ [Function: transformRequest] ],
          transformResponse: [ [Function: transformResponse] ],
          timeout: 0,
          adapter: [Function: httpAdapter],
          xsrfCookieName: 'XSRF-TOKEN',
          xsrfHeaderName: 'X-XSRF-TOKEN',
          maxContentLength: -1,
          maxBodyLength: -1,
          validateStatus: [Function: validateStatus],
          data: undefined
        },
        request: ClientRequest {
          _events: [Object: null prototype] {
            socket: [Function],
            abort: [Function],
            aborted: [Function],
            connect: [Function],
            error: [Function],
            timeout: [Function],
            prefinish: [Function: requestOnPrefinish]
          },
          _eventsCount: 7,
          _maxListeners: undefined,
          outputData: [],
          outputSize: 0,
          writable: true,
          _last: true,
          chunkedEncoding: false,
          shouldKeepAlive: false,
          useChunkedEncodingByDefault: false,
          sendDate: false,
          _removedConnection: false,
          _removedContLen: false,
          _removedTE: false,
          _contentLength: 0,
          _hasBody: true,
          _trailer: '',
          finished: true,
          _headerSent: true,
          socket: TLSSocket {
            _tlsOptions: [Object],
            _secureEstablished: true,
            _securePending: false,
            _newSessionPending: false,
            _controlReleased: true,
            _SNICallback: null,
            servername: 'fantasy.premierleague.com',
            alpnProtocol: false,
            authorized: true,
            authorizationError: null,
            encrypted: true,
            _events: [Object: null prototype],
            _eventsCount: 10,
            connecting: false,
            _hadError: false,
            _parent: null,
            _host: 'fantasy.premierleague.com',
            _readableState: [ReadableState],
            readable: true,
            _maxListeners: undefined,
            _writableState: [WritableState],
            writable: false,
            allowHalfOpen: false,
            _sockname: null,
            _pendingData: null,
            _pendingEncoding: '',
            server: undefined,
            _server: null,
            ssl: [TLSWrap],
            _requestCert: true,
            _rejectUnauthorized: true,
            parser: null,
            _httpMessage: [Circular],
            [Symbol(res)]: [TLSWrap],
            [Symbol(asyncId)]: 5496,
            [Symbol(kHandle)]: [TLSWrap],
            [Symbol(lastWriteQueueSize)]: 0,
            [Symbol(timeout)]: null,
            [Symbol(kBytesRead)]: 0,
            [Symbol(kBytesWritten)]: 0,
            [Symbol(connect-options)]: [Object]
          },
          connection: TLSSocket {
            _tlsOptions: [Object],
            _secureEstablished: true,
            _securePending: false,
            _newSessionPending: false,
            _controlReleased: true,
            _SNICallback: null,
            servername: 'fantasy.premierleague.com',
            alpnProtocol: false,
            authorized: true,
            authorizationError: null,
            encrypted: true,
            _events: [Object: null prototype],
            _eventsCount: 10,
            connecting: false,
            _hadError: false,
            _parent: null,
            _host: 'fantasy.premierleague.com',
            _readableState: [ReadableState],
            readable: true,
            _maxListeners: undefined,
            _writableState: [WritableState],
            writable: false,
            allowHalfOpen: false,
            _sockname: null,
            _pendingData: null,
            _pendingEncoding: '',
            server: undefined,
            _server: null,
            ssl: [TLSWrap],
            _requestCert: true,
            _rejectUnauthorized: true,
            parser: null,
            _httpMessage: [Circular],
            [Symbol(res)]: [TLSWrap],
            [Symbol(asyncId)]: 5496,
            [Symbol(kHandle)]: [TLSWrap],
            [Symbol(lastWriteQueueSize)]: 0,
            [Symbol(timeout)]: null,
            [Symbol(kBytesRead)]: 0,
            [Symbol(kBytesWritten)]: 0,
            [Symbol(connect-options)]: [Object]
          },
          _header: 'GET /api/leagues-classic/63436/standings HTTP/1.1\r' +
            '\nAccept: application/json, text/plain, */*\r' +
            '\nUser-Agent: axios/0.20.0\r' +
            '\nHost: fantasy.premierleague.com\r' +
            '\nConnection: close\r' +
            '\n\r' +
            '\n',
          _onPendingData: [Function: noopPendingOutput],
          agent: Agent {
            _events: [Object: null prototype],
            _eventsCount: 1,
            _maxListeners: undefined,
            defaultPort: 443,
            protocol: 'https:',
            options: [Object],
            requests: {},
            sockets: [Object],
            freeSockets: {},
            keepAliveMsecs: 1000,
            keepAlive: false,
            maxSockets: Infinity,
            maxFreeSockets: 256,
            maxCachedSessions: 100,
            _sessionCache: [Object]
          },
          socketPath: undefined,
          method: 'GET',
          path: '/api/leagues-classic/63436/standings',
          _ended: true,
          res: IncomingMessage {
            _readableState: [ReadableState],
            readable: false,
            _events: [Object: null prototype],
            _eventsCount: 3,
            _maxListeners: undefined,
            socket: [TLSSocket],
            connection: [TLSSocket],
            httpVersionMajor: 1,
            httpVersionMinor: 1,
            httpVersion: '1.1',
            complete: true,
            headers: [Object],
            rawHeaders: [Array],
            trailers: {},
            rawTrailers: [],
            aborted: false,
            upgrade: false,
            url: '',
            method: null,
            statusCode: 200,
            statusMessage: 'OK',
            client: [TLSSocket],
            _consuming: false,
            _dumped: false,
            req: [Circular],
            responseUrl: 'https://fantasy.premierleague.com/api/leagues-classic/63436/standings',
            redirects: []
          },
          aborted: false,
          timeoutCb: null,
          upgradeOrConnect: false,
          parser: null,
          maxHeadersCount: null,
          _redirectable: Writable {
            _writableState: [WritableState],
            writable: true,
            _events: [Object: null prototype],
            _eventsCount: 2,
            _maxListeners: undefined,
            _options: [Object],
            _ended: true,
            _ending: true,
            _redirectCount: 0,
            _redirects: [],
            _requestBodyLength: 0,
            _requestBodyBuffers: [],
            _onNativeResponse: [Function],
            _currentRequest: [Circular],
            _currentUrl: 'https://fantasy.premierleague.com/api/leagues-classic/63436/standings'
          },
          [Symbol(isCorked)]: false,
          [Symbol(outHeadersKey)]: [Object: null prototype] {
            accept: [Array],
            'user-agent': [Array],
            host: [Array]
          }
        },
        data: ''
      }
      

      So response.data is empty.
      When I call this exact site in my browser I get a valid json esponse.

      What am I doing wrong?
      Does anyone know?

      posted in General Discussion
      lavolp3L
      lavolp3
    • RE: Can someone help me understand "updateInterval"? DarkSky is charging me a lot of money.

      @cotxwx You mentioned MMM-NOAA3.
      The readme gives the possibility to choose other APIs.
      I would suggest to do that.

      posted in Troubleshooting
      lavolp3L
      lavolp3
    • RE: MMM-AVStock

      @thymon
      Can you please post your config?
      Also look if any changes in custom.css or main.css may affect behavior in the region or module. If yes post these entries as well

      posted in Productivity
      lavolp3L
      lavolp3
    • RE: MMM-AVStock

      @thymon pushed an update yesterday. Try it out and let meknow if it works now

      posted in Productivity
      lavolp3L
      lavolp3
    • RE: No calendar !!

      @bhepler said in No calendar !!:

      In the future, please post requests for help in the Troubleshooting section of the forum.

      moved

      posted in Troubleshooting
      lavolp3L
      lavolp3
    • RE: MMM-Traffic 2.0

      @SamLewis0602 Great Sam!
      Looks great.
      I know that you’d like to be finished :-) but an option to switch between commuting roads intraday, e.g. in the morning (to work) and in the evening (back) would be great :-)
      And not difficult to implement I suppose :-)

      posted in Transport
      lavolp3L
      lavolp3
    • RE: Can someone help me understand "updateInterval"? DarkSky is charging me a lot of money.

      @cotxwx
      Also,

      scheduleUpdate: function() {
              setInterval(() => {
                  this.getNOAA();
              }, this.config.updateInterval);
              this.getNOAA(this.config.initialLoadDelay);
          },
      

      this code shows that the API calls really are determined by updateInterval (as you thought).
      Here something comes into play that I stumbled upon.

      If you have several entities of the mirror open, let’s say you are also using a browser e.g. to develop, the main.js (and hence the setInterval function) will be started a second, third, fourth etc. time.
      In that case you would have SEVERAL interval cycles asking for an API call every x minutes.
      That can blow the API call ratio.
      Don’t know if that’s the case with you.

      That’s why I try to keep an API call cycle always inside the node_helper.js and have it start only once in my modules.

      posted in Troubleshooting
      lavolp3L
      lavolp3
    • RE: Can someone help me understand "updateInterval"? DarkSky is charging me a lot of money.

      @lavolp3

      "Your trial account allows up to 1,000 free calls per day to evaluate the Dark Sky API. If you would like > to make more than 1,000 calls per day, simply enter billing information to upgrade to a full account. "

      So you need to stay below 1,000 calls/day.
      I have seen that MMM-NOAA uses a new API provider, weatherbit.

      You might want to do an update.

      posted in Troubleshooting
      lavolp3L
      lavolp3
    • RE: Can someone help me understand "updateInterval"? DarkSky is charging me a lot of money.

      the updateInterval is not necessarily the API fetch interval. Usually it is used as an update Interval for your content.

      DarkySky have changed their API billing for new subscribers and I believe there are no free plans available anymore.
      Did you subscribe just recently?
      What is your tier/plan?
      Do you know which interval you’d need to get free API calls?

      Before you throw money at them, there are many free weather services out there and someone may have already reprogrammed your module to use another (free) API provider.

      posted in Troubleshooting
      lavolp3L
      lavolp3
    • RE: MMM-AVStock v2.0.0 (npm update required!)

      @etayl Try the stock search function
      https://www.alphavantage.co/query?function=SYMBOL_SEARCH&keywords=Samsu&apikey=kxxxxxxxxxx
      Funnily it apparently works with any given API key.
      Here I can only find Samsung Frankfurt and London quotes.

      posted in Productivity
      lavolp3L
      lavolp3
    • RE: MMM-MyCommute

      @lavolp3 nevermind, it is already integrated in @qistoph fork it seems :-)
      Just not documented in the readme.

      posted in Transport
      lavolp3L
      lavolp3
    • RE: MMM-MyCommute

      It seems @qistoph 's fork is more up to date than the original repo.

      I just pushed a PR to the original repo AND to the @qistoph fork.
      It provides an origin option to every destination so you can show commuting back home.
      Just set any point as ‘origin’ and your home address as ‘destination’

      posted in Transport
      lavolp3L
      lavolp3
    • RE: MMM-RottenTomatoes displays awaiting update

      @tomyboy96 same for me. No movies showing up.

      posted in Troubleshooting
      lavolp3L
      lavolp3
    • RE: Deutsche Anleitung MagicMirror auf RaspberryPi 3

      @radioman Du müsstest die Reihenfolge der einzelnen Elemente in der getDom() Funktion ändern.
      Es wird immer ein Tabellenelement erzeugt (timeWrapper = document.createElement("td");) und nach Erzeugung an die Tabellenzeile angehängt: (eventWrapper.appendChild("timeWrapper"))

      Die appendChild Methoden geben an was wo liegt weil die Objekte einfach in der Reihenfolge im Code aneinander gereiht werden. Was zuerst kommt wird zuerst angehängt.
      So kannst du versuchen die Reihenfolge zu ändern indem du folgende Zeile verschiebst:

      eventWrapper.appendChild(titleWrapper);
      

      aus Zeile 284 in Zeile 377.

      Dann sollte später dort stehen

      eventWrapper.appendChild(timeWrapper);
      eventWrapper.appendChild(titleWrapper);
      

      Du hast also das Anhängen des Titlefeldes zeitlich hinter das Zeitfeld verschoben, sodass die Zeit in der Tabelle vor dem Titel stehen sollte.

      Das funktioniert nicht im dateheaders Modus.

      KEINE GARANTIE dass es wirklich funktioniert. Probier es aus und gib Rückmeldung.

      Du kannst wenn es nicht funktioniert ALLE (!) lokalen Änderungen (ausser die an den zusätzlich installierten Modulen) zurückdrehen mit

      cd ~/MagicMirror
      git reset --hard
      
      posted in General Discussion
      lavolp3L
      lavolp3
    • RE: MMM-AVStock

      @thymon Thank you, working on it.

      posted in Productivity
      lavolp3L
      lavolp3
    • RE: Deutsche Anleitung MagicMirror auf RaspberryPi 3

      @radioman Warum änderst du die calendar.js? Tu das nicht wenn nicht unbedingt nötig, du wirst Probleme beim Update bekommen.
      Für deine spezifische config ist allein die config.js zuständig.

      Für dein Problem müsstest du jedoch um zum Ziel zu kommen wirklich die calendar.js manipulieren.
      Ich müsste abe rnoch nachschauen wo.

      “dateheaders” setzt alle Termine eines Tages unter das Datum als Überschrift. Also:

      31.08.
      Termin 1 16:00
      Termin 2 18:00
      01.09.
      Termin 3 20:00
      Termin 4 21:00

      posted in General Discussion
      lavolp3L
      lavolp3
    • RE: MMM-MyCommute Module Working But Hidden??

      @scarecrow I assume you installed from the fork that includes the calendar options and not from the origin rep by jclarke0000?
      The additional options are not part of the original repository and might lead to problems.

      posted in Troubleshooting
      lavolp3L
      lavolp3
    • RE: Deutsche Anleitung MagicMirror auf RaspberryPi 3

      @radioman https://docs.magicmirror.builders/modules/calendar.html
      Die Readme steht in diesem Fall bei den default Modules als gesammelten Dokumentation auf der MagicMirror Homepage, und sonst bei auf der github Seite des Moduls.

      Ich meinte die config-Option ‘timeFormat’

      posted in General Discussion
      lavolp3L
      lavolp3
    • RE: No Tour de France module???

      @thgmirror yeah i tried one last year but didn’t get finished in time. You’re right there should be a module using some api.

      posted in Development
      lavolp3L
      lavolp3
    • RE: Deutsche Anleitung MagicMirror auf RaspberryPi 3

      @radioman es gibt den ‘dateheaders’ Modus.
      Ist der nicht was? Siehe README.

      posted in General Discussion
      lavolp3L
      lavolp3
    • 1
    • 2
    • 8
    • 9
    • 10
    • 11
    • 12
    • 44
    • 45
    • 10 / 45