Coder Social home page Coder Social logo

ha-nefit-ng's People

Contributors

ksya avatar marconfus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ha-nefit-ng's Issues

integration error after update 0.92 + fix

nefit component gives integration error.
fix:
Due to this 27, you need to create empty file init.py and manifest.json in the folder custom_components/{your_platform} with content like this:

{ "domain": "your_domain_name", "name": "Your Intgration", "documentation": "https://www.example.com", "dependencies": [], "codeowners": [], "requirements": [] }

Platform not found: climate.nefit

So I created in the directory config the flowing:
custom_components > climate > nefit.py

in my configuration.yaml I put in this code:

climate:
platform: nefit
name: Heating
serial: 'xxxx'
accesskey: 'xxxxx'
password: 'xxxxxx'

But everytime i get the error while checking config:

Platform not found: climate.nefit

AttributeError: module 'custom_components.climate' has no attribute 'setup'

HA 0.90.0.

ERROR (MainThread) [homeassistant.setup] Error during setup of component climate Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/homeassistant/setup.py", line 154, in _async_setup_component component.setup, hass, processed_config) # type: ignore AttributeError: module 'custom_components.climate' has no attribute 'setup'

climate:
  platform: nefit
  name: Heating
  serial: 'a'
  accesskey: 'b'
  password: 'c'

logger:
  default: warn
  logs:
    custom_components.climate.nefit: debug
    aionefit: debug

Thermostat connected to internet. Mobile application working.

Edit:
🤦‍♂️ Forgot the renames. Closing issue. Likely opening a new issue for a new problem later.
Btw, had to remove the __pycache__ directory too before it would move on.

nefit: Error on device update!

NOTE: I use hassio on rasp pi 3b+ (HassOS 1.13, Home Assistant 0.86.4 latest version).
Followed instructions (copied nefit.py to the specified directory, added climate section in config file with correct serialnr, access and pwd) but get errors below in logging after rebooting Hass:

nefit: Error on device update!
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 347, in async_device_update
await self.async_update()
File "/config/custom_components/climate/nefit.py", line 173, in async_update
await asyncio.gather(*tasks)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 362, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError

Log Details (WARNING)
Setup of platform nefit is taking over 10 seconds.

Log Details (WARNING)
Using slower stringprep, consider compiling the faster cython/libidn one.

Connection lost error

I started to experiment constantly connection lost errors, more specific, when I restart HA everything works fine but after some random time (hours/days) I receive errors like the one below.
I'm using HA 0.94.1 and the mobile app is working fine.

2019-06-18 14:21:17 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.nefit 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 375, in async_device_update
await self.async_update()
File "/config/custom_components/nefit/climate.py", line 170, in async_update
self._client.get(url)
File "/usr/local/lib/python3.7/site-packages/aionefit/init.py", line 98, in get
self.xmppclient.send_message(mto=self._to, mbody=msg)
File "/usr/local/lib/python3.7/site-packages/aionefit/provider/slixmpp_impl.py", line 71, in send_message
message.stream.send_raw(str_data)
File "/usr/local/lib/python3.7/site-packages/slixmpp/xmlstream/xmlstream.py", line 926, in send_raw
raise NotConnectedError()
slixmpp.xmlstream.xmlstream.NotConnectedError

Missing instructions regarding requirements

I'm using a fresh HA setup (0.87.1) on Hassbian, and had to install some additional requirements to get the Nefit component up and running:

  • sudo apt-get install libxslt-dev
  • pip install lxml (as user homeassistant, with virtual environment activated)

But after that, it's working 👍🏻

HomeKit status is always "ON"

Hello,

After the recent update of the ha-nefit-ng component, the heating status constantly appears to be turned on in HomeKit.
The operation mode in HomeAssistant cannot be changed to "Off" state as only Heating is available.

Am I missing something, or it is a bug/limitation or something outside the nefit component?

Thanks in advance and keep up the great work! I highly appreciate it :)

Component breaks HA 0.103

Starting from 0.103 HomeAssistant didn't start up anymore.
Error log:

