Legrand/Bticino MyHome

Hey Julien, after the last update of Hassio I’ can’t read anymore the power meter. The log reports:

2021-03-08 08:00:00 ERROR (MainThread) [custom_components.myhome] Could not send message #1872*#1200#1*125##.
2021-03-08 08:00:00 INFO (MainThread) [custom_components.myhome] Command session closed.

I’ve tried restarting hassio and Myhomeserver1 but nothing changed. Addres of power meter is correct.
Could you help me?
Thank you!

Hi, by latest version, I suppose you mean Home Assistant OS 5.12, supervisor-2021.03.4, core-2021.3.2?
That’s what my test setup is running and I’m not facing the problem, this is weird…
Can you enable debug logging, give it another go and collect the logs?

Yes, Home Assistant OS5.12, core-2021.3.2.
This is with debug mode enabled:
2021-03-08 14:56:17 INFO (MainThread) [homeassistant.components.automation.recupera_energia_prese_1_piano] Recupera energia prese 1 piano: Executing step call service
‘’’
2021-03-08 14:56:17 INFO (MainThread) [custom_components.myhome] Opening command session.
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Negotiating command session.
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Reply: #1##
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Received SHA challenge: 982##
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Detected SHA-256 method.
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Accepting challenge, initiating handshake.
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Received Ra.
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Generated Rb.
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Sending command session password.
‘2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Received HMAC response.’
‘2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Server identity confirmed.’
'2021-03-08 14:56:17 ERROR (MainThread) [custom_components.myhome] Could not send message '
#18
73*#1200#1125##.’
'2021-03-08 14:56:17 INFO (MainThread) [custom_components.myhome] Command session closed.
2021-03-08 14:56:21 DEBUG (MainThread) [custom_components.myhome] Received: #185127
113333##
2021-03-08 14:56:22 DEBUG (MainThread) [custom_components.myhome] Received: #185124
113*0##’
‘’’
Thank you

Can you edit your post to format the logs using the “Preformatted text” block in the text editor?
Currently, the thread interprets text between * as italic, this makes it difficult to read, especially since OpenWebNet messages have a lot of * :confused:

Sorry, immediately:

2021-03-08 14:56:17 INFO (MainThread) [homeassistant.components.automation.recupera_energia_prese_1_piano] Recupera energia prese 1 piano: Executing step call service
2021-03-08 14:56:17 INFO (MainThread) [custom_components.myhome] Opening command session.
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Negotiating command session.
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Reply: *#*1##
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Received SHA challenge: *98*2##
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Detected SHA-256 method.
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Accepting challenge, initiating handshake.
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Received Ra.
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Generated Rb.
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Sending command session password.
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Received HMAC response.
2021-03-08 14:56:17 DEBUG (MainThread) [custom_components.myhome] Server identity confirmed.
2021-03-08 14:56:17 ERROR (MainThread) [custom_components.myhome] Could not send message *#18*73*#1200#1*125##.
2021-03-08 14:56:17 INFO (MainThread) [custom_components.myhome] Command session closed.
2021-03-08 14:56:21 DEBUG (MainThread) [custom_components.myhome] Received: *#18*5127*113*333##
2021-03-08 14:56:22 DEBUG (MainThread) [custom_components.myhome] Received: *#18*5124*113*0##

There’s also this error:

2021-03-08 15:28:49 INFO (MainThread) [custom_components.myhome] Unsupported message type: *#4*4#1*#20*0##
2021-03-08 15:28:49 DEBUG (MainThread) [custom_components.myhome] Received: *#4*4#1*20*0##
2021-03-08 15:28:59 DEBUG (MainThread) [custom_components.myhome] Received: *#18*5127*113*177##
2021-03-08 15:29:08 DEBUG (MainThread) [custom_components.myhome] Received: *#18*5125*113*33##
2021-03-08 15:29:11 DEBUG (MainThread) [custom_components.myhome] Received: *#4*7#1*#20*0##
2021-03-08 15:29:11 INFO (MainThread) [custom_components.myhome] Unsupported message type: *#4*7#1*#20*0##

Reviewing my code, I see that this error message (Could not send message) is only logged when the message is sent, but the gateway replied with a NACK (so *#*0##).
Are you able to send *#18*73*#1200#1*125## with another program? Like the openwebnet client from Legrand / bTicino?

Tomorrow I’ll try and let you know.
Thanks

I’ve tried with OpenWebNet Client but i’m not familiar with this.
This is the output:


It seems that’s converting my command in a broken way? I’m writing the command correctly?
Thank you

The correct command format is the first and last you ran, the response to the command is here concatenated with the command itself, and it’s a NACK as well :unamused:

So this means the problem is either in the gateway, or in the sensor (F520 I suppose?).
Is the sensor correctly powered on? Can you restart it?

It’s a F522, after some trouble I made it working but unfornately now it stopped.
Before asking your help I’ ve restated all my home component but nothing changed.

I’m afraid I can’t do much to help here.
If you get a NACK when using the official OpenWebNet client, then we’ve established the issue is within the MyHome installation, not in this integration.

I finally resolved! There was probably a problem with hacs, i reinstalled your component from zero copying the folder downloaded from github and now all is working great.
Your component is awesome! Sorry for wasting your time

Hello,I have a myhomeserver1 that is properly recognised by HA. I do not know my
OpenWebNet address of my devices. Anyone know how I can find them?

Hello everybody,

I just installed the MyHome integration with HACS and i’m facing an issue.
Home Assistant returns this error: Le flux de configuration n’a pas pu être chargé (The configuration flow could not be loaded).

When i look the logs i have:

  • from OWNd (warning): Connection requires a password but none was provided, trying default.
  • then config_flow (error): asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of undefined expected bytes (not the full stack trace).
    I was wondering if the second is due to the warning that says i don’t provide the password. During the add process in Home Assistant, there is no box asking me to give it.

For the context, Home Assistant runs in a docker container on a Raspberry Pie4 which runs with Ubuntu Server 20.04. The Bticino web server is a F454 on the same network as the Raspberry Pie. The docker is configured to use the host network.

Any ideas ?
Thanks a lot for your help :slight_smile:

Hello ZamaPower,
On my side, i had to remove the switches to get the OpenWebNet address, you have jumpers behind. Or easy way, if the web server is already configured, you can get the adresses by using MyHome application (Create a new project then load myhomeserver1 configuration).

Thanks for the reply! I’m in the MYHOME_UP app but the only information i find is the model and the id of the switch nothing that lookss like the OpenWebNet address.

No, i talk about MyHome_Suite on Windows. I have never tested MYHOME_UP but maybe you can get this information on it.

Hi julien,

i am using your integration for a while now and everything is working fine.
still strugeling with my legrand sensors, they are in the config file as a binary sensor(see picture)
but they produce no inputs.
can you give it a look ??
thanks :face_with_monocle:

Hi!

Based on the technical documentation I could find for these, I think they only act as “commands” (as in a wall switch).
Apparently you configure them with the A/PL of the lights you want to switch on when motion is detected, right?
If so, it means it does not broadcast events for motion on the bus.
What they do is “just” send an ON command for the given A/PL when motion is detected, and an OFF command when it times out.

So unfortunately, you cannot use them as binary sensor.
As far as I understand, you cannot use their motion sensing capabilities at all outside the bus.
They’re basically automatic wall switches as far as OpenWebNet is concerned… :slightly_frowning_face:

ok,

so i need toe set them up as CEN/CEN+ events ?
doyou have an example ?