GithubHelp home page GithubHelp logo

tami4edge's Introduction

tami4edge for Home Assistant

Due to the recent changes in tami4, some of the API calls need to be replaced with new ones. I am working hard to update the code and release it as soon as possible.

This repository contains a tami4edge component for Home Assistant.

hacs_badge

alt text

The component is developed by Alon Teplitsky.

Installation

Installation via HACS (recommended) or by copying custom_components/tami4edge into your Home Assistant configuration directory.

Configuration

The component requires configuration via the Home Assistant configuration file. The following parameters are required:

tami4edge:
  api_key: API_KEY

N.B. You will need an API key to use this component.

Get API_KEY using docker
docker pull 0xalon/tami4edgecloudtokenextractor:latest
docker run -it 0xalon/tami4edgecloudtokenextractor:latest

Entities

Each entity will be represented as a sensor with the current state of usage.

  • Daily Water Consumption
  • Weekly Water Consumption
  • Average Water Consumption
  • Filter Upcoming Replacement
  • UV Upcoming Replacementr

buttons

The following buttons is implemented by the component:

  • Boil Water
  • Sync

Disclaimer

I don't have any contact with the company and am not responsible for any loss or damage caused by this integration.

tami4edge's People

Contributors

0xalon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar alws34 avatar Kamal Nasser avatar  avatar  avatar uriel avatar  avatar

Watchers

 avatar

Forkers

taltaub22

tami4edge's Issues

Feature request: button to pour a specific "drink"

In the app there's an option to define a drink with set ml amount and water temp, then by a single click pour that drink.
An improvement of that can be to ad-hoc define the amount and temp and control it from home assistant.

I'd be happy to assist in implementing this.

API calls - issue

Hi Alon,
Thank you for the project!
Any chance to update tami4edge for Home Assistant?

➜ ~ docker pull 0xalon/tami4edgecloudtokenextractor:latest
latest: Pulling from 0xalon/tami4edgecloudtokenextractor
Digest: sha256:1d0e17f6141216430e3c8ac3c73c8bb711b0cd78e8a993f6644a20b34903c90a
Status: Image is up to date for 0xalon/tami4edgecloudtokenextractor:latest
docker.io/0xalon/tami4edgecloudtokenextractor:latest
➜ ~ docker run -it 0xalon/tami4edgecloudtokenextractor:latest
/usr/local/lib/python3.8/site-packages/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
What's your phone number to sign up? <+972XXXXXXXXX>: xxxxxxxxx
OTP: XXXX
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 37, in
response = submit_otp(phone_number, otp)
File "main.py", line 23, in submit_otp
response = requests.post(
File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Buttons are not loaded

Hi,

I now have a new tami4edge device and I used this repository (https://github.com/Guy293/Tami4EdgeAPI) to pull the token of my user , all the entities (sensors ,services) are working fine , but I don't have the buttons .

this is the error message from the integration:

Logger: homeassistant.components.button
Source: custom_components/tami4edge/button.py:17
Integration: Button ([documentation](https://www.home-assistant.io/integrations/button), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+button%22))
First occurred: 6:53:02 PM (1 occurrences)
Last logged: 6:53:02 PM

Error while setting up tami4edge platform for button
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 353, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/tami4edge/button.py", line 17, in async_setup_platform
    waterConsumptionCoordinator = hass.data[DOMAIN_DATA]['waterConsumptionCoordinator']
                                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'waterConsumptionCoordinator'

Sending the OTP fails

After sending the OTP i am getting a parsing error. any idea?


 docker run -it 0xalon/tami4edgecloudtokenextractor:latest

/usr/local/lib/python3.8/site-packages/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
  warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
What's your phone number to sign up? <+972XXXXXXXXX>: 05222222
OTP: 1234
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 37, in <module>
    response = submit_otp(phone_number, otp)
  File "main.py", line 23, in submit_otp
    response = requests.post(
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

getting API - not running HA in Docker

hello Alon,
thanks for your contribution.
i am not sure how to get the API keys, i am not running my HA in docker container.
those commands do not work in CLI.
appreciate the assistance.
thanks.

Getting Error

when run command docker run -it 0xalon/tami4edgecloudtokenextractor:latest
after i insert sms code
idont recive the API.

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.