Giter Club home page Giter Club logo

ha-smartmetertexas's Introduction

Node-Red Implementation of the Smart Meter Texas API

Access your current meter reading from the Smart Meter Texas API! The Node-Red flow requests a meter read every hour and reports the results over MQTT or to a Home Assistant entity. There is also a package for Home Assistant providing a number of useful sensors for use in your instance, if you wish not to use the native Energy Dashboard.


Prerequisites:

  • An electric meter enrolled with Smart Meter Texas
  • Your Smart Meter Texas Username, Password, ESIID, and Meter Number
  • An MQTT Server (Optional if using integration below)
  • Home Assistant Node-Red Companion Integration (Optional if using MQTT)
  • Node-Red and the following additional nodes:
    • node-red-contrib-https
    • node-red-contrib-credentials
    • node-red-contrib-home-assistant-websocket (only needed for those who want direct home assistant integration rather than MQTT)

Installation:

  1. Make sure your system meets the above prerequisites.
  2. Import the Smart Meter Texas **.json file into your Node-Red instance. You only need one or the other, not both.
  3. If you are using MQTT and Home Assistant (not integration), place the smartmetertexas.yaml file in your config/packages directory, or copy the sensor configuration lines in the file to your main configuration file. More information of using packages can be found HERE.

NOTE: To use the native Energy Dashboard, you only need to add the mqtt sensor to your configuration and nothing else. If you wish to have your own utility meter entities, then copy the rest of the entities along with the mqtt sensor.

  1. Continue with configuration!

Configuration:

  1. Open the imported Node-Red flow and open the Credentials node. You will need to fill in your Smart Meter Texas Username, Password, ESIID, and Meter Number. Optionally, you can change the minute when the meter will be polled every hour in the respective cron job nodes. It is advised to have the authentication cron run BEFORE the request read cron. Click Done when you are finished.
  2. MQTT Users: Open the MQTT: Send Reading node and configure your MQTT server information.
  3. Node-Red Companion Integ. Users: Open the SMT Current Reading node and set your home assistant instance.
  4. When you are finished configuring the nodes, click the Deploy button to start the flow with your new configuration. 5.(Optional): If you are using the optional Home Assistant sensors package, and do not wish to use the native Energy Dashboard, set your electricity cost in the entity input_number.smt_energy_cost.

Usage:

The Node-Red flow will request a meter read at 30 minute intervals since the last successful read. It will then request the results of the meter read every 30 seconds until they are available. The current meter reading is reported over MQTT with the topic smt/reading or to the configured Home Assistant entity.

Note that the API limits each ESIID to two reads per hour and 24 reads per day. The limit is based on the time when the reading is successfully retrieved from the meter. Increasing the frequency of reads will result in an error until the hour or day resets (depending on the error).


Thanks: This code would not be possible without the previous work by keatontaylor.


Disclaimer: This information is not provided by, nor endorsed by Smart Meter Texas. As this API is unpublished, it could break at any time.

ha-smartmetertexas's People

Contributors

indianb0y016 avatar stmrocket avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ha-smartmetertexas's Issues

Dictionary Error

expected a dictionary for dictionary value @ data['packages']['sensor']

Config:

homeassistant:
customize: !include customize.yaml
packages: !include_dir_merge_named packages

smartmetertexas.yaml is in config directory/packages/smartmetertexas/smartmetertexas.yaml

Can't figure out what is causing the error

No readings Returned

Making new issue as well as commenting on old similar issue..

It appears this could be happening again... Last data it grabbed was on Nov. 11 at 11:50pm... Nothing since then.

Getting an "ECONNRESET" error on the "Log In" node and "Request Read" Node.

Running HA 2022.11.2 through virtual machine.

No Readings are Returned

As of this morning, no meter readings have been returned from the flow. Upon monitoring the debug endpoints, the authentication process executes correctly, but the read meter request is returning an error to try again later.

This is likely a server problem that will self resolve, but may indicate that endpoints have changed and will need updating.

Surplus Generation

This flow has been working great for us, but we recently installed solar and the surplus generation is not being netted with with consumption.

Ideally I would want to have the consumption and surplus generation as separate sensors. That would allow me to do some analysis on my end that would be useful. I do have access to total generation from my solar integration already.

I am hopeful that there is an API for the surplus generation, but that is beyond my current skill set.

Remove Daily Usage Reference in Readme

Since the usage field from the meter is not fully understood, it is not implemented in the Node-Red flow. It is still mentioned in the documentation, though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.