Code Monkey home page Code Monkey logo

fitbit-homeassistant's Introduction

Fitbit Homeassistant

languages platform version FitbitBuild Actions Status CodeQL Actions Status Github All Releases

Description

This app allows to control Home Assistant entities from a Fitbit watch via the HomeAssistantAPI module .

Supported languages: de-DE, en-US, it-IT.

Supported entity types:

Action Entities
on / off switch, light, group
open / close cover
execute automation, script, button

App icon is from https://icon-icons.com/de/symbol/home-assistant/138491 (Apache License, Version 2.0).

Requirements

  • Home Assistant needs to be accessible via HTTPS or local network (via IP address) due to Fetch API limitations.
  • The RESTful API needs to be enabled in Home Assistant.
  • A Home Assistant Long-Lived Access Token, described in Authentication.

Settings

  • Home Assistant URL (text)
  • Port number (text)
  • Long-Lived Access Token (text)
  • List of up to 10 entities (text)
  • Force status (toggle)

Entities should be added by ID and not by name!

Force status schould be used in case of HA responds with an empty JSON object on POST messages!

Screenshots

App

How to build

Clone the repository

git clone [email protected]:smirko-dev/fitbit-homeassistant.git
cd fitbit-homeassistant

Choose SDK version

SDK Device
4 Versa, Versa Lite, Versa 2, Ionic
6 Versa 3, Sense
cp package.sdkX.json package.json

Setup SDK and build the application

npm add --also=dev @fitbit/sdk
npm add --also=dev @fitbit/sdk-cli
npx fitbit-build generate-appid
npx fitbit-build

Known issues

fitbit-homeassistant's People

Contributors

maxcanna avatar smirko-dev avatar yuchenshi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fitbit-homeassistant's Issues

Manual

  1. URL from Nabucasa
  2. Port is default 8123
  3. generated in HA
  4. API activation means in config only: "api:"
    correct? Does not work for me.

add support for button entities

title says it all really :)

i use a lot of button entities to trigger stuff, would be awesome if i could press them on my watch!

Not getting entities showing up.

New to fitbit, and no idea how the fitbit environment/API(s) work, but was excited to see your app pop up.

I think I've configured everything correctly:
My settings are:
URL: https://something.duckdns.org
PORT: 443
Token: myrandomlonglivetokenhere
Not sure how to debug, but there's no error just:
Home Assistant N/A

I also don't see any errors in my HA logs. I've tried with an internal IP, with/without the port, and with/without the protocol. I've also set up the prequisites in your readme. Honestly haven't looked to deep, so very possible I am missing how it's all wired together, but in companion/index.js won't that Token always be pulling the hard coded global at the top?
else if (evt.key === "entities") { sendData({key: "clear"}); JSON.parse(evt.newValue).forEach(element => { fetchEntity(address(), Token, element["name"]); }) }

Connection Error

Connection Error showing on screen of the Sense watch.
In the app settings I have the https://1234567.xyz domain listed that I access HA from.
The port is left blank and I have added a single entity name to test with so far. A freshly created token has been pasted into the app as needed.
I do also have "api:" in my configuration.yaml file
What else might be causing the connection error?

Unable to connect

Hey,
I am unable to connect to my HA. I am running Home Assistant 2023.1.2 and own the Fitbit Sense.
I was able to connect to the api via
curl -X GET -H "Authorization: Bearer eyJhbdKo..." -H "Content-Type: application/json" http://192.168.178.96:8123/api/
but HA-Remote always returns a connection error.

App settings:
URL:
http://192.168.178.96
Port:
8123
Token:
eyJhbdKo... and so on

Regards
Jannik

Sort entity list

Hey Mirco, thats me again with another feature idea (does not know how to set a 'feature' label for a new issue).

I saw that my configured entity list (10 positions at the moment) has a random sort order in watch app - I suspect this is results from first get first serve, so whenever I run the app on the watch there is in fact no sorting mechanism applied for the entity list.
It would be nice to initially create an array of entities within companion app (fetchEntity) that is connected to some kind of ID (sort key) and always fetched with this order. I wish every time I run the app to have the same entity order (could be the order from settings list or at least to sort by entity name).
What do you think?
Cheers

http (no -s) or nabu casa connectivity

Hi,

I just wanted to ask if maybe something has changed over last two years in regard to being able to connect via nabu casa or a local HTTP?
I'd love to use the app, but no way Im gonna do local https, too many complications :(

allow showing temperatures

It would be amazing if I could enter the id for my hive thermostat
And it then show the temperatures

Even better it allow me when clicking the entity to turn it up or down with maybe up or down arrows?
(I already have a script which I click which turns the hive onto boost for 30mins)

Thanks!

I haven't even really used the app yet--I
just wanted to say Thank You for spending your time building it... It's definitely needed!

Doesn't seem to work anymore with HA 2022.3.1

I've created a long access token, set my url, port and new token,
then added a single switch entity
BUT the app says connection error
BUT HA also keeps saying access is denied then after 3 tries opening the app on my watch
HA bans me from logging in for 5mins?

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.