Giter Site home page Giter Site logo

hemantkamalakar / haconfigs Goto Github PK

View Code? Open in Web Editor NEW
60.0 12.0 20.0 7.5 MB

My Home-Assistant configuration files

Python 63.21% JavaScript 36.79%
home-assistant-config homeassistant home-assistant home-automation python3 iot homeautomation google-fit google-fit-api covid-india

haconfigs's Introduction

About

This is my personal Home Assistant configuration, running my home automations.

Custom components

Covid-19 India tracker

  • A Home assistant custom component to get information about Covid-19 status in India.

Google Fit

  • A Home assistant custom component to get your fitness information using Google Fitness API.

Screenshots

Covid-19 India tracker

screenshot

Default view

screenshot

Living room

screenshot

Master bed room

screenshot

Bed room

screenshot

Kitchen

screenshot

Google fit

screenshot

Device tracker

screenshot

Battery status

screenshot

System monitor

screenshot


Links

Please โญ this repo if you find it useful. If you have questions on my configuration, ping me on twitter @hemantkamalakar

If my work helps you reduce time to develop, you can always consider buying me a cup of coffee.

Buy Me A Coffee

haconfigs's People

Contributors

bastshoes avatar hemantkamalakar 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

haconfigs's Issues

Constant errors in log

Hi,

i suppose that it happen when i haven synced sleep data with Google. Then every 30 seonds i get this king of error in HA logs:

2019-07-05 09:20:43 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.googlefit_jacek_sleep fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 377, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/util/init.py", line 224, in wrapper
result = method(*args, **kwargs)
File "/usr/src/homeassistant/homeassistant/util/init.py", line 224, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/google_fit/sensor.py", line 630, in update
bed_time = datetime.fromtimestamp(round(min(starts) / 1000))
ValueError: min() arg is an empty sequence

Google Fit issues

Hello.

First of all Thank you for your great sensor.

I've added custom sensor. Activated Fintness API. Sensors fetched some initial data. But I'm getting errors:

Update for sensor.andrey_steps fails

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 349, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/util/__init__.py", line 315, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/app/homeassistant/util/__init__.py", line 315, in wrapper
    result = method(*args, **kwargs)
  File "/config/custom_components/sensor/google_fit.py", line 310, in update
    self._update_steps_data()
  File "/config/custom_components/sensor/google_fit.py", line 427, in _update_steps_data
    get(userId='me', dataSourceId=STEPS_DATA_SOURCE, datasetId=DATA_SET). \
  File "/usr/local/lib/python3.6/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/googleapiclient/http.py", line 837, in execute
    method=str(self.method), body=self.body, headers=self.headers)
  File "/usr/local/lib/python3.6/site-packages/googleapiclient/http.py", line 163, in _retry_request
    resp, content = http.request(uri, method, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/oauth2client/transport.py", line 175, in new_request
    redirections, connection_type)
  File "/usr/local/lib/python3.6/site-packages/oauth2client/transport.py", line 282, in request
    connection_type=connection_type)
  File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 1322, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 1072, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 996, in _conn_request
    conn.request(method, request_uri, body, headers)
  File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1285, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1234, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1026, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.6/http/client.py", line 986, in send
    self.sock.sendall(data)
  File "/usr/local/lib/python3.6/ssl.py", line 975, in sendall
    v = self.send(byte_view[count:])
  File "/usr/local/lib/python3.6/ssl.py", line 944, in send
    return self._sslobj.write(data)
  File "/usr/local/lib/python3.6/ssl.py", line 642, in write
    return self._sslobj.write(data)
ConnectionResetError: [Errno 104] Connection reset by peer

I'm getting same error for all google fit sensors. And data is not updating.

Could you help with issues?

Google Fit Component not updating any values

Installed this component yesterday but sadly it seems to be broken !

Only height and weight get displayed, every other sensor does not update any info after 24h .

Tried checking google console and all the API requests are going through without errors, so the issue seems to be related with the component and Home Assistant integration .

Can you please kindly check ?

Thanks

Google Fit not working from today

I see Object unawailable: sensor.google_fit_sleep in HA frontend
and

2019-04-02 15:08:47 ERROR (MainThread) [homeassistant.components.sensor] google_fit: Error on device update!
Traceback (most recent call last):
  File "d:\program\python\python36\lib\site-packages\homeassistant\helpers\entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "d:\program\python\python36\lib\site-packages\homeassistant\helpers\entity.py", line 379, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "d:\program\python\python36\lib\asyncio\futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "d:\program\python\python36\lib\asyncio\tasks.py", line 244, in _wakeup
    future.result()
  File "d:\program\python\python36\lib\asyncio\futures.py", line 244, in result
    raise self._exception
  File "d:\program\python\python36\lib\concurrent\futures\thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "d:\program\python\python36\lib\site-packages\homeassistant\util\__init__.py", line 224, in wrapper
    result = method(*args, **kwargs)
  File "d:\program\python\python36\lib\site-packages\homeassistant\util\__init__.py", line 224, in wrapper
    result = method(*args, **kwargs)
  File "d:\User\.homeassistant\custom_components\google_fit\sensor.py", line 630, in update
    bed_time = datetime.fromtimestamp(round(min(starts) / 1000))
ValueError: min() arg is an empty sequence

in my logs

Google Fit not show Steps, time, calories

My Hass not show information Steps, time, calories.
Only

sensor.google_fit_distance 0.0 friendly_name: Google Fit Distance unit_of_measurement: km last_updated: unknown
sensor.google_fit_height 170.0 friendly_name: Google Fit Height unit_of_measurement: cm last_updated: 1551689627
sensor.google_fit_weight 52.4 friendly_name: Google Fit Weight unit_of_measurement: Kg last_updated: 1551689627
Pls help me config
P/s: Can you add heart rate information?

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.