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. There is also a package for Home Assistant providing a number of useful sensors for use in your home.
- An electric meter enrolled with Smart Meter Texas
- Your Smart Meter Texas Username, Password, ESIID, and Meter Number
- An MQTT Server
- Node-Red and the following additional nodes:
- node-red-contrib-config
- node-red-contrib-https
- node-red-contrib-credentials
- Make sure your system meets the above prerequisites.
- Import the smart_meter_texas.json file into your Node-Red instance.
- If you are using Home Assistant, place the smartmetertexas.yaml file in your config/packages directory. More information of using packages can be found HERE.
- Continue with configuration!
- 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 Configuration node. Click Done when you are finished.
- Open the MQTT: Send Reading node and configure your MQTT server information.
- When you are finished configuring the nodes, click the Deploy button to start the flow with your new configuration.
- If you are using the Home Assistant package, set your electricity cost in the entity input_number.smt_energy_cost.
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.
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.