bvlaicu / home-assistant-addons

MIT License
17 stars 16 forks source link

Addon does not succeed in pulling data from ConEd #16

Open cometbeetle opened 2 years ago

cometbeetle commented 2 years ago

I have tried many different things to make this addon work, and every time it eventually spits out: Error requesting meter data.

After installation, the addon also always starts by saying: Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory.

If there is something broken about the interface between the python code and the ConEd system, I hope it can be fixed, however I do not have the technical knowledge required to rebuild it. My issue is very similar to the issue mentioned ~24 days prior to this post.

HiTechTLS commented 2 years ago

Seeing exact same thing, with "coned.meter.MeterError: Error requesting meter data" and "Failed to connect to the bus: Failed to connect to socket"

Params: EMAIL = *@gmail.com PASSWORD = **** MFA_TYPE = TOTP MFA_SECRET = **** ACCOUNT_UUID = **** METER_NUMBER = *** SITE = coned MQTT_HOST = hassio.local MQTT_USER = mqtt_coned MQTT_PASS = ***** Starting endless loop.. [0205/020731.412693:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory DevTools listening on ws://127.0.0.1:38665/devtools/browser/1fad07bc-2613-4c8b-9245-94772b169bf0 [0205/020731.418566:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is disabled [0205/020731.732530:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory DevTools listening on ws://127.0.0.1:49477/devtools/browser/fb211e84-169e-4380-9b51-386eb9504250 [0205/020731.737000:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is disabled [0205/020733.339596:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0205/020733.341611:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0205/020733.359627:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0205/020733.360693:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0205/020733.420815:INFO:CONSOLE(21)] "ERR_DUP_SCRIPTS", source: https://www.glancecdn.net/cobrowse/CobrowseJS.ashx?group=19641&site=production (21) [0205/020733.445066:INFO:CONSOLE(21)] "ERR_DUP_SCRIPTS", source: https://www.glancecdn.net/cobrowse/CobrowseJS.ashx?group=19641&site=production (21) [0205/020734.006255:INFO:CONSOLE(11)] "Uncaught TypeError: Cannot read property 'split' of undefined", source: about:srcdoc (11) [0205/020734.124526:INFO:CONSOLE(5)] "SyntaxError: Unexpected token M in JSON at position 0 at JSON.parse () at N (https://asset.gomoxie.solutions/concierge/coned/client/storage_bridge.html:5:2823)", source: https://asset.gomoxie.solutions/concierge/coned/client/storage_bridge.html (5) [0205/020734.903200:INFO:CONSOLE(1)] "'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead.", source: https://siteintercept.qualtrics.com/dxjsmodule/CoreModule.js?Q_CLIENTVERSION=1.66.0&Q_CLIENTTYPE=web&Q_BRANDID=coned (1) [0205/020735.040961:INFO:CONSOLE(1)] "'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead.", source: https://siteintercept.qualtrics.com/dxjsmodule/CoreModule.js?Q_CLIENTVERSION=1.66.0&Q_CLIENTTYPE=web&Q_BRANDID=coned (1) [0205/020742.829462:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0205/020742.830042:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0205/020742.920394:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0205/020742.920611:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0205/020817.539480:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0205/020817.539687:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0205/020817.575388:INFO:CONSOLE(21)] "ERR_DUP_SCRIPTS", source: https://www.glancecdn.net/cobrowse/CobrowseJS.ashx?group=19641&site=production (21) [0205/020818.718596:INFO:CONSOLE(2)] "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.", source: https://acdn-prod-bsdce-ngcx-va.azureedge.net/va/coned-va-build.min.js (2) [0205/020819.596616:INFO:CONSOLE(5)] "SyntaxError: Unexpected token M in JSON at position 0 at JSON.parse () at N (https://asset.gomoxie.solutions/concierge/coned/client/storage_bridge.html:5:2823)", source: https://asset.gomoxie.solutions/concierge/coned/client/storage_bridge.html (5) [0205/020820.050404:INFO:CONSOLE(1)] "'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead.", source: https://siteintercept.qualtrics.com/dxjsmodule/CoreModule.js?Q_CLIENTVERSION=1.66.0&Q_CLIENTTYPE=web&Q_BRANDID=coned (1) [0205/020822.451557:INFO:CONSOLE(1)] "::-webkit-details-marker pseudo element selector is deprecated. Please use ::marker instead. See https://chromestatus.com/feature/6730096436051968 for more details.", source: https://nextweb-static.opower.com/maestro/themes/maestro-theme-cned/a28bf320b912c34566c4f558065c0db6/pages/apps/maestro-widget-library-core/index.generated.32.min.js (1) Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/coned/meter.py", line 99, in last_read for read in jsonResponse['reads']: KeyError: 'reads' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "run.py", line 18, in startTime, endTime, value, uom = asyncio.get_event_loop().run_until_complete(meter.last_read()) File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "/usr/local/lib/python3.7/dist-packages/coned/meter.py", line 114, in last_read raise MeterError("Error requesting meter data") coned.meter.MeterError: Error requesting meter data

HiTechTLS commented 2 years ago

Seems my UUID and meter number were off on that run, but that is now solved, as i managed to get at least 1 successful read...

The good

message: {'startTime': '2022-02-06T17:45:00-05:00', 'endTime': '2022-02-06T18:00:00-05:00', 'value': 0.225, 'uom': 'KWH'}

The bad

[0206/201020.174838:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

Traceback (most recent call last): File "run.py", line 26, in mqttc.connect(os.getenv("MQTT_HOST")) File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 914, in connect return self.reconnect() File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1044, in reconnect sock = self._create_socket_connection() File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source) File "/usr/lib/python3.7/socket.py", line 707, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

hindseb commented 2 years ago

hi,

I have the same error. Below is the entire error log.

Did anyone found out how to solve it?

File "/usr/local/lib/python3.7/dist-packages/pyppeteer/execution_context.py", line 238, in _rewriteError raise error File "/usr/local/lib/python3.7/dist-packages/pyppeteer/execution_context.py", line 105, in evaluateHandle 'userGesture': True, pyppeteer.errors.NetworkError: Protocol error Runtime.callFunctionOn: Target closed. Future exception was never retrieved future: <Future finished exception=NetworkError('Protocol error Target.sendMessageToTarget: Target closed.')> pyppeteer.errors.NetworkError: Protocol error Target.sendMessageToTarget: Target closed. [0211/214948.994720:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory DevTools listening on ws://127.0.0.1:32983/devtools/browser/437f06f0-2b90-4d4e-9b46-9807ab616782 [0211/214949.807123:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory DevTools listening on ws://127.0.0.1:43189/devtools/browser/19343542-d66f-48b3-831f-a696a9292224 [0211/214953.911520:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/214953.914098:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/214954.181830:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/214954.184022:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/214954.583643:INFO:CONSOLE(21)] "ERR_DUP_SCRIPTS", source: https://www.glancecdn.net/cobrowse/CobrowseJS.ashx?group=19641&site=production (21) [0211/214954.769221:INFO:CONSOLE(21)] "ERR_DUP_SCRIPTS", source: https://www.glancecdn.net/cobrowse/CobrowseJS.ashx?group=19641&site=production (21) [0211/214955.534816:INFO:CONSOLE(11)] "Uncaught TypeError: Cannot read property 'split' of undefined", source: about:srcdoc (11) [0211/214958.116125:INFO:CONSOLE(1)] "'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead.", source: https://siteintercept.qualtrics.com/dxjsmodule/CoreModule.js?Q_CLIENTVERSION=1.66.0&Q_CLIENTTYPE=web&Q_BRANDID=coned (1) [0211/214958.154452:INFO:CONSOLE(1)] "'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead.", source: https://siteintercept.qualtrics.com/dxjsmodule/CoreModule.js?Q_CLIENTVERSION=1.66.0&Q_CLIENTTYPE=web&Q_BRANDID=coned (1) [0211/215006.566386:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215006.567671:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215006.712626:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215006.713532:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215044.078547:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215044.084706:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215046.009191:INFO:CONSOLE(2)] "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.", source: https://acdn-prod-bsdce-ngcx-va.azureedge.net/va/coned-va-build.min.js (2) [0211/215050.735108:INFO:CONSOLE(21)] "ERR_DUP_SCRIPTS", source: https://www.glancecdn.net/cobrowse/CobrowseJS.ashx?group=19641&site=production (21) [0211/215054.153222:INFO:CONSOLE(1)] "'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead.", source: https://siteintercept.qualtrics.com/dxjsmodule/CoreModule.js?Q_CLIENTVERSION=1.66.0&Q_CLIENTTYPE=web&Q_BRANDID=coned (1) Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/coned/meter.py", line 99, in last_read for read in jsonResponse['reads']: KeyError: 'reads' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "run.py", line 18, in startTime, endTime, value, uom = asyncio.get_event_loop().run_until_complete(meter.last_read()) File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "/usr/local/lib/python3.7/dist-packages/coned/meter.py", line 114, in last_read raise MeterError("Error requesting meter data") coned.meter.MeterError: Error requesting meter data [0211/215609.818854:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory DevTools listening on ws://127.0.0.1:40095/devtools/browser/45ac083e-e4ac-45ae-bc41-ccef83306dbc [0211/215610.638352:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory DevTools listening on ws://127.0.0.1:43605/devtools/browser/f109d993-ad23-4f71-a442-2298827e77f7 [0211/215614.555092:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215614.557534:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215615.189377:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215615.189891:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215615.358642:INFO:CONSOLE(21)] "ERR_DUP_SCRIPTS", source: https://www.glancecdn.net/cobrowse/CobrowseJS.ashx?group=19641&site=production (21) [0211/215616.633855:INFO:CONSOLE(21)] "ERR_DUP_SCRIPTS", source: https://www.glancecdn.net/cobrowse/CobrowseJS.ashx?group=19641&site=production (21) [0211/215617.430845:INFO:CONSOLE(3)] "Uncaught (in promise) Error: Loading chunk 11 failed. (error: https://siteintercept.qualtrics.com/dxjsmodule/11.00f5dbb614ff0ba9bcba.chunk.js?Q_CLIENTVERSION=1.66.0&Q_CLIENTTYPE=web&Q_BRANDID=www.coned.com)", source: https://znetevwa2wlb6en9p-coned.siteintercept.qualtrics.com/WRSiteInterceptEngine/?Q_ZID=ZN_etEvWA2WLb6eN9P&Q_LOC=https%3A%2F%2Fwww.coned.com%2Fen%2Flogin&t=1644634577069 (3) [0211/215617.525617:INFO:CONSOLE(3)] "Uncaught (in promise) Error: Loading chunk 11 failed. (error: https://siteintercept.qualtrics.com/dxjsmodule/11.00f5dbb614ff0ba9bcba.chunk.js?Q_CLIENTVERSION=1.66.0&Q_CLIENTTYPE=web&Q_BRANDID=www.coned.com)", source: https://znetevwa2wlb6en9p-coned.siteintercept.qualtrics.com/WRSiteInterceptEngine/?Q_ZID=ZN_etEvWA2WLb6eN9P&Q_LOC=https%3A%2F%2Fwww.coned.com%2Fen%2Flogin&t=1644634577241 (3) [0211/215632.585665:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215632.587826:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215633.193773:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215633.196861:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215709.326131:INFO:CONSOLE(2)] "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.", source: https://acdn-prod-bsdce-ngcx-va.azureedge.net/va/coned-va-build.min.js (2) [0211/215713.909524:INFO:CONSOLE(41)] "Unrecognized feature: 'attribution-reporting'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215713.911843:INFO:CONSOLE(41)] "Unrecognized feature: 'conversion-measurement'.", source: https://www.googletagmanager.com/gtm.js?id=GTM-PK7RZ5 (41) [0211/215715.632424:INFO:CONSOLE(21)] "ERR_DUP_SCRIPTS", source: https://www.glancecdn.net/cobrowse/CobrowseJS.ashx?group=19641&site=production (21) [0211/215716.222974:INFO:CONSOLE(3)] "Uncaught (in promise) Error: Loading chunk 11 failed. (error: https://siteintercept.qualtrics.com/dxjsmodule/11.00f5dbb614ff0ba9bcba.chunk.js?Q_CLIENTVERSION=1.66.0&Q_CLIENTTYPE=web&Q_BRANDID=www.coned.com)", source: https://znetevwa2wlb6en9p-coned.siteintercept.qualtrics.com/WRSiteInterceptEngine/?Q_ZID=ZN_etEvWA2WLb6eN9P&Q_LOC=https%3A%2F%2Fwww.coned.com%2Fen%2Faccounts-billing%2Fdashboard&t=1644634635938 (3) Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/coned/meter.py", line 99, in last_read for read in jsonResponse['reads']: KeyError: 'reads' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "run.py", line 18, in startTime, endTime, value, uom = asyncio.get_event_loop().run_until_complete(meter.last_read()) File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "/usr/local/lib/python3.7/dist-packages/coned/meter.py", line 114, in last_read raise MeterError("Error requesting meter data") coned.meter.MeterError: Error requesting meter data Task exception was never retrieved future: <Task finished coro=<Meter.browse() done, defined at /usr/local/lib/python3.7/dist-packages/coned/meter.py:116> exception=NetworkError('Protocol error Target.createTarget: Target closed.')> Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/coned/meter.py", line 160, in browse api_page = await browser.newPage() File "/usr/local/lib/python3.7/dist-packages/pyppeteer/browser.py", line 202, in newPage return await self._defaultContext.newPage() File "/usr/local/lib/python3.7/dist-packages/pyppeteer/browser.py", line 358, in newPage return await self._browser._createPageInContext(self._id) File "/usr/local/lib/python3.7/dist-packages/pyppeteer/browser.py", line 210, in _createPageInContext 'Target.createTarget', options)).get('targetId') pyppeteer.errors.NetworkError: Protocol error Target.createTarget: Target closed.