homeassistant_1        | 2019-12-25 13:36:39 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal error: protocol.data_received() call failed.
homeassistant_1        | Traceback (most recent call last):
homeassistant_1        |   File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 816, in _read_ready__data_received
homeassistant_1        |     self._protocol.data_received(data)
homeassistant_1        |   File "/usr/local/lib/python3.7/site-packages/slixmpp/xmlstream/xmlstream.py", line 406, in data_received
homeassistant_1        |     self._spawn_event(xml)
homeassistant_1        |   File "/usr/local/lib/python3.7/site-packages/slixmpp/xmlstream/xmlstream.py", line 970, in _spawn_event
homeassistant_1        |     stanza = self._build_stanza(xml)
homeassistant_1        |   File "/usr/local/lib/python3.7/site-packages/slixmpp/xmlstream/xmlstream.py", line 951, in _build_stanza
homeassistant_1        |     stanza = stanza_type(self, xml)
homeassistant_1        |   File "/usr/local/lib/python3.7/site-packages/slixmpp/xmlstream/stanzabase.py", line 1390, in __init__
homeassistant_1        |     ElementBase.__init__(self, xml, parent)
homeassistant_1        |   File "/usr/local/lib/python3.7/site-packages/slixmpp/xmlstream/stanzabase.py", line 416, in __init__
homeassistant_1        |     if self.setup(xml):
homeassistant_1        |   File "/usr/local/lib/python3.7/site-packages/slixmpp/stanza/stream_features.py", line 27, in setup
homeassistant_1        |     self.values = self.values
homeassistant_1        |   File "/usr/local/lib/python3.7/site-packages/slixmpp/xmlstream/stanzabase.py", line 615, in _set_stanza_values
homeassistant_1        |     self[full_interface] = value
homeassistant_1        |   File "/usr/local/lib/python3.7/site-packages/slixmpp/xmlstream/stanzabase.py", line 753, in __setitem__
homeassistant_1        |     lang=lang)
homeassistant_1        |   File "/usr/local/lib/python3.7/site-packages/slixmpp/xmlstream/stanzabase.py", line 959, in _set_sub_text
homeassistant_1        |     return self._del_sub(name, lang=lang)
homeassistant_1        |   File "/usr/local/lib/python3.7/site-packages/slixmpp/xmlstream/stanzabase.py", line 1040, in _del_sub
homeassistant_1        |     parent = self.xml.find(parent_path)
homeassistant_1        |   File "/usr/local/lib/python3.7/xml/etree/ElementTree.py", line 299, in find
homeassistant_1        |     return ElementPath.find(self, path, namespaces)
homeassistant_1        |   File "/usr/local/lib/python3.7/xml/etree/ElementPath.py", line 307, in find
homeassistant_1        |     return next(iterfind(elem, path, namespaces), None)
homeassistant_1        | TypeError: 'NoneType' object is not an iterator
homeassistant_1        | 2019-12-25 13:36:39 INFO (MainThread) [slixmpp.xmlstream.xmlstream] connection_lost: (TypeError("'NoneType' object is not an iterator"),)

Disabling this component fixed the issue.

Updated to Hassio 0.88.1: Nefit fails at startup

Got a warning in log during startup after updating

Using slower stringprep, consider compiling the faster cython/libidn one.
9:31 PM custom_components/climate/nefit.py (WARNING)

Do we need update libs?

state heating

Hello:)

Good to see that all is working again:) Thnx for the good job.

I heave a question:

You can change the hvac_modes to auto and heat. But is it possible to change that to manually.
And if its real heating to heat ?

nefit

Now it says heating while its not busy
greetings justin

Component Nefit not working anymore in 0.89

Hi marconfus,

Recently saw this in the logging:

Integrations need to be in their own folder. Change climate/nefit.py to nefit/climate.py. This will stop working soon. February 24, 2019, 1:32 PM loader.py (WARNING) - message first occured at February 24, 2019, 12:08 PM and shows up 3 times

Just to let you know in case you haven't seen it before.

not seeing outside temperature and a big thank you!

Thanks for keeping this sensor up-to-date!

I noticed on the commit message that there was outside temperature monitoring? I installed the new sensor code and restarted HA.
But I do not see the outside temperature in my dashboard. What am I doing wrong?

