Proscenic 790T Integration

Should that be also possible for 790T? Because on the Proscenic app is that not possible to clean a selected area :slight_smile:

Nope, it’s not possible :s. I can not add functionality not supported by the proscenic app :s

Hello,
sorry, but my english is not the best.

I have a Problem with with the integration.

The Status tell my all the time off and not docked or so on.
And I can´t also start or stop the vacuum the Home Assistant.

In the Log I can see this:
File “/config/custom_components/proscenic/vacuum_proscenic.py”, line 91, in _send_command
raise VacuumUnavailable(‘can not connect to the vacuum. Turn on the physical switch button.’)
custom_components.proscenic.vacuum_proscenic.VacuumUnavailable: can not connect to the vacuum. Turn on the physical switch button.

What can I do?

I have forgot two thinks:
I have an M7 Pro
And the Proscenic App is on an iOS device

Hi, @deblockt! I see you’ve done very good job! Nice work! I even have some ideas about how to extend the integration to wrap all the full functionality, but I’ll share them a little bit later. First I want to integrate the vacuum with your code. I have a little problem with the custom card (the vacuum integration itself is working). I followed the instructions to integrate the card, but lovelace doesn’t recognize it, I mean it says there isn’t such custom card named vacuum-card, even after HA restart.

Hm … It turned out, that the integration is not working. It can’t connect to the vacuum cleaner. I triple checked the IP, but that was not the problem. I saw that the communication between the app and the vacuum is using only port 80 and 20008, but changing the port is not making any difference. Very strange. It always says that I have to switch the side button. I checked the config parameters, but they are the same (no mistakes). I see the following error multiple times in the log:

2020-06-22 23:49:47 INFO (MainThread) [custom_components.proscenic.vacuum_proscenic] sign in to proscenic server
2020-06-22 23:50:01 DEBUG (MainThread) [custom_components.proscenic.vacuum_proscenic] do not get the map. The vacuum is not cleaning. Waiting 30 seconds
2020-06-22 23:50:18 ERROR (MainThread) [custom_components.proscenic.vacuum_proscenic] error on refresh loop
Traceback (most recent call last):
  File "/config/custom_components/proscenic/vacuum_proscenic.py", line 216, in _refresh_loop
    (reader, writer) = await asyncio.open_connection('47.91.67.181', 8888, loop = self.loop)
  File "/usr/local/lib/python3.7/asyncio/streams.py", line 77, in open_connection
    lambda: protocol, host, port, **kwds)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 962, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 949, in create_connection
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 473, in sock_connect
    return await fut
  File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 503, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('47.91.67.181', 8888)
2020-06-22 23:50:18 INFO (MainThread) [custom_components.proscenic.vacuum_proscenic] sign in to proscenic server
2020-06-22 23:50:31 DEBUG (MainThread) [custom_components.proscenic.vacuum_proscenic] do not get the map. The vacuum is not cleaning. Waiting 30 seconds

I get occasionally the status but mostly it’s off stating please check the side switch. I get no map and no controls work from HA. So its partly working sometimes.
I need to check for latest release but I think I have it already.

I also get connect call failed messages if I try to control it.

hi @gh0s7 I think that your vacuum use an old version of the firmeware. in 2018 I’ve tried your integration and it not work on my vacuum, your protocol is not supported by my vacuum, and I think that my protocol is not supported by your vacuum. Maybe that we should merge our code to support all vacums. Or maybe just upgrade your firmeware can do the job. My firmeware version are : mcu: 1.8.2614 and wifi 1.0.41.

@Engineer have you some logs about the integration to understand what is the issue?

Only the 790T proscenic vacuum is supported. I don’t have the M7 pro to perform test. I think that the two vacuum doesn’t use the same protocol.

@deblockt I updated the firmware last year … Curently it is up to date. I can check the version number later, in the evening. :slight_smile:

Log Details (ERROR)

Logger: homeassistant.components.websocket_api.http.connection.140421875121424
Source: custom_components/proscenic/vacuum_proscenic.py:92
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 8:10:56 PM (3 occurrences)
Last logged: 8:11:02 PM

can not connect to the vacuum. Turn on the physical switch button.

Traceback (most recent call last): 
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 74, in _send_command (_, writer) = await asyncio.open_connection(self.ip, 8888, loop = self.loop) 
File "/usr/local/lib/python3.7/asyncio/streams.py", line 77, in open_connection lambda: protocol, host, port, **kwds) 
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 962, in create_connection raise exceptions[0] 
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 949, in create_connection await self.sock_connect(sock, address) 
File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 473, in sock_connect return await fut
File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 503, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') 
ConnectionRefusedError: [Errno 111] 
Connect call failed ('192.168.178.59', 8888) During handling of the above exception, another exception occurred: 
Traceback (most recent call last): 
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), 
File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in async_call task.result() 
File "/usr/src/homeassistant/homeassistant/core.py", line 1295, in _execute_service await handler.func(service_call) 
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service self._platforms.values(), func, call, required_features 
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 454, in entity_service_call future.result() # pop exception if have 
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 595, in async_request_call await coro 
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 485, in _handle_entity_call await result 
File "/config/custom_components/proscenic/vacuum.py", line 183, in async_turn_on await self.device.clean() 
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 63, in clean await self._send_command(b'{"transitCmd":"100"}') 
File "/config/custom_components/proscenic/vacuum_proscenic.py", line 92, in _send_command raise VacuumUnavailable('can not connect to the vacuum. Turn on the physical switch button.') 
custom_components.proscenic.vacuum_proscenic.VacuumUnavailable: can not connect to the vacuum. Turn on the physical switch button.

