Control a water heater and ground source heat pump based on cheap hours of spot priced electricity

Ta-daa, I now had the time to publish the new version as a npm package. Fully updated documentation and usage instructions are documented at:

Some notes for the users of the earlier solution:

  • The basic concept is still the same i.e. there are control point Item for each device and then a separate Item which actually toggles the device ON/OFF (or to any other state)
  • The documentation instructions of the new version harmonize the naming conventions for these Items. If (most probably when) you want to keep using your existing data, pay attention to the Item names. For example, the instructions in the wiki use the name SpotPrice whereas it was spot_price in the earlier versions of the instructions. You can use the new solution, just replace SpotPrice with spot_price (or whatever is your existing item name.
  • The new solution is completely re-written to use js-joda date and time handling, there is 0 places left that use the shitty vanilla javascript date and time functions. If you want to tweak the scripts to work for your use cases, here are two excellent resources: JavaScript Scripting - Automation | openHAB and Working with Date Times in JS Scripting (ECMAScript 11)
  • The earlier “heating slice” concept is no longer available, I replaced it with PeakPeriodOptimizer which is simpler and is working much better at least in our house.

I will update the comment #13 (marked as solution) so that I’ll remove the files and rule snippets and link to the wiki documentation instead.

Happy optimizations to everybody and many thanks for the cheers so far!

4 Likes