Coder Social home page Coder Social logo

thomaswilla / ha-sensor.owlet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jlamendo/ha-sensor.owlet

0.0 0.0 0.0 35 KB

Owlet Smart Sock v2/v3 Sensor Integration for HomeAssistant using the modern Owlet API.

License: MIT License

Python 100.00%

ha-sensor.owlet's Introduction

ha-sensor.owlet

Owlet Smart Sock v2/v3 Sensor Integration for HomeAssistant using the modern Owlet API.

Credit for getting the new API to work goes to @mbevand for their work in https://github.com/mbevand/owlet_monitor/blob/master/owlet_monitor, which I borrowed from heavily while writing this.

Installation:

Manual Install:

Clone this repository, and move the ha-sensor.owlet/custom_components/owlet directory into your "custom_components" directory on homeassistant.

and add the sensor configuration into your configuration.yml.

HACS Install:

Add this repository as a custom repository in HACS under the type "integration."

Both:

After installing the integration, you need to enable it by adding the sensor configuration into your configuration.yml - example:

sensor:
  - platform: owlet
    username: "owlet_api_email"
    password: !secret owlet_password
    region: "world"

And if you want to have individual sensor values for the attributes, e.g. for graphing in grafana via prometheus, you can use value_templates:

- platform: template
  sensors:
    owlet_heart_rate:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.heart_rate}}"
      unit_of_measurement: BPM
    owlet_spo2:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.oxygen_saturation}}"
      unit_of_measurement: SPO2
    owlet_movement:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.movement}}"
      unit_of_measurement: '%'
    owlet_battery:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.battery}}"
      unit_of_measurement: '%'
    owlet_rssi:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.ble_rssi}}"
      unit_of_measurement: dBm
    owlet_monitoring_status:
      value_template: "{{states.sensor.owlet_smart_sock_[YOUR_SMART_SOCK_SERIAL_NUMBER].attributes.ble_rssi}}"
      unit_of_measurement: dBm

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.