markizano / smartmetertx

Poll, store, visualize data from https://www.smartmetertexas.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Original Class Object

https://github.com/cmulk/python_smartmetertx

python-smartmetertx

SmartMeterTX/SmartMeter Texas Python class provides a JSON interface to the electricity usage data available at https://www.smartmetertexas.com. You must have an account established at the site.

Additions done by @Markizano to support updates since JAN 2024. API seems to be the same.

More details can be found: https://github.com/mrand/smart_meter_texas

Depends on a MongoDB server to be running in the environment of sorts.

Will have to later build support for sqlite3 for local DB setup installs that require no further software than this package.

More documentation in doc.

Notable files below:

bin/fetchMeterReads.cron.py

Run this on a CRON to collect meter reads at least once a day to store data offline from the SmartMeterTexas.com site.

bin/smtx-server.py

Run this to start up the local server. Configure with ~/.config/smartmetertx/config.yml. Starts on port 7689 by default.

Passwords are encrypted using gpg. You can store the PGP armored message block in your configuration file and this app will attempt to decrypt using your key (pending you manage the password/key/chain requirements beyond this app).

Encrypt the password using:

$ echo -en "my-secret-password" | gpg -aer 0x0000

Where 0x0000 is the key you want to use for this encryption. In this way, sensitive credentials are not stored in plain text in files.

Loads a simple web page that can be used to visualize the data you want.

Extend as you please from here :)

Screenshots

smtx-sample-page

References

About

Poll, store, visualize data from https://www.smartmetertexas.com/


Languages

Language:Python 70.2%Language:JavaScript 20.9%Language:HTML 4.2%Language:CSS 2.3%Language:Dockerfile 1.9%Language:Makefile 0.5%