Giter Site home page Giter Site logo

home-assistant-niu-component's Introduction

Update

增加了对**大陆小牛服务器(https://account.niu.com) 及其 endpoint 的支持

Added support for China NIU Server (https://account.niu.com) and Endpoints

niu

This is a custom component for Home Assistant to integrate your Niu Scooter.

Install

You can install this custom component by adding this repository (https://github.com/marcelwestrahome/home-assistant-niu-component) to HACS in the settings menu of HACS first. You will find the custom component in the integration menu afterwards, look for 'Niu Scooter Integration'. Alternatively, you can install it manually by copying the custom_components folder to your Home Assistant configuration folder.

Setup

# configuration.yaml

sensor:
  - platform: niu
    username: [email protected]
    password: mysecretpassword
    scooter_id: 0
    monitored_variables:
      - BatteryCharge          # Battery
      - Isconnected            # Battery
      - TimesCharged           # Battery
      - temperatureDesc        # Battery
      - Temperature            # Battery
      - BatteryGrade           # Battery
      - CurrentSpeed           # Moto
      - ScooterConnected       # Moto (has attributes lon. lat. for plotting on a map)
      - IsCharging             # Moto
      - IsLocked               # Moto
      - TimeLeft               # Moto
      - EstimatedMileage       # Moto
      - centreCtrlBatt         # Moto
      - HDOP                   # Moto
      - Longitude              # Moto
      - Latitude               # Moto
      - totalMileage           # OverAll
      - DaysInUse              # OverAll
      - Distance               # Distance
      - RidingTime             # Distance
      - LastTrackStartTime     # LastTrack
      - LastTrackEndTime       # LastTrack
      - LastTrackDistance      # LastTrack
      - LastTrackAverageSpeed  # LastTrack
      - LastTrackRidingtime    # LastTrack
      - LastTrackThumb         # LastTrack

Configuration variables:

  • username (Required): EMail address or mobile phone number or username.
  • password (Required): Niu Account password.
  • country (Required): Telephone country count without leading zeros or + sign, e.g. 49 instead of 0049 or +49.
  • scooter_id (Optional): The scooter_id to monitor. Defaults to 0.

If you own multiple scooters just add the niu sensor platform multiple times and increase the scooter_id.

Known bugs

At this moment the NIU sport plus has a bug, at least this type scooter stops after a certain time updating. When this happen, component will show the last updated values. With a restart of your your HA, you need to turn on your scooter for a short time to see all sensor values. Niu promises to solve this issue with a new firmware.

The known bug that's causing the updates to stop is fixed by Niu in the scooters firmware v3 (TRA01E18). This update has to be manually installed at an authorized dealer (so no automagical OTA install). @rmettes reported this firmware as stable.

I recieved new firmware for my scooter (TRA01E23). component will alsways show the new updated data.

Component works also for KQ13, however this has only a bluetooth interface, so your need to be connected (not all sensors are working)

Roadmap

Some day this component shall become an official HA integration. Until then just use this custom component.

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.