Legrand/Bticino MyHome

I don’t have any of those, so I can’t even know what configuration is possible on them!
From the limited information I have, I think they’re just unusable…

Hello Julien :wave:,
Any ideas ?

Sorry, I forgot about you :sweat_smile:

Can you enable debug logging and provide those?
The few error/warning logs you have are not really speaking to me… :unamused:

In any case, yes, if the integration asks for the OpenWebNet password, you must provide it, else it will inevitably fail.
If your gateway is configured to not require a password, the integration would not ask for it.

Hello everyone, I am very unfamiliar with home assistant and am trying to learn.

Let me explain my situation:
At the moment Home Assistant is running on a Synology NAS through Docker.
I installed HACS and I can see the custom integration “MyHome”, then I realized that I need OWNd as well.

What I can’t figure out is how to install OWNd?
Is there a particular folder that needs to be created? And where?
Would you be so kind as to explain how to do this? I’ve searched everywhere but I don’t understand much.

I have a bTicino alarm system so I could help test this integration.

Thank you in advance for your kind replies.

P.S. I’m Italian and I understand that almost everyone in this discussion is.

Here are the logs:
When i start Home Assistant i have:

Logger: homeassistant
Source: custom_components/myhome/config_flow.py:131
First occurred: 11:43:12 (1 occurrences)
Last logged: 11:43:12

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 48, in initialize
    await scanner.async_scan(None)
  File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 82, in async_scan
    await self._process_entries()
  File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 129, in _process_entries
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 133, in async_init
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 216, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/config/custom_components/myhome/config_flow.py", line 244, in async_step_ssdp
    return await self.async_step_test_connection()
  File "/config/custom_components/myhome/config_flow.py", line 131, in async_step_test_connection
    test_result = await test_session.test_connection()
  File "/usr/local/lib/python3.8/site-packages/OWNd/connection.py", line 183, in test_connection
    result = await self._negotiate()
  File "/usr/local/lib/python3.8/site-packages/OWNd/connection.py", line 285, in _negotiate
    raw_response = await self._stream_reader.readuntil(OWNSession.SEPARATOR)
  File "/usr/local/lib/python3.8/asyncio/streams.py", line 629, in readuntil
    raise exceptions.IncompleteReadError(chunk, None)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of undefined expected bytes

If i try to re-add MyHome integration, i have:

