Monitoring Wholesale Electricity Prices (Griddy)

Monitoring Wholesale Electricity Prices (Griddy)

I utilize Griddy as my electricity provider. Griddy provides electricity at wholesale prices, which can fluctuate rapidly and can sometimes spike to uncomfortable levels. Because of this, I wanted my home automation to turn off appliances and turn up thermostats whenever the price gets high. Unfortunately, Griddy does not offer an API which reports real time pricing.

However, the Electric Reliability Council of Texas (ERCOT) reports wholesale pricing approximately every 5 minutes via a web page. So I am using node-red to scrape the ERCOT web page, retrieve the value of interest, and update an openHAB item. After that I use a combination of node-red flows and DSL rules to respond accordingly.

This is pretty simple and could be used to pull almost any value from a web page for use in openHAB. Cheers.

[{"id":"ca06193f.f718e8","type":"inject","z":"7edf9712.203f28","name":"every minute","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":false,"onceDelay":"","x":100,"y":600,"wires":[["e84e62ce.51461"]]},{"id":"e84e62ce.51461","type":"http request","z":"7edf9712.203f28","name":"retrieve ERCOT page","method":"GET","ret":"txt","paytoqs":false,"url":"http://www.ercot.com/content/cdr/html/hb_lz","tls":"","persist":false,"proxy":"","authType":"","x":360,"y":600,"wires":[["450f03e7.42b6bc"]]},{"id":"5e02d8f9.376148","type":"debug","z":"7edf9712.203f28","name":"ERCOT msg","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":670,"y":480,"wires":[]},{"id":"450f03e7.42b6bc","type":"html","z":"7edf9712.203f28","name":"extract LZ_NORTH","property":"payload","outproperty":"payload","tag":"body > div > table > tbody > tr:nth-child(14) > td:nth-child(4)","ret":"text","as":"multi","x":190,"y":480,"wires":[["5e02d8f9.376148","d8a9b6b7.f76eb8"]]},{"id":"d8a9b6b7.f76eb8","type":"calculator","z":"7edf9712.203f28","name":"Divide by 10","inputMsgField":"payload","outputMsgField":"payload","operation":"div","constant":"10","x":430,"y":520,"wires":[["5e02d8f9.376148","1d128b96.dbcb34"]]},{"id":"1d128b96.dbcb34","type":"openhab2-out","z":"7edf9712.203f28","name":"openHAB ElectricityPricePerKilowattHour","controller":"e5a0a22f.dbe7e","itemname":"ElectricityPricePerKilowattHour","topic":"ItemUpdate","payload":"","x":740,"y":600,"wires":[[]]},{"id":"e5a0a22f.dbe7e","type":"openhab2-controller","z":"","name":"mango","protocol":"http","host":"localhost","port":"8080","path":"","username":"","password":""}]
2 Likes