HA 0.87 breaks component at startup

And it's broken again...
The callback of the XMPP server leads to the following error:

Traceback (most recent call last):
  File "uvloop/handles/stream.pyx", line 827, in uvloop.loop.__uv_stream_on_read_impl
  File "/usr/local/lib/python3.6/site-packages/slixmpp/xmlstream/xmlstream.py", line 406, in data_received
    self._spawn_event(xml)
  File "/usr/local/lib/python3.6/site-packages/slixmpp/xmlstream/xmlstream.py", line 970, in _spawn_event
    stanza = self._build_stanza(xml)
  File "/usr/local/lib/python3.6/site-packages/slixmpp/xmlstream/xmlstream.py", line 951, in _build_stanza
    stanza = stanza_type(self, xml)
  File "/usr/local/lib/python3.6/site-packages/slixmpp/xmlstream/stanzabase.py", line 1389, in __init__
    ElementBase.__init__(self, xml, parent)
  File "/usr/local/lib/python3.6/site-packages/slixmpp/xmlstream/stanzabase.py", line 415, in __init__
    if self.setup(xml):
  File "/usr/local/lib/python3.6/site-packages/slixmpp/stanza/stream_features.py", line 27, in setup
    self.values = self.values
  File "/usr/local/lib/python3.6/site-packages/slixmpp/xmlstream/stanzabase.py", line 614, in _set_stanza_values
    self[full_interface] = value
  File "/usr/local/lib/python3.6/site-packages/slixmpp/xmlstream/stanzabase.py", line 752, in __setitem__
    lang=lang)
  File "/usr/local/lib/python3.6/site-packages/slixmpp/xmlstream/stanzabase.py", line 958, in _set_sub_text
    return self._del_sub(name, lang=lang)
  File "/usr/local/lib/python3.6/site-packages/slixmpp/xmlstream/stanzabase.py", line 1039, in _del_sub
    parent = self.xml.find(parent_path)
  File "/usr/local/lib/python3.6/xml/etree/ElementTree.py", line 298, in find
    return ElementPath.find(self, path, namespaces)
  File "/usr/local/lib/python3.6/xml/etree/ElementPath.py", line 298, in find
    return next(iterfind(elem, path, namespaces), None)
TypeError: 'NoneType' object is not an iterator
2019-02-09 19:51:29 WARNING (MainThread) [homeassistant.components.climate] Platform nefit not ready yet. Retrying in 180 seconds.

slixmpp library version is unchanged and it only happens in my "fully configured" HA instance. In the stripped down dev instance it still works fine. So I have no idea how to debug the situation.
After a couple of restarts it starts to work again.

The same error occurs with the XMPP notify component (also based on slixmpp) so it's not my fault 😄

SSL error with HA Docker image

Since upgrading to HA 0.97 I get the following error from the Nefit component:

2019-08-23 17:01:41 DEBUG (MainThread) [aionefit] Initializing XMPP client
2019-08-23 17:01:41 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed
Traceback (most recent call last):
  File "uvloop/sslproto.pyx", line 500, in uvloop.loop.SSLProtocol._on_handshake_complete
  File "uvloop/sslproto.pyx", line 484, in uvloop.loop.SSLProtocol._do_handshake
  File "/usr/local/lib/python3.7/ssl.py", line 774, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1076)
2019-08-23 17:01:41 ERROR (MainThread) [slixmpp.xmlstream.xmlstream] CERT: Invalid certificate trust chain.
2019-08-23 17:01:51 WARNING (MainThread) [homeassistant.components.climate] Setup of platform nefit is taking over 10 seconds.
2019-08-23 17:01:51 WARNING (MainThread) [homeassistant.components.climate] Platform nefit not ready yet. Retrying in 180 seconds.

I'm using the latest Docker image (HA 0.97.2 currently). I'm not sure what's going on here, but have a feeling it is related to the Docker image. Maybe the version of some library used in the Docker image? In the release-notes of HA 0.97 I see that they've upgraded the Docker image to use Debian Buster.

No module named 'aionefit'

Hello!

first of all, I must give you big thumbs up, for your really great work marconfus!
I have been using your nefit integration for over a year now.

