npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-awattar

v1.5.0

Published

Plugin exposes virtual (switch, light, presence, temperature) accessories and enables HomeKit automation by Nordpool electricity pricing in supported countries.

Downloads

141

Readme

homebridge-aWATTar Austria

NPM Version NPM Downloads NPM License donate

If your electricity is billed based on hourly rates through a smart meter, this plugin enables you to automate power-intensive appliances in accordance with aWATTar pricing levels. For example, this could apply to:

  • Car charging
  • House heating or cooling devices
  • Power-wall (to balance electricity costs)
  • Washer-dryer
  • Water heater (a.k.a boiler)

Currently, this plugin supports the following aWATTar electricity market areas:

  • Austria

How To Install

First, complete the Homebridge setup. Next, install the homebridge-nordpool-baltics plugin by using the Homebridge Plugins Manager.

Available Accessories

Plugin exposes the below described 'virtual' accessories:

  1. hourlyTickerSwitch: A switch that cycles ON and OFF every hour. Use it in 'An Accessory is Controlled' event on HomeKit automation. Then check for desired price/levels further on automation logic;

  2. currentPrice: A Light Sensor representing the current hour's electricity price in Euro cents (1 LUX = 1 cent). Due to HomeKit limitation, the minimal value is 0.0001, even if the actual price is 0 or negative.

  3. cheapestHour: Motion Sensor goes into 'motion detected' state if current hour electricity price ranks cheapest in the day. There can be more than one cheapest hours in the event of repeated same-price occurrences;

  4. cheapest4Hours to cheapest12Hours (optional on Plugin Config): A series of Motion Sensors which trigger a 'motion detected' state when the current hour's electricity price ranks among the cheapest of the day. The count can exceed the specified number in the event of repeated same-price occurrences;

  5. cheapest5HoursConsec (optional on Plugin Config): This Motion Sensor triggers during the 5 consecutive lowest-priced electricity hours ensuring energy-intensive appliances can operate uninterrupted for a stretch of 5 hours. Note more details about its calculation below.

  6. priciestHour: This Motion Sensor triggers 'motion detected' when the following conditions are met:

    • Current hour price is most expensive of the day;
    • OR current hour price is within 10% difference from most expensive hour;
    • OR current hour price exceeds configured 'Excessive Price Margin Above Median' value (default 200%);
    • AND all of above exceeds configured 'Minimum Price Threshold for Priciest Hour(s)' value (default 0).
  7. currentHour (optional on Plugin Config): Temperature sensor (possible values 0-23) denoting current hour of the day (24h format). Eliminates 'current hour' scripting needed on HomeKit rules.

HomeKit Automation Examples

Here are a few automation examples, based on real-life use cases. Please note, the names of the accessories from the homebridge-aWATTar plugin have been renamed to improve readability.

| Water heater | Floor heater | Car charging | | --------- | --------- | --------- | | Boiler1 | Floor1 | Car1 | | Boiler2 | Floor2 | Car2 |

Have you devised an ingenious automation making the most out of this plugin? Don't keep it to yourself - share it using this form!

Cheapest Consecutive Hours Calculation Logic

Motion sensor cheapest5HoursConsec calculation logic is the following:

If 'Dynamic Cheapest Consecutive Hours' is Disabled in Plugin Config

  • At 00:00 (midnight): Recalculated using the pricing information of the new day.

If 'Dynamic Cheapest Consecutive Hours' is Enabled in Plugin Config

  • At 18:00 (6PM): If the cheapest 5 consecutive hours occurs later in the evening, the computation includes 0AM-6AM period from the next day. This could potentially shift the 5-hour period of cheapest price from the evening to the next day's early morning, aiming for maximum cost efficiency.

  • At 00:00 (midnight): If the 6PM run did not result in a shift, it will recalculate as normal using the pricing information of the new day.

  • At 07:00 (7AM): If the 6PM run shifted the 5-hour period, a recalculation happens considering the remaining pricing information of the current day.

If You Own Solar Power Plant

If you own solar power plant and it covers all of your household needs during specific daytime hours in month of June then configure the plugin accordingly.

Configure your solar plant latitude (locator here). Then plugin will apply automatic calculation of best solar yield hours in the months of March-September (inclusive). During best solar yield hours Nordpool price is overridden to 0.

Important Remark About Timezones

For accurate hour-to-price matching, it's important that the timezone of your homebridge system (the host) aligns with the timezone of the chosen Nordpool area. If there is a mismatch, the plugin will emit a warning in the log.

Additionally, please verify that your system's clock is regularly synchronized to ensure consistent and accurate hour-to-price ticking.

If You need support with yourHomeKit Automation

If You need support with yourHomeKit Automation we are happy to make you an offer based on time expenditure.

Herbert Unterberger

thx to Mantas Segzda