These are the logs after trying to command it.

I have same mcu as you 1.8.2614 but my esp is 1.036

It is mostly shown as a status ‘Off’ but when it is working i have seen the state change to something else, i cant remember what and i’ve seen it as ‘Docked’ so it can talk to the robot. Just seems to be commands that are the problem.

Also, no map is ever found by Hassio.

The status off is set when we can not contact the vacuum.
To get the vacuum status I use the proscenic cloud server (so i don’t need to contact the vacuum), so the status can be fine, without have capability to send command to the vacuum.
Is your hass server on the same network as your vacuum?

If you perform a capture using Packet capture can you see that the app contact your vacuum using the ip 192.168.178.59 and the port 8888?

Yes, same network and the auth id etc was obtained using capture so the app can talk to the vacuum on the ip and port. This is clear in the capture. With the app there is no issue.

Are you saying the status is from the cloud? If so, that doesn’t often work either. Its strange not even the map is obtained. I will look again and double check the port 8888 is not blocked by the router.

Sadly, port 888 is fully open for the vacuum across the network. If i restart HA whilst the vacuum is working i get status but if i command it i get the following:


What am i missing? Should i uninstall completely and start from scratch maybe?

Hi,

thanks for detail.
For your first error, i have it too. But it don’t do any issue with the integration. I have a github issue to fix that. Can you copy paste your log on the issue, I will be able to test with your case. https://github.com/deblockt/hass-proscenic-790T-vacuum/issues/10.

This is strange to have a ‘ConnectionRefusedError’. In general this issue happend if the server (the vacumm) doesn’t listen on the port. You have the same issue as @gh0s7.

Can you try to run this command (from your home assistant server) telnet <your_vacuum_ip> 8888 to see if you have this result:

➜  ~ telnet 192.168.1.31 8888
Trying 192.168.1.31...
Connected to 192.168.1.31.
Escape character is '^]'.

If it not work, you can run this command (can take a time) nc -z -v <your_vacuum_ip> 1-65000 2>&1 | grep succeeded to see all openned port on your vacuum.

Trying 192.168.178.59...
telnet: Unable to connect to remote host: Connection refused
admin@ubuntu_1604:~$ nc -z -v 192.168.178.59 1-65000 2>&1 | grep succeeded
admin@ubuntu_1604:~$ ping 192.168.178.59
PING 192.168.178.59 (192.168.178.59) 56(84) bytes of data.
64 bytes from 192.168.178.59: icmp_seq=1 ttl=254 time=6.02 ms
64 bytes from 192.168.178.59: icmp_seq=2 ttl=254 time=6.34 ms
64 bytes from 192.168.178.59: icmp_seq=3 ttl=254 time=4.65 ms
64 bytes from 192.168.178.59: icmp_seq=4 ttl=254 time=4.59 ms
64 bytes from 192.168.178.59: icmp_seq=5 ttl=254 time=12.7 ms
64 bytes from 192.168.178.59: icmp_seq=6 ttl=254 time=3.93 ms
64 bytes from 192.168.178.59: icmp_seq=7 ttl=254 time=4.30 ms
^C
--- 192.168.178.59 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6008ms
rtt min/avg/max/mdev = 3.931/6.087/12.750/2.842 ms
admin@ubuntu_1604:~$ nc -z -v 192.168.178.59 1-65000 2>&1 | grep succeeded
admin@ubuntu_1604:~$ 

So I can ping it but port scan shows nothing open. After singing I started cleaning with the app and ran a second port scan but still nothing.

Hum it’s a strange issue. Maybe that your vacuum have a security and not mine, or you have a network issue.
Can you try to see if your vacuum have an udp port open?

I’m trying to reproduce the issue. I have the issue if I turn off the vacuum (using the left side red power offer button), or when the vacuum is just turn on (using the left side red power offer button) without click on the tactile power on button on the top of the vacuum.
If It’s not your case, maybe that your vacuum is on a power save mode, I will try to let my vacuum power on a long time to see if I can reproduce the issue.

Can you try to sart the cleaning using the proscenic app, and stop the cleaning using home assistant to see if it’s work?

Hi, I tried that but still no joy. Mine is always on though. Docked an charging when not cleaning or getting stuck in hard to reach places.