Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

X1 e Omni - Action ok but States no updating #278

Open
4 tasks done
JeedHome44 opened this issue Dec 17, 2022 · 20 comments
Open
4 tasks done

X1 e Omni - Action ok but States no updating #278

JeedHome44 opened this issue Dec 17, 2022 · 20 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@JeedHome44
Copy link

Checks

  • I have searched the existing issues and no issue is describing my issue
  • I have checked the FAQ
  • I have checked the documentation
  • I have installed the latest version

The problem

Hello,

I can send action to my X1 e Omni but states not updating.
when i reload Deebot Integration, states update.

Can you do a 1 minute cron to reload integration ?

Diagnostics information

i don't know what is it

Anything in the logs that might be useful for us?

No response

Additional information

No response

@JeedHome44 JeedHome44 added the bug Something isn't working label Dec 17, 2022
@mrbungle64
Copy link

@JeedHome44

Diagnostics information

i don't know what is it

https://www.home-assistant.io/integrations/diagnostics/

@edenhaus
Copy link
Contributor

Please add the diagnostic information and debug logs

@edenhaus edenhaus added the need-more-information Need more information label Dec 19, 2022
@JeedHome44
Copy link
Author

Sorry i don't find where is it :(

@JeedHome44
Copy link
Author

Where can i have diagnostic ? I don't find it !

I think Home Assistant disconnect when i go to the Ecovacs App in my iPhone.

@edenhaus
Copy link
Contributor

Please follow the link above for instructions

@JeedHome44
Copy link
Author

image

Is it this information ?

@JeedHome44
Copy link
Author

Hello,

It works perfectly with Deebot refresh fonction.
I do multi automation to have reload states when i change one like this:

- id: 'XXXXXXXX'
  alias: Deebot X1 Eau Refresh
  description: ''
  trigger:
  - platform: state
    entity_id:
    - select.pumba_water_amount
  condition:
  - condition: or
    conditions:
    - condition: state
      entity_id: select.pumba_water_amount
      state: low
    - condition: state
      entity_id: select.pumba_water_amount
      state: medium
    - condition: state
      entity_id: select.pumba_water_amount
      state: high
    - condition: state
      entity_id: select.pumba_water_amount
      state: ultrahigh
  action:
  - service: deebot.refresh
    data:
      part: Water
    target:
      device_id: YYYYYYYYYYY
  mode: single

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 30, 2022
@KapUttyy
Copy link

KapUttyy commented Jan 2, 2023

I have the exact same issue with my Deebot X1 Omni.

Here in Germany the Internet Connection with DSL-connections are forced to drop every 24h.
At the exact same time of the forced disconnect at 02:35:10 the following warning is in the debug-log:
2023-01-02 02:35:05.613 DEBUG (MainThread) [gmqtt.client] [QoS query IS EMPTY] 2023-01-02 02:35:10.113 WARNING (MainThread) [gmqtt.mqtt.protocol] [EXC: CONN LOST] Traceback (most recent call last): File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 854, in _read_ready__data_received data = self._sock.recv(self.max_size) ConnectionResetError: [Errno 104] Connection reset by peer 2023-01-02 02:35:10.114 DEBUG (MainThread) [gmqtt.mqtt.handler] [CMD 0xe0] b'' 2023-01-02 02:35:10.115 WARNING (MainThread) [gmqtt.mqtt.protocol] [TRYING WRITE TO CLOSED SOCKET] 2023-01-02 02:35:10.118 INFO (MainThread) [gmqtt.client] [RECONNECT] ignored error while disconnecting, trying to reconnect anyway 2023-01-02 02:35:16.649 INFO (MainThread) [gmqtt.mqtt.protocol] [CONNECTION MADE] 2023-01-02 02:35:16.667 DEBUG (MainThread) [gmqtt.mqtt.handler] [CMD 0x20] b'\x00\x00' 2023-01-02 02:35:16.667 DEBUG (MainThread) [gmqtt.mqtt.handler] [CONNACK] flags: 0x0, result: 0x0

3 Minutes later the following error at 02:38:08 the following Error is printed in the Debug-Log:
`2023-01-02 02:38:08.730 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/usr/local/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.10/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/usr/local/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/tado/init.py", line 83, in
lambda now: tadoconnector.update(),
File "/usr/src/homeassistant/homeassistant/util/init.py", line 192, in wrapper
result = method(*args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/tado/init.py", line 176, in update
self.update_devices()
File "/usr/src/homeassistant/homeassistant/components/tado/init.py", line 186, in update_devices
devices = self.tado.getDevices()
File "/usr/local/lib/python3.10/site-packages/PyTado/interface.py", line 170, in getDevices
data = self._apiCall(cmd)
File "/usr/local/lib/python3.10/site-packages/PyTado/interface.py", line 81, in _apiCall
response = self._http_session.request(method, url, timeout=self.timeout,
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 547, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))`