Recently I started fresh over with hass.io (92.1) and you rewritten integration gives me now the following error:
2019-04-26 23:55:16 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform nefit Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform SLOW_SETUP_MAX_WAIT, loop=hass.loop) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for return fut.result() File "/config/custom_components/nefit/climate.py", line 50, in async_setup_platform device = NefitThermostat(hass, config) File "/config/custom_components/nefit/climate.py", line 59, in __init__ from aionefit import NefitCore ModuleNotFoundError: No module named 'aionefit'

I have put it as you required

grafik

I have tried so far:
rebooting a couple of times, deleting the pycache and then rebooting

do I have to install aionefit somehow before?

Boiler indicator

Hey, thanks for library and the effort in creating this library.

I have one small request, can you add back boiler status.

TimeoutError

nefit: Error on device update!
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/app/homeassistant/helpers/entity.py", line 377, in async_device_update
    await self.async_update()
  File "/config/custom_components/nefit/climate.py", line 173, in async_update
    await asyncio.gather(*tasks)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 423, in wait_for
    raise futures.TimeoutError()
concurrent.futures._base.TimeoutError

I always get a TimeoutError, the nefit plugin does not connect at all.

From home-assistant.log
`
2019-04-01 11:56:43 WARNING (MainThread) [slixmpp.stringprep] Using slower stringprep, consider compiling the faster cython/libidn one.
2019-04-01 11:56:43 DEBUG (MainThread) [aionefit] Initializing XMPP client
2019-04-01 11:56:45 DEBUG (MainThread) [aionefit] Sending msg...GET /ecus/rrc/uiStatus HTTP/1.1\rUser-Agent: NefitEasy\r\r
2019-04-01 11:56:45 DEBUG (MainThread) [aionefit] Sending msg...GET /heatingCircuits/hc1/actualSupplyTemperature HTTP/1.1\rUser-Agent: NefitEasy\r\r
2019-04-01 11:56:45 DEBUG (MainThread) [aionefit] Sending msg...GET /system/sensors/temperatures/outdoor_t1 HTTP/1.1\rUser-Agent: NefitEasy\r\r
2019-04-01 11:56:45 DEBUG (MainThread) [aionefit] Sending msg...GET /system/appliance/systemPressure HTTP/1.1\rUser-Agent: NefitEasy\r\r
2019-04-01 11:56:45 DEBUG (MainThread) [aionefit] Sending msg...GET /ecus/rrc/recordings/yearTotal HTTP/1.1\rUser-Agent: NefitEasy\r\r
2019-04-01 11:56:45 DEBUG (MainThread) [aionefit] headers: ['HTTP/1.0 200 OK', 'Content-Length: 664', 'Content-Type: application/json', 'connection: close', '']
2019-04-01 11:56:45 DEBUG (MainThread) [aionefit] body: SNIP
2019-04-01 11:56:46 DEBUG (MainThread) [aionefit] response: {"id":"/ecus/rrc/uiStatus","type":"uiUpdate","recordable":0,"writeable":0,"value":{"CTD":"2019-04-01T11:56:45+01:00 Mo","CTR":"room","UMD":"manual","MMT":"17.0","CPM":"auto","CSP":"7","TOR":"on","TOD":"0","TOT":"18.0","TSP":"17.0","IHT":"18.80","IHS":"ok","DAS":"off","TAS":"off","HMD":"off","ARS":"init","FPA":"off","ESI":"on","BAI":"No","BLE":"false","BBE":"false","BMR":"false","PMR":"false","RS":"off","DHW":"on","HED_EN":"false","HED_DEV":"false","FAH":"false","DOT":"false","HED_DB":""}}
2019-04-01 11:56:52 WARNING (MainThread) [homeassistant.components.climate] Setup of platform nefit is taking over 10 seconds.
2019-04-01 11:56:55 ERROR (MainThread) [homeassistant.components.climate] nefit: Error on device update!
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/app/homeassistant/helpers/entity.py", line 377, in async_device_update
await self.async_update()
File "/config/custom_components/nefit/climate.py", line 173, in async_update
await asyncio.gather(*tasks)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 423, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError

`

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.