Giter VIP home page Giter VIP logo

baxi_thermostat's Introduction

BAXI THERMOSTAT

hacs_badge

This component provides integration with Baxi branded thermostat (ONLY TESTED WITH TXM)

How to install

You can use HACS to install this integration as custom repository

If you are not using HACS, you must copy baxi_thermostat into your custom_components folder

Configuration

Configuration via integration is recommended. Add an instance of Baxi Thermostat using the UI:

And follow the steps:

Is it also possible to configure manually, but then, only entities will be created (not device).

climate:
  - platform: baxi_thermostat
    name: My Baxi Thermostat
    username: <your username>
    password: <your password>
    pairing_code: <your paring code>

Pairing code can be get from the thermostat device or from the Baxi app, under: Settings > Connected devices and services > Invite someone

Screenshot

Integration will create a climate entity, that will look like this in Lovelace:

Integration will also create a couple of entities for energy consumption and a Device that groups all entities (only if configured using UI)

Work in progress

  • Super huge refactor (code is completely shitty now)
  • Lots (seriously, lots) of bugs to be fixed.
  • Multidevice not tested, probably not working
  • Translation

Thanks to

baxi_thermostat's People

Contributors

vipial1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

baxi_thermostat's Issues

Testing Baxi with Remeha etwist

Hi I am testing the Baxi thermostat in combination with Remeha eTwist thermostat. It is the same product but with a different name released on the Dutch market. It would be great if it is possible to make your integration work.

Unfortunately, when configuring the integration, I get the following error message.

Error setting up entry Baxi Thermostat for baxi_thermostat
14:45:04 – (FOUT) BAXI Thermostat (aangepaste integratie)
ERROR logging to BAXI. Perhaps wrong password??
14:45:04 – (FOUT) BAXI Thermostat (aangepaste integratie)
ERROR with post request to https://remoteapp.bdrthermea.com/user/baxi/login: 401
14:45:04 – (FOUT) BAXI Thermostat (aangepaste integratie)

Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.baxi_thermostat.BaxiAPI
Source: custom_components/baxi_thermostat/BaxiAPI.py:108
Integration: BAXI Thermostat (documentation)
First occurred: 14:45:04 (1 occurrences)
Last logged: 14:45:04

ERROR with post request to https://remoteapp.bdrthermea.com/user/baxi/login: 401

The address vrequest address for etwist may be different at BDR Group. Who knows, we may find out.

The credentials I use to configure the integration are correct.

Error message when changing preset

Integration is working fine, however every time the preset is changed, even if the change occurs eventually, an error log is raised, as an example below:

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/baxi_thermostat/climate.py:156
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 18:40:23 (4 occurrences)
Last logged: 18:42:03

