Giter VIP home page Giter VIP logo

Comments (16)

jamhos avatar jamhos commented on July 25, 2024 1

Nah you're all good, that's definitely Intesis and you're using the correct one. I just noticed you'd commented on jnimmo/pyIntesisHome#43 which was related to the Airconwithme integration.

from hass-intesishome.

jnimmo avatar jnimmo commented on July 25, 2024 1

It seems like there's a connectivity issue between Home Assistant and the Intesis servers based on your logs - so part of the solution may be seeing if that can be addressed, but equally making sure the reconnection happens a bit more seamlessly should go a long way too (as we can expect connection issues to happen on the internet)

from hass-intesishome.

jnimmo avatar jnimmo commented on July 25, 2024

Thanks for the report - so you're saying it was more reliable back on 1.0.1 or something rather than 1.0.4?
1.0.3 added sending a keepalive to try and keep the TCP socket open all the time, but it looks like sending the keepalive might be causing some problems of it's own.

Can you please enable debug logging then search for lines containing pyIntesishome;
Also, have you tried to see if their device supports Intesishome_local?

from hass-intesishome.

Jimmypl007 avatar Jimmypl007 commented on July 25, 2024

I'm pretty sure the connection drops existed on 1.0.1 as the graph looked similar to the one above, however, I can't say I checked the log, as at the time I assumed/hoped it was Alexa voice control that was playing up, as it only failed once and then worked again later. then I noticed you had updated the git and I installed it, so I didn't really have more than a day of use of 1.0.1

I will do what you asked to check and get back to you once I figure out how to enable debug logging ;P
EDIT: will also try the local thing as soon as I can, it's at my parents and I will have to get access to the router to see the IP.

from hass-intesishome.

Jimmypl007 avatar Jimmypl007 commented on July 25, 2024

Alright I have just added
logger:
default: critical
logs:
# log level for a custom component
custom_components.intesishome: debug

to my config file, I 'think' this is debug logging. we will see how that goes.

As for the local part, to start with I will state that our device is "TO-RC-WIFI-1" but above that on another sticker, it says Type: xx-RC2-WIFI-1x i noticed it wasn't specifically in the list you had. I did try adding the device as an "Intesishome_local" and when I entered the IP address (which I confirmed using the mac address), it came up with "an unknown error occured" and this log (pasted below)

This error originated from a custom integration.

Logger: custom_components.intesishome.config_flow
Source: custom_components/intesishome/config_flow.py:128
Integration: IntesisHome
First occurred: 4:09:08 PM (1 occurrences)
Last logged: 4:09:08 PM

