tthma / homebridge-linky-enedis-meter

MIT License
8 stars 1 forks source link

Probleme #16

Open Gabin85 opened 1 year ago

Gabin85 commented 1 year ago

En allant sur homebridge pour mettre à jour mes plugins j'ai remarqué de gros message rouge d'erreur...

` APIError: Conso API a répondu avec une erreur at file:///homebridge/node_modules/homebridge-linky-enedis-meter/node_modules/linky/dist/lib/index.js:76:23 at processTicksAndRejections (node:internal/process/task_queues:95:5) { err: AxiosError: Request failed with status code 403 at settle (file:///homebridge/node_modules/homebridge-linky-enedis-meter/node_modules/axios/lib/core/settle.js:19:12) at BrotliDecompress.handleStreamEnd (file:///homebridge/node_modules/homebridge-linky-enedis-meter/node_modules/axios/lib/adapters/http.js:572:11) at BrotliDecompress.emit (node:events:526:35) at endReadableNT (node:internal/streams/readable:1359:12) at processTicksAndRejections (node:internal/process/task_queues:82:21) { code: 'ERR_BAD_REQUEST', config: { transitional: [Object], adapter: 'http', transformRequest: [Array], transformResponse: [Array], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: [Object], validateStatus: [Function: validateStatus], headers: [Object [AxiosHeaders]], method: 'get', url: 'https://conso.boris.sh/api/consumption_load_curve?start=2023-09-20&end=2023-09-21&prm=', data: undefined }, request: ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: [TLSSocket], _header: 'GET /api/consumption_load_curve?start=2023-09-20&end=2023-09-21&prm= HTTP/1.1\r\n' + 'Accept: application/json\r\n' + 'Authorization: Bearer + 'User-Agent: @bokub/linky\r\n' + 'Accept-Encoding: gzip, compress, deflate, br\r\n' + 'Host: conso.boris.sh\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/api/consumption_load_curve?start=2023-09-20&end=2023-09-21&prm=', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'conso.boris.sh', protocol: 'https:', _redirectable: [Writable],

  [Symbol(kBytesWritten)]: 0,
  [Symbol(kNeedDrain)]: false,
  [Symbol(corked)]: 0,
  [Symbol(kOutHeaders)]: [Object: null prototype],
  [Symbol(errored)]: null,
  [Symbol(kHighWaterMark)]: 16384,
  [Symbol(kRejectNonStandardBodyWrites)]: false,
  [Symbol(kUniqueHeaders)]: null
},
response: {
  status: 403,
  statusText: 'Forbidden',
  headers: [Object [AxiosHeaders]],
  config: [Object],
  request: [ClientRequest],
  data: '<!DOCTYPE html>\n' +
    '<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->\n' +
    '<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->\n' +
    '<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->\n' +
    '<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->\n' +
    '<head>\n' +
    '<title>Attention Required! | Cloudflare</title>\n' +
    '<meta charset="UTF-8" />\n' +
    '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n' +
    '<meta http-equiv="X-UA-Compatible" content="IE=Edge" />\n' +
    '<meta name="robots" content="noindex, nofollow" />\n' +
    '<meta name="viewport" content="width=device-width,initial-scale=1" />\n' +
    '<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" />\n' +
    `<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->\n` +
    '<style>body{margin:0;padding:0}</style>\n' +
    '\n' +
    '\n' +
    '<!--[if gte IE 10]><!-->\n' +
    '<script>\n' +
    '  if (!navigator.cookieEnabled) {\n' +
    "    window.addEventListener('DOMContentLoaded', function () {\n" +
    "      var cookieEl = document.getElementById('cookie-alert');\n" +
    "      cookieEl.style.display = 'block';\n" +
    '    })\n' +
    '  }\n' +
    '</script>\n' +
    '<!--<![endif]-->\n' +
    '\n' +
    '\n' +
    '</head>\n' +
    '<body>\n' +
    '  <div id="cf-wrapper">\n' +
    '    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>\n' +
    '    <div id="cf-error-details" class="cf-error-details-wrapper">\n' +
    '      <div class="cf-wrapper cf-header cf-error-overview">\n' +
    '        <h1 data-translate="block_headline">Sorry, you have been blocked</h1>\n' +
    '        <h2 class="cf-subheadline"><span data-translate="unable_to_access">You are unable to access</span> boris.sh</h2>\n' +
    '      </div><!-- /.header -->\n' +
    '\n' +
    '      <div class="cf-section cf-highlight">\n' +
    '        <div class="cf-wrapper">\n' +
    '          <div class="cf-screenshot-container cf-screenshot-full">\n' +
    '            \n' +
    '              <span class="cf-no-screenshot error"></span>\n' +
    '            \n' +
    '          </div>\n' +
    '        </div>\n' +
    '      </div><!-- /.captcha-container -->\n' +
    '\n' +
    '      <div class="cf-section cf-wrapper">\n' +
    '        <div class="cf-columns two">\n' +
    '          <div class="cf-column">\n' +
    '            <h2 data-translate="blocked_why_headline">Why have I been blocked?</h2>\n' +
    '\n' +
    '            <p data-translate="blocked_why_detail">This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.</p>\n' +
    '          </div>\n' +
    '\n' +
    '          <div class="cf-column">\n' +
    '            <h2 data-translate="blocked_resolve_headline">What can I do to resolve this?</h2>\n' +
    '\n' +
    '            <p data-translate="blocked_resolve_detail">You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.</p>\n' +
    '          </div>\n' +
    '        </div>\n' +
    '      </div><!-- /.section -->\n' +
    '\n' +
    '      <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">\n' +
    '  <p class="text-13">\n' +
    '    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong class="font-semibold">80a58777fac502b1</strong></span>\n' +
    '    <span class="cf-footer-separator sm:hidden">&bull;</span>\n' +
    '    <span id="cf-footer-item-ip" class="cf-footer-item hidden sm:block sm:mb-1">\n' +
    '      Your IP:\n' +
    '      <button type="button" id="cf-footer-ip-reveal" class="cf-footer-ip-reveal-btn">Click to reveal</button>\n' +
    '      <span class="hidden" id="cf-footer-ip">2a01:cb05:8820:c100:dea6:32ff:fe91:ecb5</span>\n' +
    '      <span class="cf-footer-separator sm:hidden">&bull;</span>\n' +
    '    </span>\n' +
    '    <span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; security by</span> <a rel="noopener noreferrer" href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" target="_blank">Cloudflare</a></span>\n' +
    '    \n' +
    '  </p>\n' +
    '  <script>(function(){function d(){var b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>\n' +
    '</div><!-- /.error-footer -->\n' +
    '\n' +
    '\n' +
    '    </div><!-- /#cf-error-details -->\n' +
    '  </div><!-- /#cf-wrapper -->\n' +
    '\n' +
    '  <script>\n' +
    '  window._cf_translation = {};\n' +
    '  \n' +
    '  \n' +
    '</script>\n' +
    '\n' +
    '</body>\n' +
    '</html>\n'
}

}, code: 403, response: '<!DOCTYPE html>\n' + '\n' + '\n' + '\n' + ' \n' + '\n' + 'Attention Required! | Cloudflare\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + <!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->\n + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '

\n' + ' \n' + '
\n' + '
\n' + '

Sorry, you have been blocked

\n' + '

You are unable to access boris.sh

\n' + '
\n' + '\n' + '
\n' + '
\n' + '
\n' + ' \n' + ' \n' + ' \n' + '
\n' + '
\n' + '
\n' + '\n' + '
\n' + '
\n' + '
\n' + '

Why have I been blocked?

\n' + '\n' + '

This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.

\n' + '
\n' + '\n' + '
\n' + '

What can I do to resolve this?

\n' + '\n' + '

You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.

\n' + '
\n' + '
\n' + '
\n' + '\n' + ' \n' + '\n' + '\n' + '
\n' + '
\n' + '\n' + ' \n' + '\n' + '\n' + '\n'`

Gabin85 commented 1 year ago

Ah bah j'ai été banni par l'API -_-

tthma commented 1 year ago

Ça me faisait la même chose chez Bouygues. Certains site ou j'étais bloqué je ne pouvais carrément pas y aller. J'étais pas banni juste par la box ça marchait pas. EDF impôt etc... Des fois ça revenait et des fois non 😑

Vous êtes à quel version ?

Gabin85 commented 1 year ago

Version de ? Tout est à jour de toute façon

et je suis chez Orange