Legrand/Bticino MyHome

Hello,

i try to integrate LEGRAND Shutters ( celiane switches, controled by Home+ App ) to Home assistant.
does it can work with your integration ? how to install ?
( i have a Pi4 + Conbee2 usb key )
thanks

Hi, I assume you’re talking about the Zigbee devices from Legrand?
In that case, no, this will not work with this integration, it is only meant for wired SCS bus.

1 Like

Hi,
I’m very interested to your work as I got bticino SCS centralized shutter control at home and I bought a MH201 “gateway” to connect them to Homeassistant. I was able to use them with Sdomotica as nikiciccio too and I would like to test your integration.
Unfortunately I’m not a pro user with homeassistant and I don’t understand how to proceed for the installation.
Can you please give me a hint on how to proceed? I don’t ask for complete instructions, just give me a direction and then I’ll do the required researchs :slight_smile:

Many thanks in advance!

1 Like

I’m working on a way to make this part more accessible.
I’ll try to make the integration compatible with HACS, so if you are a HACS user, you can just install it simply through there.
This will take a bit of time an I’m a bit busy at the moment, so I’ll let you know when it’s ready!

1 Like

Thanks Julien, that would be very appreciated :slight_smile:
In the meantime I added the two repositories folders to the custom components but then I got the same as hST (“But when I try to install it just stops after a while with a popup that just says that it has stoped.”), just fyi.

OK, you can now add “https://github.com/anotherjulien/MyHOME” as a custom repository in HACS :slight_smile:
In there, the first (and for now only) version available for install will be 0.7

I’ve tested the deployment from scratch on a RPi 3b+ and it worked without issues, so hopefully it’ll work fine for everybody :slight_smile:

Hi Julien,

you’ve been very quick, I can confirm that the integration installed correctly from HACS :slight_smile:, me too I’m using a RPi 3b+.
When I try to add the integration from the settings I get the no gateway found message though.
Using the python3.8 -m OWNd -v 2 command with gateway IP port and password (as hST tried before) it is able to connect to the MH201 and it correctly listens to the commands sent by the cover buttons.
Do you think this is an issue with the MH201 not being a “real” gateway but a scenario module?
Thanks for your work, if there’s something I can try or you would like to test, please let me know.

Hi julien, I’m trying to use your integration but I get this error:

“No gateway found”

I have a MH201 on the same network.

If I try to manually configure with:

myhome:
  ip_address: 192.168.0.***
  password: *****

I get these errors in the log:

Can you help me?

If you need more info, I can give you. I’m quite skilled and I’m also a dev.

@teejay-87, config of the gateway via YAML is indeed not supported.
Both you and @Hochram are reporting issues specifically with MH201 modules, that leads me to believe something is working differently with those.
Could either or both of you run this command in you Home Assistant instance?

python3.8 /usr/local/lib/python3.8/site-packages/OWNd/discovery.py

The output should be a list of discovered gateways with a few informations.

Command python3.8 is not found on my installation (home assistant supervised), unless my HA shows it’s running on 3.8.6. Probably because it runs in docker…?

Also the file does not exists, I only have a Python3.7 directory under /usr/local/lib with a dist-packages subdir.

docker exec -it homeassistant /bin/bash

That will get you inside the actual Home Assistant container, there you can run the command.
(Ctrl-D will get you out of it once you are done)

Hi Julien, for the answer to post # 34 I need to deepen …
I will not fail to write to you.

For Discovery in docker I see

bash-5.0 # python3.8 /usr/local/lib/python3.8/site-packages/OWNd/discovery.py
Address: 192.168.1.2
Port: 20000
Manufacturer: BTicino S.p.A.
Model: MH200N
Firmware: 1.0
Serial: 00:03: ****

Address: 192.168.1.2
Port: 20000
Manufacturer: BTicino S.p.A.
Model: MH200N
Firmware: 1.0
Serial: 00:03: ****
bash-5.0 #

If it can be useful, on the page ip: 80 mh201 I see this

