Giter Site home page Giter Site logo

echoromeo / hanobo Goto Github PK

View Code? Open in Web Editor NEW
27.0 14.0 15.0 40 KB

Home Assistant implementation of pynobo - to control Nobø / Glen Dimplex heaters

License: GNU General Public License v3.0

Python 100.00%
home-assistant hvac heaters nobo glen-dimplex

hanobo's Introduction

hanobo

Hanobo is replaced by the official Nobø Ecohub integration. Because of this I have removed it from HACS, and will archive this repo.

Thanks for all the help and support with my first open source project, I will try to support oyvindwe with the official integration.

Introduction

Home Assistant implementation of pynobo as a climate component

As for now you can see and change Operation and Preset for Zones and set eco/comfort temperatures if you have a supported thermostat.

The possible Operation modes are as following:

  • Auto - In this mode the Zone is in the Normal setting and Preset shows which state the Zone is in right now (according to calendar setup)
  • Heat - In this mode the Zone in in the Override setting and in the state selected by Preset (Away, Eco, Comfort)
  • Off - In this optional mode the Zone is in the Normal setting and will configure it to use a week profile that turns the heater(s) in the Zone completely off (more info below)

This can be utilized the following ways:

  • Changing Preset to [Away, Eco, Comfort] will automatically change Operation to Heat
  • Changing Preset to None will automatically change Operation to Auto and update Preset
  • Changing Operation to Auto will automatically update Preset
  • Changing Operation to Heat will set Preset to Comfort
  • Changing Operation to Off will change Operation to Auto and change the week profile to the predefined "completely off" profile

There is no override in Nobø for "completely off", but there is a workaround