Unexpected exception
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
sock = await self._connect_sock(
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
return await fut
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.1.9', 80)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/config/custom_components/intesishome/config_flow.py", line 128, in async_step_details
await controller.poll_status()
File "/usr/local/lib/python3.10/site-packages/pyintesishome/intesishomelocal.py", line 171, in poll_status
await self._authenticate()
File "/usr/local/lib/python3.10/site-packages/pyintesishome/intesishomelocal.py", line 78, in _authenticate
response = await self._request(
File "/usr/local/lib/python3.10/site-packages/pyintesishome/intesishomelocal.py", line 90, in _request
async with self._web_session.post(
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in aenter
self._resp = await self._coro
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 535, in _request
conn = await self._connector.connect(
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 542, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 907, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.1.9:80 ssl:default [Connect call failed ('192.168.1.9', 80)]

Now, I don't know how this all works but i can see that its trying to use port 80, In Australia some ISP's block specific incoming ports, and 80 is one of them, however, I use Cloudflare to connect to my home assistant from outside the house and so in an attempt to bypass that issue I added another host in the cloudflared addon im using and called it "intesishome.mydomain.casa" and pointed it at "http://192.168.1.9:80" I then used the new address in the intesishome_local setup it came up with "An error occurred connecting to the IntesisHome API." but this time no log.

I don't know if due to the nature of your addon or the process of making it local, it was never going to work, but I figured I would give it a shot.
Again, thanks for your time.

from hass-intesishome.

jnimmo avatar jnimmo commented on July 25, 2024

I'll have a think on the local one there, but if you throw in a debug for the following would be great too (even just for one disconnection)
logger:
logs:
pyintesishome: debug

from hass-intesishome.

Jimmypl007 avatar Jimmypl007 commented on July 25, 2024

I'll have a think on the local one there, but if you throw in a debug for the following would be great too (even just for one disconnection) logger: logs: pyintesishome: debug

I have added it and I will get back to you as soon as I get a disconnect.

from hass-intesishome.

jnimmo avatar jnimmo commented on July 25, 2024

Thanks for that (I've removed the raw log just because it contains device IDs even though there isn't anything sensitive in there).
It looks like it still is trying to send the keep alive after a connection drop which I need to fix.
I'll also look at shortening the length of time to wait for a first reconnection attempt, i.e. 30 seconds rather than 300 in this case.

from hass-intesishome.

Jimmypl007 avatar Jimmypl007 commented on July 25, 2024

Thanks, let me know if i can add anything else.

from hass-intesishome.

jamhos avatar jamhos commented on July 25, 2024

Not sure if it's helpful, but I've had debug logging turned on for the last few days just to check, without any drops in connection. I had 1.0.2 running up until yesterday, upgraded to 1.0.4, and still haven't had any issues since.

My device is IS-ACX-WIFI-BT-1 (unfortunately also doesn't support local connection) via IntesisHome (I think @Jimmypl007 is Anywair or Airconwithme?) - perhaps there's something different with those cloud servers.

from hass-intesishome.

Jimmypl007 avatar Jimmypl007 commented on July 25, 2024

Not certain about anywair or airconwithme but I use intesisHome in this add-on to set up the device... maybe I'm using the wrong one??? the device in the roof just says intesis (the wifi device)

from hass-intesishome.

Jimmypl007 avatar Jimmypl007 commented on July 25, 2024

Ahh yeah okay.

from hass-intesishome.

Jimmypl007 avatar Jimmypl007 commented on July 25, 2024

I have asked my dad to try using the app if he catches it during a dropout.. to see if the device itself is faulting..

from hass-intesishome.

jnimmo avatar jnimmo commented on July 25, 2024

Hey @Jimmypl007, if this is still an issue, you could try editing line 426 https://github.com/jnimmo/hass-intesishome/blob/master/custom_components/intesishome/climate.py#L426 to reduce the time for automatic reconnect, 10 minutes is pretty high. In a future release I'll probably drop this down to between 10 and 120 seconds or something; and double check that if trying to send a command it will try and immediately reconnect rather than waiting. Additionally, is the Home Assistant device connecting on wifi or ethernet? Definitely worth trying to get it onto a wired connection if on wifi.

from hass-intesishome.

Jimmypl007 avatar Jimmypl007 commented on July 25, 2024

Yeah, it still is disconnecting.
I updated about a week ago when I noticed your last update (thanks for that), So far it has reduced the errors from thousands a week to only a couple hundred or so, but I guess that is because it no longer checks-(something) when it had lost connection.

Right before I updated I had noticed that after a week or so of running without a restart of HA the aircon would eventually give up trying to re-connect (my parents won't even tell me when it's not working anymore.. :P), I don't know if that is still an issue after this update but I will let you know if that occurs again.

I will try what you suggested with shortening the connection attempt time, I'm not sure how it all works BUT I noticed the log states that the aircon is only "unavailable" 1 to 10 minutes from when it reconnects (which lines up with the code you linked above), whereas if you look at the graph you can see the temperature stops updating for a about 30 or so minutes before it realises it's no longer connected. link to what I'm talking about. (NOTE: the steps between each temperature update on the graph were about 4 to 5 minutes apart. so i guess it should have updated around 10:51 am the end of the line is exactly when it becomes unavailable which I circled in red)

It seems to me that the program doesn't know that it has lost connection for a decent amount of time before it updates as "unavailable" obviously that means it only will try re-connect after it realises it dropped out, but that means it could be up to a 30 minutes wait (based on the graph). obviously reducing the time for connection attempts after it knows it has disconnected will help reduce overall dropout time but it would be great if it figured it has lost connection faster. I guess though that's what those repeated checks were supposed to do?

Lastly, my pi is connected via ethernet to the router, and the device for the aircon is wirelessly connected (no ethernet option on that). I will check to make sure I don't have any power cables too close to the ethernet when I am back there, but I figure that if that was the issue it would appear in other ways with my HA.

Thanks, Heaps for you all the work you do, and your help with this.
Edit: bought ya some coffee for your trouble' thanks again for your time so far even if this is just something faulty on my side..

from hass-intesishome.

Jimmypl007 avatar Jimmypl007 commented on July 25, 2024

This is just an update comment, to let you know I did respond to the question, also if you need a new link to the image above (the link is now dead) then let me know.

from hass-intesishome.

Related Issues (11)

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.