Giter Site home page Giter Site logo

runbert / homebridge-tibber-lightsensor Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 21 KB

A homebridge plugin to display the current consumption from your Tibber pulse as lux in Home kit.

License: ISC License

JavaScript 100.00%
tibber tibberpulse homebridge

homebridge-tibber-lightsensor's Introduction

npm Try homebridge-tibber-lightsensor on RunKit

homebridge-tibber-lightsensor

Tibber lightsensor is a plugin for Homebridge which makes it possible to see your real time power consumption from Tibber in iOS/Homekit without the need to install a third party app!

๐Ÿ’ก The plugin fetches the current watt usage from your Tibber Pulse and displays it as a lightsensor (lux) in Homekit. Using a built in timer, it can update the Home app UI with a new value as often as you'd like. For instance 10 Watt from Tibber API is displayed as 10 lux in Home app.

โค๏ธ This wouldn't be possible without Tibber and their great open API.

Screenshots

iOS Home App

Homebridge Config UI X

Prerequisites

You need to have a Tibber Pulse. You can buy them from their online store:

https://tibber.com/se/store/produkt/pulse-p1

You will also need two API tokens from Tibber. One personal token, and your house id. Get them at:

https://developer.tibber.com/

Installation

This plugin is published on npm and can be installed through Config UI X / Plugins.

If you're running an old version of homebrdige or don't have Config UI X installed, you can install it manually using:

npm install -g homebridge-tibber-lightsensor

Configuration

You need to create API tokens in Tibbers developer portal. Go to https://developer.tibber.com/ using your Tibber account and Generate an Access Token. You then need to go to API Explorer https://developer.tibber.com/explorer, load your personal token and get your unique house ID under Real time subscription.

You can now add these values to your homebridge config.json like the example below:

{
    "bridge": {
        "name": "Homebridge",
        "username": "B1:12:EF:70:12:42",
        "port": 50611,
        "pin": "012-34-123"
    },
    "accessories": [
        {
            "accessory": "TibberLightSensor",
            "name": "Tibber consumption (Watt)",
            "pullInterval": "1000",
            "apiToken": "ad3ef1ffLvGbgLAbT1Yc12CaoBkLGoL0LFaHAZiAYiA",
            "apiHomeId": "2ff12a12-3ff1-122d-12f1-f111f1212f8e"
        }
    ],
...

The pullInterval is how often the lightsensor should be updated with a new value in ms. In our example above it is set to 1 second (1000 ms).

Restart homebridge, and you should now see a lightsensor accessory in one of your rooms displaying real time data from Tibber.

homebridge-tibber-lightsensor's People

Contributors

runbert avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

homebridge-tibber-lightsensor's Issues

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.