<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<URLBase>http://192.168.1.22:80/</URLBase>
<device>
<deviceType>urn:schemas-bticino-it:device:IP scenario module:1</deviceType>
<friendlyName>Ingresso</friendlyName>
<manufacturer>BTicino S.p.A.</manufacturer>
<manufacturerURL>http://www.bticino.it</manufacturerURL>
<modelDescription>IP Scenario Module</modelDescription>
<modelName>MH201</modelName>
<modelNumber>1.0</modelNumber>
<modelURL>www.bticino.it</modelURL>
<serialNumber>00:****:A0</serialNumber>
<UDN>uuid:upnp-IPscenarioModule-1_0-00****A0</UDN>
<serviceList>
<service>
<serviceType>urn:schemas-bticino-it:service:Reachability:1</serviceType>
<serviceId>urn:bticino-it:serviceId:Reachability</serviceId>
<SCPDURL>Reach_Serv.xml</SCPDURL>
<controlURL/>
<eventSubURL/>
</service>
</serviceList>
<presentationURL/>
</device>
</root>

Unlike the gateways, the info is probably on port 80?

edit
Last thing, if mh201 is connected, in the log this error appears (see below)
In fact, if I unplug it from the network and restart the home assistant does not exit,
and as I connect it to the network, it appears again.


2020-11-30 20:58:05 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 46, in initialize
    await scanner.async_scan(None)
  File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 74, in async_scan
    await self._process_entries(entries)
  File "/usr/src/homeassistant/homeassistant/components/ssdp/__init__.py", line 120, in _process_entries
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 130, in async_init
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 213, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/config/custom_components/myhome/config_flow.py", line 231, in async_step_ssdp
    gateway = await OWNGateway.build_from_discovery_info(discovery_info)
  File "/usr/local/lib/python3.8/site-packages/OWNd/connection.py", line 99, in build_from_discovery_info
    discovery_info["port"] = await get_port(discovery_info["ssdp_location"])
  File "/usr/local/lib/python3.8/site-packages/OWNd/discovery.py", line 190, in get_port
    resp = await session.post(ctrl_url, data=soap_body, headers=headers)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 551, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 892, in start
    message, payload = await self._protocol.read()  # type: ignore  # noqa
  File "/usr/local/lib/python3.8/site-packages/aiohttp/streams.py", line 605, in read
    await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected
bash-5.0# python3.8 /usr/local/lib/python3.8/site-packages/OWNd/discovery.py
bash-5.0# 

No detail at all.

First of all I confused the actuator with the gateway!!! (not F401s!!! sorry… but F454 or Mhserver1)
I meant that maybe the roller shutters (H4661M2) should be combined with these gateways? (F454 or Mhserver1)
In any case with another program, the advanced mode, it works for me with the mh201, but not with mh200n (the same with your component … that’s why I was trying to make mh201 work heheh)

I made a video (I send the link in private) for the heating central unit and cover advenced mode with this setting:

climate:
  - platform: myhome
    devices:
      central_unit:
        zone: "#0"
        name: Central unit
        heat: True
        cool: False
        standalone: False
        manufacturer: BTicino
        model: 3550
      zone_1:
        zone: "1"
        name: Termo Camera
        heat: True
        cool: False
        standalone: False
        manufacturer: BTicino
        model: F430/4
##etcetc
      cover_studio:
        where: "29"
        name: Serranda Studio
        advanced: True
        manufacturer: BTicino
        model: LN4661M2

Forgive the delay, but I have changed jobs and also the location … lately I have little time, and I have difficulty writing in English: D

Hi Julien,

the discovery command gives me no output, just like teejay-87.
I also have the same errors in the log.

I just published a minor version of the OWNd library.
Could you guys try to edit manifest.json in the custom_component/myhome folder and change the requirement to "requirements": ["OWNd==0.7.12"],

Then you’ll need to restart Home-Assistant and test again.

Thanks!

1 Like

YESSS!!!
myhome1 myhome2

myhome4

2 Likes

Thanks! It works!

Hi all, I am currently using Sdomotica, but i would like to give a try to this integration for my personal understanding of home assistant integrations. Can anybody explain me how to install the integration? To avoid overlapping with my preexisting HA instance, I am now running on a separated docker.
I own a MHS1 server and a myhometouch that usually can act as a gateway. I own the bticino alarm 3486 and central 3550.
Sorry but I do not know how to perform basics steps
I hope that when it will be up and running I can give some help just in case
Ciao

It works!!
Great job! :smiley:

@gabriele.rendina you have first to install HACS on your Home Assistant and then install the myhome integration, you will find it in the list of available integrations.