[547278154448] cannot unpack non-iterable NoneType object
[547222073936] cannot unpack non-iterable NoneType object
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 930, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
await result
File "/config/custom_components/baxi_thermostat/climate.py", line 156, in async_set_preset_mode
baxi_preset_mode, program = self._attr_preset_mode = preset_mode_ha_to_baxi(
TypeError: cannot unpack non-iterable NoneType object

Noticed that this happens when changing directly from the "more info" window, and nto from a card

pairing error

it worked about two weeks
integration gives me pairing error:

Questo errore ha avuto origine da un'integrazione personalizzata.

Logger: custom_components.baxi_thermostat.BaxiAPI
Source: custom_components/baxi_thermostat/BaxiAPI.py:108
Integration: BAXI Thermostat (documentation)
First occurred: 21:22:30 (1 occurrences)
Last logged: 21:22:30

ERROR with post request to https://ruapi.remoteapp.bdrthermea.com/v1.0/pairings: 480

Questo errore ha avuto origine da un'integrazione personalizzata.

Logger: root
Source: custom_components/baxi_thermostat/BaxiAPI.py:47
Integration: BAXI Thermostat (documentation)
First occurred: 21:22:30 (1 occurrences)
Last logged: 21:22:30

Error pairing integration with BAXI

Unable to prepare setup for platform baxi_thermostat.climate: Unable to set up component.

Unable to prepare setup for platform baxi_thermostat.climate: Unable to set up component.

This error originated from a custom integration.

Logger: homeassistant.setup
Source: custom_components/baxi_thermostat/BaxiAPI.py:130
Integration: BAXI Thermostat (documentation)
First occurred: 1:24:36 PM (1 occurrences)
Last logged: 1:24:36 PM

Error during setup of component baxi_thermostat
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 229, in _async_setup_component
result = await task
File "/config/custom_components/baxi_thermostat/init.py", line 24, in async_setup
await api.bootstrap()
File "/config/custom_components/baxi_thermostat/BaxiAPI.py", line 45, in bootstrap
if not await self._load_stored_token() or not await self.connection_status():
File "/config/custom_components/baxi_thermostat/BaxiAPI.py", line 135, in connection_status
response = await self.async_get_request(api_endpoint)
File "/config/custom_components/baxi_thermostat/BaxiAPI.py", line 130, in async_get_request
return response.json()
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.9/site-packages/simplejson/init.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.9/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Extra Info from BAXI app

Hello, in the BAXI app you can find additional information on the status of the boiler:

  • external temperature (if external probe is present)
  • water pressure
  • system temperature

Would it be possible to add this information to the component as well?
Would it also be possible to show the status of the burner (on / off) as it appears on the boiler display?

Thank you

Screenshot_2022-08-24-08-45-20-22_8aa8ff7c1275e8270f892ce16fd72cfa

Error : cannot import name 'Platform' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

When I try to use this integration using this configuration :

climate:

  • platform: baxi_thermostat
    name: My Baxi Thermostat
    username: [email protected]
    password: xxxxxxxxxx
    pairing_code: 372177526

I get this error returned:

Platform error climate.baxi_thermostat - cannot import name 'Platform' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

PLEASE HELP ME.

This is the log file:

Logger: homeassistant.config
Source: custom_components/baxi_thermostat/init.py:7
First occurred: 27 gennaio 2022, 6:34:26 (1 occurrences)
Last logged: 27 gennaio 2022, 6:34:26

Platform error: climate
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 823, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 424, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 429, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/config/custom_components/baxi_thermostat/init.py", line 7, in
from homeassistant.const import CONF_NAME, CONF_USERNAME, CONF_PASSWORD, Platform
ImportError: cannot import name 'Platform' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

Only one entity?

Hi!

I just installed your integration. Many thanks for your work!

I found out that only one entity was created (I used the UI):

image

image

Am I doing something wrong?

Can't find custom_components in HACS

hi, in the installation instructions it says to download the custom_components from HACS but it's not there. Is a certain version of HACS required to download it or is it not present?
Thank you

Presets Issue

Hi vipial1, thank you so much for this integration.
I'm using it for about 5 months, the only issue I have is that only one preset displayed (look at the image):

Immagine 2023-01-02 183031

and if I click on it HA returns this error:

Immagine 2023-01-02 190432

PS If I select presets from the drop down menu some of the listed work (Manual, Schedule 1, Schedule 2, Schedule 3. The rest don't work)

BAXI Mago with GW-16 creating Device with no entities

Hi,

The integration is setup with success, but as in title, it creates the device (the gateway) but no entities, any ideas/suggestions?

Thank you
image

This the logs:
Logger: homeassistant.components.climate
Source: custom_components/baxi_thermostat/BaxiAPI.py:138
Integration: Climate (documentation, issues)
First occurred: 11:49:06 (2 occurrences)
Last logged: 12:11:57

baxi_thermostat: Error on device update!
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.10/site-packages/simplejson/init.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 477, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 702, in async_device_update
await task
File "/config/custom_components/baxi_thermostat/climate.py", line 125, in async_update
pressure = await self._baxi_api.get_water_pressure()
File "/config/custom_components/baxi_thermostat/BaxiAPI.py", line 244, in get_water_pressure
return await self.async_get_request(api_endpoint)
File "/config/custom_components/baxi_thermostat/BaxiAPI.py", line 138, in async_get_request
return response.json() if response else response
File "/usr/local/lib/python3.10/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)

NOTE: I have still to connect the GW-16 to the boiler, could it be this the reason of the problem?

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.