Nobø heaters can normally not be set to override "off". This is not a limitation in pynobo, but a safety-mechanism in the Nobø system (maybe they don't want you to accidentally turn off all your heaters and get frozen pipes). However, it is possible to create a week profile that makes the heaters "off" all the time. And then you can configure the system to switch a zone to this week profile to be able to turn the heater(s) off.

If you tell hanobo the name of the "Off" week profile and the name for the normal ("On") week profile for your zones, you can use this module to turn off (and on) your heaters. The week profiles must already exist in your Nobø system, and you need to list the "On" week profile for each zone in the nobo_hub configuration. Use the Nobø app to create them and configure them correctly.

If you don't configure any command_off or command_on then turning off heaters will not be supported (and this may be fine for your use).

How to use / Installation

Automaticly using HACS (Home Assistant Community Store)

  1. Go into HACS in the left menu
  2. Click Integration
  3. Click + (Explore and add repo) - Blue button in bottom right
  4. Search for "Nobø"
  5. Update configuration.yaml

Or watch gif at https://hacs.xyz

Or manually

To get started with this superexperimental implementation:

  1. Clone or download the project to [HA config path]/custom_components/nobo_hub:
  2. Go to directory - cd [HA config path]/custom_components/nobo_hub
  3. Move files - mv custom_components/* .
  4. Update configuration.yaml

Update configuration

  • Add the following to your Home Assistant configuration file:

    # Nobø Energy Control
    climate: 
      - platform: nobo_hub
        host: [your nobø serial] # You can use the 3 last digits if using discovery
    #    ip_address: [your nobø ip] # Uncomment if you do not want discovery
        # command_off: [your completely off week profile name] # Uncomment if you want to enable the completely off setting (bypassing the 7 degrees Away setting)
        # command_on: # Uncomment these if you want to enable the completely off setting, one line for each zone you want to allow bypassing the 7 degrees Away setting
        #   [zone name:return week profile name] 
        #   [zone name:return week profile name]
    
  • Restart Home Assistant, you will get this warning:

    WARNING (MainThread) [homeassistant.loader] You are using a custom component for nobo_hub.climate which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
    
  • Play around and figure out what does not work..

  • If you want some more logging info, add this to your Home Assistant configuration file:

    # Extra logging
    logger:
      default: warning
      logs:
        custom_components.nobo_hub.climate: debug
    

hanobo's People

Contributors

echoromeo avatar eirikwah avatar olekenneth avatar oyvindwe 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

Watchers

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

hanobo's Issues

'version' key missing

After updating HA to 2021.03.0 I get the following warning on HA startup:

2021-03-03 22:28:25 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'nobo_hub'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'nobo_hub'

Errors on load

I have been using this for about a year with no issues.
Since yesterday, my climate entities have disappeared. Suspected an issue after core upgrade, so I have restored a snapshot, this has not helped.

2021-05-20 07:02:10 INFO (SyncWorker_3) [custom_components.nobo_hub.climate] discovering and connecting to 099
2021-05-20 07:02:11 ERROR (MainThread) [homeassistant.components.climate] Error while setting up nobo_hub platform for climate
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 231, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args,**self.kwargs)
File "/config/custom_components/nobo_hub/climate.py", line 81, in setup_platform
hub = nobo(serial=host)
File "/usr/local/lib/python3.8/site-packages/pynobo.py", line 206, in init
self._loop = asyncio.get_event_loop() if loop is None else loop
File "/usr/local/lib/python3.8/asyncio/events.py", line 639, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'SyncWorker_3'

Any idea as to what has gone wrong?
Many thanks

Global override

Would it be possible to have a global override? This would in effect replicate the 4 main buttons on the app.

I love this code. I was previously using MQTT to send heater controls to an interface I had written (running on an ESP8266), but this is much better.. Many many thanks for all your work.

Remove temp settings for thermostats with only local control

Hi, great work!

Would it be possible to remove the temp settings for thermostats that only has local settings? I have some R80 RDC700, and it does not make sense for the settings to be visible.

Also, how about being able to select your own current temp sensor for thermostats not supporting this (only Switch does?).

'NoneType' object has no attribute 'send'

I occassionally loose the ability to control the Nobø devices. Please see error log below. Restarting Home Assistant resolves the problem - for a while - until next time...

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/nobo_hub/climate.py:261
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 10:44:26 (1 occurrences)
Last logged: 10:44:26

[139942307076704] 'NoneType' object has no attribute 'send'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 136, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1455, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1490, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 595, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 664, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 632, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 430, in async_set_hvac_mode
    await self.hass.async_add_executor_job(self.set_hvac_mode, hvac_mode)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/nobo_hub/climate.py", line 223, in set_hvac_mode
    self.set_preset_mode(PRESET_NONE)
  File "/config/custom_components/nobo_hub/climate.py", line 261, in set_preset_mode
    self._nobo.create_override(mode, self._nobo.API.OVERRIDE_TYPE_CONSTANT, self._nobo.API.OVERRIDE_TARGET_ZONE, self._id)
  File "/usr/local/lib/python3.8/site-packages/pynobo.py", line 521, in create_override
    self.send_command(command)
  File "/usr/local/lib/python3.8/site-packages/pynobo.py", line 355, in send_command
    self.client.send(message + b'\r')
AttributeError: 'NoneType' object has no attribute 'send'

`Platform not found: climate.nobo_hub` when trying to install

I am having an issue whereby I cannot even load climate.nobo_hub and I get the error

Platform not found: climate.nobo_hub
9:22 PM components/hassio/__init__.py (ERROR) - message first occured at 7:22 PM and shows up 5 times

I have all the downloaded files in /config/custom_components/nobo_hub.

I see references to needing _init_.py (and the reference again in my error), breaking changes for custom components in ~0.90 release and mention of the files needing the correct permissions.

Should this work with the latest 0.94.x version of Home Assistant? Is there anything specific that needs to be done for it to work with Hass.io? Am I missing an __init__.py ?

I am really excited to try this out as my new Nobo heaters are the only thing not integrated with HA in my setup!

HA configuration problems

Hi,

I want to connect Home Assistant to my Nobø hub, but I keep getting the message:

Platform error climate.nobo_hub - Integration 'nobo_hub' not found.

Can I ask you for a hint on what the correct configuration should look like?

Thank you.

Home Assistant 0.118.5

Update frequency of climate entity state and attribute

Hi @echoromeo and thank you for a great piece of software! When testing it I notice that, from the time I update the state or temp of the climate entity in HA, it takes ~30 sec (?) until the state is updated in the UI. Does the state only update on regular sync interval with the hub? Would it be possible to force an update right after temp or zone has been changed in HA?

HA 2021.5.5 issue

After I upgraded to version 2021.5.5, I am not able to get the Nobø integration working

`2021-05-20 08:41:41 ERROR (MainThread) [homeassistant.components.climate] Error while setting up nobo_hub platform for climate

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 231, in _async_setup_platform
await asyncio.shield(task)

File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)

File "/config/custom_components/nobo_hub/climate.py", line 81, in setup_platform
hub = nobo(serial=host)

File "/usr/local/lib/python3.8/site-packages/pynobo.py", line 206, in init
self._loop = asyncio.get_event_loop() if loop is None else loop

File "/usr/local/lib/python3.8/asyncio/events.py", line 639, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'

RuntimeError: There is no current event loop in thread 'SyncWorker_6'.`

Add override type selection

Sometime before the update February 28th, it was possible to change from e.g. Comfort to Eco, and still be in auto mode, so that next time the auto schedule would then change to Comfort, it would go back to that.

With the latest version, it seems that if I try to change from Comfort to Eco, or anything, it also switches from Auto to Heat, and stays there until I manually change it back.

Discovery doesn't work

Hello,
I provided a PR #38 with the increase of version of library with some fix about the asyncs methods. The reason is because I tried to use the original version and it didn't work either discovery or configuring it directly IP.

With the PR work the direct ip configuration but still not working the discovery. Probably there is also a small reformatting of the code due to the tool I use.

For the rest I was also working on the configuration via UI ( config_flow) but I preferred to divide the PR so as not to put too much meat on the fire

Platform error climate.nobo_hub

Good day. I have a problem. I have HA 0.100.3 installed. after installing hanobo I get the following error. how can I fix it. Thank you very much in advance

Platform error climate.nobo_hub - cannot import name 'SUPPORT_OPERATION_MODE' from 'homeassistant.components.climate.const' (/home/pi/homeassistant/lib/python3.7/site-packages/homeassistant/components/climate/const.py)

Error after installation

Got this error right after installation:

Logger: homeassistant.components.climate
Source: custom_components/nobo_hub/climate.py:84
Integration: Climate (documentation, issues)
First occurred: 5:23:38 PM (1 occurrences)
Last logged: 5:23:38 PM

Error while setting up nobo_hub platform for climate
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/nobo_hub/climate.py", line 84, in setup_platform
hub = nobo(serial=host, ip=ip, discover=False)
File "/usr/local/lib/python3.10/site-packages/pynobo.py", line 303, in init
self._loop = asyncio.get_event_loop() if loop is None else loop
File "/usr/local/lib/python3.10/asyncio/events.py", line 656, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'SyncWorker_3'.

Thermostat support and program complexity

Hi!

Sorry I posted on the wrong project, as mentioned I am new to a lot of this.

I would be happy to donate for this project to be a real and fully functioning component, how can we make that happened?

Anyways, below is the issues I have noticed:

  1. The current temperature of the thermostats is not showed anywhere in hass what I can see?
  2. The nobø system can be set up with magnetic sensors on windows nearby that deactivates the heat if opened, I'm not sure if this is even possible via the API but it would be great if these were visible in HassIO as well.
  3. The thermostats I HassIO shows two different temperatures, one which I think have no feature? I believe it is used on units with both heating and cooling but its confusing on these.
  4. In the nobø app it seems to be possible to change to all the different scenes but the "normal". If you set the normal in nobøs app it does not use the mode "program", it goes to "eco".

/Erik

Platform error climate.nobo_hub - Integration 'nobo_hub' not found

Hi there

Tried to install it into clean hass.io installation
Did everything as described in step2 (https connection)
so I have /config/custom_components/nobo_hub/pynobo folders and nobo.py in the pynobo also

While trying to check config:

2019-12-02 15:49:36 ERROR (MainThread) [homeassistant.components.hassio] Platform error climate.nobo_hub - Integration 'nobo_hub' not found.

Any ideas what is wrong?

arch armv7l
dev false
docker true
hassio true
os_name Linux
python_version 3.7.4
timezone Europe/Moscow
version 0.102.3
virtualenv false

Thanks!

Not available in HACS

Is it just me, or is the integration not yet available i HACS?

Installation via HACS fails (for me) in step 4: When searching for Nobø (or hanobo, pynobo, nobo or any other variation) nothing comes up.

Support for Dimplex Alta heaters

Hello. Just tried to connect this to a Dimplex heater. No luck. Read a little further that the Nobø heats may not share any of the technology even though it is the same company.

Do you know if there is any way to use your integration with Dimplex? They use the Dimplex Capa app.
https://dimplex.no/dimplex-alta

Platform error 0.104.3

Hi, I have a fresh install of HA 0.104.3

But when I try to start hanobo I get following
[homeassistant.config] Platform error: climate - Integration 'nobo_hub host:150' not found.

My config file

# Nobø Energy Control
climate:
- platform: nobo_hub
    host:150
#    ip_address: [your nobø ip] # Uncomment if you do not want discovery

Any thing changed that broke it?

Edit. When changing to

# Nobø Energy Control
climate:
- platform: nobo_hub
    host: 150
#    ip_address: [your nobø ip] # Uncomment if you do not want discovery

It dont get same problem. Now I get

ERROR (SyncWorker_0) [homeassistant.util.yaml.loader] mapping values are not allowed here in "/home/homeassistant/.homeassistant/configuration.yaml", line 21, column 9 2020-02-05 20:51:39 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: mapping values are not allowed here in "/home/homeassistant/.homeassistant/configuration.yaml", line 21, column 9

Not working in HA >= 0.96

The Nobö hub component was working fine in 0.95 but it is not working anymore after upgrade to 0.96.
I have activated logging i debug mode and it gave detailed info in 0.95.
Now these are the only relevant logs I get:

2019-08-05 14:56:03 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for nobo_hub which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-08-05 14:56:03 INFO (MainThread) [homeassistant.loader] Loaded nobo_hub from custom_components.nobo_hub
2019-08-05 14:56:03 INFO (MainThread) [homeassistant.setup] Setting up climate

And no devices are created.
The climate integration has undergone a major rewrite in 0.96 that may explain the problem.

Errors in log

Hi!

Im getting a lot of errors in the log regarding updates of temperatures, Most of the time the it works though. Any idea why?

Running latest HA and the nobo hub I very close to the radiators.

Se attached file.
Skärmavbild 2019-05-06 kl  22 01 24

Dimplex Baseboard heater

This might be a crazy request, but by any chance, would this work with the Dimplex Smart Baseboards?

I'm not sure if they have the same hub platform, but they are from the same company

Follow the great migration

From home-assistant:
"If you want to share an adjusted version of a Home Assistant integration, copy over ALL the files. Do your users a favor and stick to relative imports to avoid having your component break during an upgrade. Example of a relative import is from . import DATA_BRIDGE."

HeatPump DHW 250P / DHW 300 supported?

Hi,
I would like to know, if this integration does support the Dimplex Heatpumps DHW250P or DHW300 ... and if yes, what requirements are given...

currently, I am looking for a Heatpump for Warm-Water and found in some topics (IOBroker) that the DHW might support Modbus Protocol.
As far as I found out. there are some extensions available for dimplex heat pumps that enables the devices for Modbus RTU, Modbus TCP, App or other methods... therefore, I am looking if there's already an integration available - or if I need to continue my search / maybe need to create the Modbus Sensors & controlls on my own...

Thanks for your support, much appreciated :)

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.