As there is also tado in the second error, maybe this is not Deebot related, but the first error is at the exact same time as my disconnect and correlates with the other debug info from Deebot-Integration. Maybe the connection should be renewed automatically in a configurable interval. The integration stops working after this disconnect, as new calls do not update correctly after the disconnect.

@github-actions github-actions bot removed the stale label Jan 2, 2023
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jan 10, 2023
@edenhaus
Copy link
Contributor

@Utty88 The tado exceptions has nothing to do with this integration.
This integration can handle reconnection automatically. Are you getting a new ip after the reconnect?

@github-actions github-actions bot removed the stale label Jan 14, 2023
@KapUttyy
Copy link

KapUttyy commented Jan 16, 2023

@edenhaus yes, I get a new IPv4 after every reconnect.
I have now solved the issue with the shell_command integration. I have created a shell command to restart the integration every day at 6:30am triggered by an automation. That works fine for the moment for me.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jan 24, 2023
@edenhaus
Copy link
Contributor

Ok we leave this as workaround. Normally a reconnect should work, but in your case you get a new ip and probably ecovacs is not allowing the same token on another ip adress.

Adding a check for a new ip for your edge case is a over kill. At least for now, where I'm short on time. Please feel free to add it yourself if you want a proper solution

@github-actions github-actions bot removed the stale label Jan 24, 2023
@KapUttyy
Copy link

As I am an IT guy, but not a developer, I am not able to add this with a pull request, which is really unfortunate.
As speaking for germany I am pretty sure that this is not an edge case as with DSL connections the 24h disconnect with assigning new IPs is pretty standard here since the beginning of the broadband internet era.

@edenhaus edenhaus added enhancement New feature or request and removed need-more-information Need more information labels Jan 25, 2023
@matteoopc
Copy link

@edenhaus yes, I get a new IPv4 after every reconnect. I have now solved the issue with the shell_command integration. I have created a shell command to restart the integration every day at 6:30am triggered by an automation. That works fine for the moment for me.

can you share the command? Thank you

@KapUttyy
Copy link

Sure, here it is:

This here has to be in the configuration.yaml. You have to figure out your individual AddOn ID and place it there. I don't remember anymore how to figure that out... You also have to create an API-KEY and to replace your own called URL for the HA.

shell_command:
  restart_deebot: curl -X POST "https://[URL]/api/config/config_entries/entry/[Individual-AddOn-ID]/reload" --oauth2-bearer "[API-KEY]"

My Automation in HA is the following:

trigger:
  - platform: state
    entity_id:
      - sensor.fritz_box_7590_ax_external_ip
    for:
      hours: 0
      minutes: 10
      seconds: 0
condition: []
action:
  - service: shell_command.restart_deebot
    data: {}
mode: single

It triggers 10 minutes after my external IP changed and calls the custom shell command.

Hope you can use that ;-)

@matteoopc
Copy link

Certo, ecco qui:

Questo qui deve essere nel file Configuration.yaml. Devi capire il tuo ID AddOn individuale e inserirlo lì. Non ricordo più come capirlo... Devi anche creare una API-KEY e sostituire il tuo URL chiamato per l'HA.

shell_command:
  restart_deebot: curl -X POST "https://[URL]/api/config/config_entries/entry/[Individual-AddOn-ID]/reload" --oauth2-bearer "[API-KEY]"

La mia automazione in HA è la seguente:

trigger:
  - platform: state
    entity_id:
      - sensor.fritz_box_7590_ax_external_ip
    for:
      hours: 0
      minutes: 10
      seconds: 0
condition: []
action:
  - service: shell_command.restart_deebot
    data: {}
mode: single

Si attiva 10 minuti dopo la modifica del mio IP esterno e chiama il comando della shell personalizzata.

Spero che tu possa usarlo ;-)

Thank you. I have a doubt, how do I create the API key?

@KapUttyy
Copy link

Thank you. I have a doubt, how do I create the API key?

If you click on your Profilename in the left corner all the way down, and scroll all the way down through your profile configuration page. You can create Longterm Access Tokens. That's it.

@matteoopc
Copy link

Grazie. Ho un dubbio, come creo la chiave API?

Se fai clic sul nome del tuo profilo nell'angolo sinistro fino in fondo e scorri fino in fondo la pagina di configurazione del tuo profilo. Puoi creare token di accesso a lungo termine. Questo è tutto.

Works! Thank you!!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants