I’m getting the same errors in my log after “Starting endless loop…” Anyone solve this yet? Thanks!
I was able to get this to work today with ConEd (Brooklyn), thanks for the tips!!
edit: there’s a time delay in the data that seems not to work so well with HA’s energy monitoring, which expects live data. A friend of mine setup a project that does a similar thing but just to store the data in a MySQL instance and then you can graph it via Grafana or something similar: GitHub - mhoran/coned-rtu: Getting real-time usage reports from Con Edison
Thanks, I’ll check that project out. I have bvlaicu’s working well, but I want to grab the gas usage as well (even though it is delayed.)
Was also able to get this working via bvlaicu’s integration. Was anyone able to get live costing ($/kWh) data in as well or just going with a flat rate?
Can folks who got this working share their logs? I would like to see what went wrong in my config. It’s been a year of this not working.
Params:
EMAIL = ******@*********.com
PASSWORD = *******************
MFA_TYPE = TOTP
MFA_SECRET = ****************
ACCOUNT_UUID = ********-****-****-****-************
METER_NUMBER = ********
ACCOUNT_NUMBER = **-****-****-****-*
SITE = coned
MQTT_HOST = hassio.local
MQTT_USER = *****
MQTT_PASS = bin boot data dev etc home lib media mnt opt proc requirements.txt root run run.py run.sh sbin share srv ssl sys tmp usr var
Packages list:
Package Version
------------------ ---------
appdirs 1.4.4
asn1crypto 0.24.0
certifi 2022.12.7
charset-normalizer 2.1.1
coned 0.4.0
cryptography 2.6.1
entrypoints 0.3
idna 3.4
importlib-metadata 5.2.0
keyring 17.1.1
keyrings.alt 3.1.1
paho-mqtt 1.6.1
pip 18.1
pycrypto 2.6.1
pyee 8.2.2
PyGObject 3.30.4
pyotp 2.8.0
pyppeteer 1.0.2
pyxdg 0.25
requests 2.28.1
SecretStorage 2.3.1
setuptools 40.8.0
six 1.12.0
tqdm 4.64.1
typing-extensions 4.4.0
urllib3 1.26.13
websockets 10.4
wheel 0.32.3
zipp 3.11.0
Starting endless loop..
[0105/084820.989495: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:45021/devtools/browser/7a4d1840-a178-41ec-a1c4-7b212eccaafc
[0105/084822.904118: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:43373/devtools/browser/3d2941b4-676b-4db1-847a-2a315513a0c9
[0105/084835.010548:INFO:CONSOLE(24)] "ERR_DUP_SCRIPTS", source: https://www.glancecdn.net/cobrowse/CobrowseJS.ashx?group=19641&site=production (24)
[0105/084837.948702:INFO:CONSOLE(24)] "ERR_DUP_SCRIPTS", source: https://www.glancecdn.net/cobrowse/CobrowseJS.ashx?group=19641&site=production (24)
[0105/084841.594125:INFO:CONSOLE(3)] "Uncaught (in promise) Error: Loading chunk 13 failed.
(error: https://siteintercept.qualtrics.com/dxjsmodule/13.7ca37fd749ece40e6b66.chunk.js?Q_CLIENTVERSION=1.82.1&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=1672926520062 (3)
[0105/084841.897410:INFO:CONSOLE(3)] "Uncaught (in promise) Error: Loading chunk 13 failed.
(error: https://siteintercept.qualtrics.com/dxjsmodule/13.7ca37fd749ece40e6b66.chunk.js?Q_CLIENTVERSION=1.82.1&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=1672926521405 (3)
[0105/084917.685534: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)
[0105/084923.803035:INFO:CONSOLE(24)] "ERR_DUP_SCRIPTS", source: https://www.glancecdn.net/cobrowse/CobrowseJS.ashx?group=19641&site=production (24)
[0105/084925.942613:INFO:CONSOLE(24)] "[Meta Pixel] - Removed URL query parameters due to potential violations.", source: https://connect.facebook.net/en_US/fbevents.js (24)
[0105/084926.881198:INFO:CONSOLE(3)] "Uncaught (in promise) Error: Loading chunk 13 failed.
(error: https://siteintercept.qualtrics.com/dxjsmodule/13.7ca37fd749ece40e6b66.chunk.js?Q_CLIENTVERSION=1.82.1&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%2Fmy-account%3Faccount%3D63-3066-2265-1103-4&t=1672926566587 (3)
Creating Meter
Calling meter.last_read()..
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/coned/meter.py", line 96, in all_reads
await self.browse()
File "/usr/local/lib/python3.7/dist-packages/coned/meter.py", line 225, in browse
self._LOGGER.debug(f"raw_data = {raw_data}")
NameError: name 'raw_data' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run.py", line 28, in <module>
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 127, in last_read
all_available_reads = await self.all_reads()
File "/usr/local/lib/python3.7/dist-packages/coned/meter.py", line 123, in all_reads
raise MeterError("Error requesting meter data")
coned.meter.MeterError: Error requesting meter data
Task was destroyed but it is pending!
task: <Task pending coro=<sleep() running at /usr/lib/python3.7/asyncio/tasks.py:568> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7fa729b5e8>()]> cb=[<TaskWakeupMethWrapper object at 0x7fa729bcd8>()]>
Task was destroyed but it is pending!
task: <Task pending coro=<Meter.browse() running at /usr/local/lib/python3.7/dist-packages/coned/meter.py:206> wait_for=<Task pending coro=<sleep() done, defined at /usr/lib/python3.7/asyncio/tasks.py:555> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7fa729b5e8>()]> cb=[<TaskWakeupMethWrapper object at 0x7fa729bcd8>()]>>
Sleeping 5 mins..
Has anyone validated the accuracy of the data?
It appeared to work for me too, but if you compare it to the ConEd app/website, it is way under.
I believe it misses one or more updates per hour, so I had to stop using it.
From what I remember, ConEd has the data per 15 minute increments and I think that add-on would error out sometimes and not retry, so it misses some data.
I have the same experience. In my case, it is maybe ~1 out of 8 times successful downloading the reading from ConEd. I also raised an issue here: Inconsistant meter reading · Issue #14 · bvlaicu/coned · GitHub. But no update yet.
Hi. Another ConEd customer here. How did you power the EM itself? My breaker box is behind a panel in the kitchen, so not conducive (conductive?) to running a power cord to it. Obviously lots of 110 is in the breaker box, but hardwiring it for power supply likely isn’t up to code. I’d welcome any recommendations. Thanks.
I wired it directly to the panel, basically hot/black went to one of the breakers and white/neutral was connected to the neutral bus (the strip on the side that has all the neutrals connected to it).
This may not be 100% accurate from my understanding since you are only getting voltage from one phase but I found that there aren’t that many fluctuations and for the most part it is pretty close.
Thanks or the suggestion
Hey mate, any guidance on how you were able to set this up successfully?
You appear to be one of few who have.
I’m stuck with this error (similar to others): Setting up Oru for first time - errors · Issue #32 · bvlaicu/home-assistant-addons · GitHub
I’m not familiar with mqtt, so there might be where I’ve tripped up!
Hey sorry for late response. I stopped using that integration as soon I setup because I found it unreliable.
I ended up buying an emporia device and flashing it. works great. if you don’t want to flash, there is a hacs integration for the cloud api.
prior to that I had to edit the code to get the coned integration working for me but it was not reliable as mentioned above. bummer because I wanted to get my gas data too. will need to write my own scraping project for that…
A few other Opower utilities got some love in 2023.8.
Hopefully this will increase interest in figuring out how to get stable tokens for Con Ed. I can get the Opower python code (which powers the new integration) to work with Con Ed if I add the right opower identifier, hardcode a token from my browser and run the sample code.
Has anyone found a good way to authenticate, other than puppeteer like in GitHub - bvlaicu/coned: Utility to interact with a ConEdison smart energy meter?
wow great! does that mean we’ll get official ConEd integration finally?
There’s a lot happening with opower right now. It looks like it will be 2023.9 before the ConEd bits will be folded into Home Assistant:
- A ConEd implementation for the opower module got merged by opower 0.0.24 - Add implementation for conEdison by Sebmaster · Pull Request #13 · tronikos/opower · GitHub
- ConEd requires MFA, so the hass integration needs to be updated for that: Add support for MFA auth in opower by Sebmaster · Pull Request #97878 · home-assistant/core · GitHub
- (there were other fixes that I believe got merged in by hass 2023.8.2.)
I’ve been testing the ConEd opower integration with mixed results, which might be somewhat due to having a more complex ConEd account than most. I’ve gotten my historical data for electric and gas into Home Assistant along with recent hourly data.
There is also a pending feature to add the near realtime data that ConEd has to opower - Feature Request: Implement near-realtime energy consumption · Issue #24 · tronikos/opower · GitHub
There are also some changes about the read bucket size. I’m not sure if they will matter for ConEd. Right now it seems to be working with hourly resolution. ConEd seems to make 15 minute buckets available, though possibly only in the near realtime.
For me the first steps for trying this out and getting working were:
- Getting my ConEd account switched over to time-based one time passwords (TOTP) using Google Auth. (I had to call ConEd because switching through the web UI was running into an error).
- NOTE: save your TOTP secret when you set the account up, or you’ll need to go through a decoder to export it from Google Auth or whatever TOTP tool you use.
- Pulling down the python module opower >= 0.0.24 and running
src/demo.py
to test and experiment.
Using demo.py
I’m able to download hourly, daily, etc. with the TOTP stuff working nicely. Although I do run into a fatal exception on one of my accounts.
If you don’t want to wait for 2023.9, you can install the pending PR via this HACS repo: GitHub - alandtse/pr_custom_component: Create a custom component from a Home Assistant Integration Pull Request. Use this when you want to test a pull request that changes a built in integration.
Input the PR when setting it up: Add support for MFA auth in opower by Sebmaster · Pull Request #97878 · home-assistant/core · GitHub
You need to be on at least 2023.8.2. Be sure to restart before adding the opower integration.
Looks like there still are some issues to be resolved, but you’ll be able to confirm it is connecting to your account and see what it is pulling in.
Thank you for sharing this, I was able to install it as a custom component but unfortunately I can’t sign in because ConEd won’t let me change the authentication type from MFA secret to TOTP unless I call them and they’re not available on weekends. Hopefully I can do it on Monday.
Edit: I was able to switch to TOTP from my iPhone’s Safari. I didn’t need to call ConEd. Looks like it’s working