Logger: aiohttp.server
Source: custom_components/myhome/config_flow.py:131
First occurred: 11:51:29 (1 occurrences)
Last logged: 11:51:29

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 129, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 117, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 69, in post
    result = await self._flow_mgr.async_init(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 133, in async_init
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 216, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/config/custom_components/myhome/config_flow.py", line 86, in async_step_user
    return await self.async_step_test_connection()
  File "/config/custom_components/myhome/config_flow.py", line 131, in async_step_test_connection
    test_result = await test_session.test_connection()
  File "/usr/local/lib/python3.8/site-packages/OWNd/connection.py", line 183, in test_connection
    result = await self._negotiate()
  File "/usr/local/lib/python3.8/site-packages/OWNd/connection.py", line 285, in _negotiate
    raw_response = await self._stream_reader.readuntil(OWNSession.SEPARATOR)
  File "/usr/local/lib/python3.8/asyncio/streams.py", line 629, in readuntil
    raise exceptions.IncompleteReadError(chunk, None)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of undefined expected bytes

Regarding the password, the gateway is configured with a password (not the default one) and MyHome integration doesn’t prompt me the box to give it. In case of it was due to the browser, i tried with Firefox and Chrome, same result.

Small add if it can be useful, F-454 authentication is set to “low security” not high with HMAC.

Thanks for your help

Would you be able to force the OWNd requirement to 0.7.24 to test?
You just need to edit the manifest.json file, and edit the line that says "requirements": ["OWNd==0.7.23"], to set it to 0.7.24, and restart Home Assistant so it installs the new version of the library.

If it works, I’ll push the change for the next release.

Hi,

OWNd should be installed automatically by Home Assistant, you have nothing to do for that part.

By the way, the development on the Alarm part has been halted because there is very little that can be done with it. It is by design not meant to be controlled through OpenWebNet.
The only thing that would be possible would be to collect status of the zones, but I’m not sure it’s of any real value.

Ah, good, I thought I’d have to integrate it manually, although to tell the truth I can’t find any OWNd-related files in the MyHome folders, bah!

What I did was:

  1. Add your repository on HACS
  2. Install the repository from HACS
  3. Go to Settings>Integrations look for “MyHome” and install the integration.

Right now I don’t have a chance to test it on the system as I have retrieved a Raspy as I found it more convenient for managing HA and so I will remove the Docker installation from the Synology NAS.

As soon as I can access the system I will check if it will be possible to see at least the status of the alarm sensors, I hope so!

In any case thank you very much for your kind reply and the great work you are doing.
Have a great day!

Hi Julien,
I changed the OWNd requirements version to 0.7.24, i have restarted Home Assistant but still an error :roll_eyes:.

Logger: homeassistant
Source: data_entry_flow.py:229
First occurred: 18:27:10 (1 occurrences)
Last logged: 18:27:10

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 48, in initialize
    await scanner.async_scan(None)
  File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 82, in async_scan
    await self._process_entries()
  File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 129, in _process_entries
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 133, in async_init
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 229, in _async_handle_step
    if result["type"] not in (
TypeError: 'coroutine' object is not subscriptable

Does it rign a bell to you ? Maybe i should add the web-server manually ?

Unfortunately, these logs are from Home Assistant itself, not the integration.
They don’t tell me anything about what’s wrong.

Can you post the integration’s debug logs?

It seems related to the password but the integration (MyHome) never asked me to provide it.

Logger: custom_components.myhome
Source: /usr/local/lib/python3.8/site-packages/OWNd/connection.py:292
Integration: MyHome (documentation, issues)
First occurred: 12:09:46 (1 occurrences)
Last logged: 12:09:46

Connection requires a password but none was provided while opening test session.

How do you define the security settings (authentication, allowed ip range, these kind of things) of your Bticino web-serveur ?

you didn’t chose to “ignore” the gateway in the integration page, right?
Because with this error, the next step is the password prompt.
It’s really difficult to try to diagnose this without the actual logs, and just the 2 or 3 lines that are in the “logs” page of home assistant; because that provides nearly no context.

I have my F454 configured with high security and no ip range is configured to bypass the password; but there is a wide panel of different kind of setups among users in this regard.

No, i didn’t “ignore” the gateway in the integration. When i installed MyHome integration through HACS, HA didn’t discover the gateway automatically like Synology NAS or Sonos speaker. It’s wierd, i have the same setup as you regarding the gateway.
I have reinstalled the integration and i have this, if it tells you more:

Logger: aiohttp.server
Source: custom_components/myhome/config_flow.py:131
First occurred: 16:38:20 (1 occurrences)
Last logged: 16:38:20

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 129, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 117, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 69, in post
    result = await self._flow_mgr.async_init(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 133, in async_init
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 216, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/config/custom_components/myhome/config_flow.py", line 86, in async_step_user
    return await self.async_step_test_connection()
  File "/config/custom_components/myhome/config_flow.py", line 131, in async_step_test_connection
    test_result = await test_session.test_connection()
  File "/usr/local/lib/python3.8/site-packages/OWNd/connection.py", line 183, in test_connection
    result = await self._negotiate()
  File "/usr/local/lib/python3.8/site-packages/OWNd/connection.py", line 207, in _negotiate
    raw_response = await self._stream_reader.readuntil(OWNSession.SEPARATOR)
  File "/usr/local/lib/python3.8/asyncio/streams.py", line 632, in readuntil
    await self._wait_for_data('readuntil')
  File "/usr/local/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
  File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 848, in _read_ready__data_received
    data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer

More strange, OWNd finds the gateway:

bash-5.0# python3.8 /usr/local/lib/python3.8/site-packages/OWNd/discovery.py
Address: 192.168.X.XX
Port: 20000
Manufacturer: BTicino S.p.A.
Model: F454
Firmware: 2.0
Serial: 00:03:50:86:0F:0E

and

bash-5.0# python3.8 -m OWNd -v 2 -a 192.168.X.XX -p 20000 -P XXXXX
2021-03-20 16:15:17,410 - OWNd - INFO - Starting OWNd.
2021-03-20 16:15:17,411 - OWNd - INFO - Opening event session.
2021-03-20 16:15:17,413 - OWNd - DEBUG - Negotiating event session.
2021-03-20 16:15:17,418 - OWNd - DEBUG - Reply: *#*1##
2021-03-20 16:15:17,421 - OWNd - DEBUG - Received nonce: *#892323545##
2021-03-20 16:15:17,421 - OWNd - DEBUG - Sending event session password.
2021-03-20 16:15:17,423 - OWNd - DEBUG - Reply: *#*1##
2021-03-20 16:15:17,423 - OWNd - INFO - Event session established.

AS we like the log files :upside_down_face:

2021-03-20 16:18:45 WARNING (MainThread) [custom_components.myhome] Connection requires a password but none was provided, trying default.
2021-03-20 16:18:45 WARNING (MainThread) [custom_components.myhome] Connection requires a password but none was provided, trying default.
2021-03-20 16:18:45 WARNING (MainThread) [custom_components.myhome] Connection requires a password but none was provided, trying default.
2021-03-20 16:18:45 ERROR (MainThread) [custom_components.myhome] Error while opening test session.
2021-03-20 16:18:45 ERROR (MainThread) [custom_components.myhome] Error while opening test session.
2021-03-20 16:20:25 WARNING (MainThread) [custom_components.myhome] Connection requires a password but none was provided, trying default.
2021-03-20 16:20:25 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 129, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 117, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 69, in post
    result = await self._flow_mgr.async_init(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 133, in async_init
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 216, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/config/custom_components/myhome/config_flow.py", line 86, in async_step_user
    return await self.async_step_test_connection()
  File "/config/custom_components/myhome/config_flow.py", line 131, in async_step_test_connection
    test_result = await test_session.test_connection()
  File "/usr/local/lib/python3.8/site-packages/OWNd/connection.py", line 183, in test_connection
    result = await self._negotiate()
  File "/usr/local/lib/python3.8/site-packages/OWNd/connection.py", line 285, in _negotiate
    raw_response = await self._stream_reader.readuntil(OWNSession.SEPARATOR)
  File "/usr/local/lib/python3.8/asyncio/streams.py", line 629, in readuntil
    raise exceptions.IncompleteReadError(chunk, None)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of undefined expected bytes

Hi Julien, I ran into a funny problem:
Your component recognized 4 or 5 gateways (in the system there is also a MyHome Screen 7" and a 300X video door phone) of which I chose one and successfully accessed it and the others I ignored.
I loaded the configuration into configuration.yaml leaving the where fields empty because I didn’t have time to retrieve the OWN addresses.
The funny thing is that it only recognises the last of each type (light, switch, cover) as an entity, probably because of the empty where fields.
One question: How can I quickly retrieve the OWN addresses without using MyHome Suite?

As always, thank you in advance for your availability and your work, I would say that you could post a request for collaboration on the developer.legrand.com forum!

Hi Julien, I have a problem with a blind. In HA everything works perfectly, but if I tell google home to close the blind it says that the function is not available for the device
“la modalità non è disponibile per il dispositivo”.

I also tried to change the device from blind to curtain or shade but nothing change.

Do you have some advices?

thank you

I have the same issue! Do you already have a solution for this?

@mantovanelli.matteo & @yxmanixy; I don’t use Google Home, so I cannot test what happens.
But given that the covers DO work with home assistant, then I doubt the problem is in this integration.
Maybe the Google Home integration/API/Framework has some specific requirements? Maybe it requires that covers have status feedback and yours don’t? I don’t know… If there is detailed requirements documentation, I can try to have a look.

@FOSV, I’m afraid MyHome_Suite is the quick way… It actually depends if your installation has virtual or physical configuration. If it’s virtual, then it’s MyHome_Suite or nothing, if it’s physical, then you need to go to all your actuators (either the DIN ones in your electrical panel, or the wall mounted switches) and take note of the green jumpers used for A and PL.

@dominik978, I don’t really understand what happens here… Does it do the same thing when you try to add the gateway “manually”? (By going to the integration page; clicking “Add Integration” and selecting MyHome)

Right to start: Thank you so much for this integration!
I have some issues with the integrations in google assistant.
Until now I have used openhab, but I find the implementation of HA much better.

With the voice command in google assistant, the blinds still do not work properly. stopping does not work and when opening and closing I also get the feedback that “this function is not available”, but the blinds move anyway.
In the Google Assistant, the icons of the blinds appear as a gear. This is a typical sign that google does not recognize the blinds as these. As far as I know, there are only a limited number of symbols for google assistant, which must have a special syntax so that the correct symbols can be recognized. “Covers” should be used as shutters or blinds. Am I correct? Or do you have another solution to display the correct symbols in google assistant?

https://developers.google.com/assistant/sdk/reference/device-registration/model-and-instance-schemas#example

Oh no, I didn’t mean that your integrations doesn’t work.
Maybe I can try to set the curtain as a light, I have no interest on partial position.

I think you need to set the curtain as cover, and expose cover in google assistant.