Legrand/Bticino MyHome

@caiosweet, I’ve tested with a second gateway and found a bug that might explain the problem you had.
If you configured a gateway with no sensors at all, when it received a WHO=18 message, it crashed the listener.
I’ve now fixed it and I can confirm it works fine with 2 gateways! You can even configure the same device on 2 gateways on the same bus and control the device simultaneously with both!
Can you test and confirm it works for you too?

1 Like

Hit the nail on the head. :anger: Excellent!

Has anyone else been able to test with an F422 bus extender?
I’d really like to be sure of what actually works and what doesn’t before packaging the release.

Ehi Julian, my system consists of two BUS and two power supplies (day/night) joined by a f422. :slight_smile:

oh nice, I didn’t realize!
So, were you able to use connect devices with a different bus interface to the integration?
Is there something not working?

I haven’t found, at the moment, anything unusual.

OK, cool :slight_smile:
So commands sent from HA on a different interface works, and status feedback works as well?
Do you have both lights and covers (WHO 1&2) behind the F422?

Yes!

I only have the warnings of some messages that I have never understood what it is and the reconnection of the gateway

Logger: custom_components.myhome
Source: custom_components/myhome/gateway.py:140
Integration: MyHome (documentation, issues)
First occurred: 09:30:03 (161 occurrences)
Last logged: 18:00:05

Data received is not a message: None
Logger: custom_components.myhome
Source: custom_components/myhome/gateway.py:137
Integration: MyHome (documentation, issues)
First occurred: 10:22:56 (8 occurrences)
Last logged: 17:22:55

Connection interrupted, reconnecting...

…So everything normal.

OK, I need a bit more work to allow the services (send_message etc…) to work with multiple gateways.

I’ll also try to make the logging more explicit for the “Data received is not a message” logs.
It’s probably messages that OWNd does not know how to parse, but at the moment it just drops them and sends back None, I’m very curious what they are!

I’ve also changed a lot in the logging to include information about which gateway is generating the logs.

I think it won’t be very long before I can publish a packaged version of 0.9 :crossed_fingers:

I’ll install and I’ll let you know…

Just to know:
At every start of the raspberry, this error appears.

Logger: custom_components.myhome
Source: custom_components/myhome/gateway.py:405
Integration: MyHome (documentation, issues)
First occurred: 18:51:12 (2 occurrences)
Last logged: 18:51:19

Could not send message *#25*331##.
Could not send message *#25*371##.

But I noticed that only on reboot it does this. (config with mh202n)

EDIT
Perhaps the OWNd update is missing… (Return raw str instead of None when parsing fails)

Logger: custom_components.myhome
Source: custom_components/myhome/gateway.py:140
Integration: MyHome (documentation, issues)
First occurred: 19:00:02 (2 occurrences)
Last logged: 19:00:02

Data received is not a message: None

I’ve not published the new OWNd to pypi yet, I’m waiting to be sure I don’t have anything else to add before publishing it :wink:

Here we go, I’ve pushed the new OWNd, and the current master is (barring any major bug left) the one I’ll package and publish.

I was pretty sure it was the time/date :innocent: :rofl:

Logger: custom_components.myhome
Source: custom_components/myhome/gateway.py:145
Integration: MyHome (documentation, issues)
First occurred: 21:20:01 (3 occurrences)
Last logged: 21:20:03

[MH201 gateway - 192.168.1.22] Data received is not a message: `*#13**#0*21*20*00*##`
[MH201 gateway - 192.168.1.22] Data received is not a message: `*#13**#1*0F*26*02*2023##`
[MH200N gateway - 192.168.1.2] Data received is not a message: `*#13**#0*21*20*00*##`

ah, nice, I’ll work on that then :slight_smile:
it’s weird, I was certain I parsed those correctly…
anyway, back to work :smiley:
(by the way, did you notice the “`” around the messages? this way if someone pastes the logs in the forum, the messages are not interpreted as formating :wink: )

Yes, but I didn’t understand the reason. Now it’s clear :laughing: Cool! :+1:

Hi, how can enable logs as yours?
Thank You

I have updated to the latest Master version.
For the logs, I in the home assistant configuration yaml have:

loggers:
   default: warn

WTF?!? this is a “date set” message, and the day of the week is 0F? there’s not supposed to be letters in there!!!

mmm I don’t know … but I have an automation at the start of home assistant and it repeats every two hours … it could be the service:

      - service: myhome.sync_time
        data: {}

I will check better!

Questo errore ha avuto origine da un'integrazione personalizzata.

Logger: custom_components.myhome
Source: custom_components/myhome/gateway.py:442
Integration: MyHome (documentation, issues)
First occurred: 21:54:05 (1 occurrences)
Last logged: 21:54:05

[MH200N gateway - 192.168.0.6] Could not send message `*#1*20##`.

how can I switch a light with address 20?
also I cannot use anymore a command to a group using #1 (#group) as A PL