Legrand/Bticino MyHome

You are not missing anything, I am :smiley:
I did not consider the touch screen as a possible gateway…
I’ll add it for the next release, in the meantime you can edit the manifest.json file to add this block of code where all the other gateways are:

    {
      "manufacturer": "BTicino S.p.A.",
      "modelName": "AM4890"
    },

(Or you can replace the modelName of any other gateway with AM4890, since you will not need any of the other ones)

This should be enough to allow you to use it with the integration.

It works like a charm!!!

Thank you!

Hy Julien
I tried to install you component on Hassio but seams there is something not working.
The Integration start but nothing happens
I tried to run also the comand to check the gateway (I use an HL4684) but I’ m not able to found the OWNd seam like this library not be installed or better under user/local… there is no OWNd direcotiry
I can create by comand line but l do not understand what is not working

What kind of Home Assistant installation do you have?
I you are running HA in HassOS for example, HA is in a docker container and you would need to first run docker exec -it homeassistant /bin/bash to get inside it. There you would be able to use the OWNd commands.

But the problem is likely the same as with the AM4890 touch screen, I have not added it yet.
So same thing, you can manually edit the manifest.json file and add the HL4684 and it should do the trick.

Thank you Julien ! Function with H/L4684. At the moment I have integrated bTicino plant with Node-Red and MQTT but I’ll test your integration. I am happy that someone else has taken the integration forward. Well done

1 Like

Hi Julien, for light and switch it’s all ok. But for Heating, maybe I’ve made a wrong configuration, but I get wrong value for the read Temperature.

This is my configuration

climate:

  • platform: myhome
    devices:
    central_unit:
    zone: ‘11’
    name: Central unit
    heat: True
    cool: False
    standalone: False
    manufacturer: BTicino
    model: 3550
    zone_1:
    zone: ‘12’
    name: Living room
    heat: True
    cool: False
    standalone: False
    manufacturer: BTicino
    model: F430/4

From node red and mqtt I get the right value.
I have seen that in the OWNd library you get the value of the state of the valves and I think also the manual offset of the set temperature. Are these present in HA ?

Hi clau67, we have the same central unit.
Julien has no thermoregulation, we have to give him a hand: D

I think it’s a status update problem, it doesn’t always work. if you send the status request frames through the “myhome.send_message” service, do you see the correct data then?
for exaples:

*#4*12*0## (status temp probe 1)
*#4*12*12## (all status probe)
This is my config - Click to expand
climate:
  - platform: myhome
    devices:
      termo_central_unit:
        zone: "#0"
        name: Termo Central unit
        heat: True
        cool: False
        standalone: False
        manufacturer: BTicino
        model: 3550
      termo_camera:
        zone: "1"
        name: Termo Camera
        heat: True
        cool: False
        standalone: False
        manufacturer: BTicino
        model: F430/4
      termo_studio:
        zone: "2"
        name: Termo Studio
        heat: True
        cool: False
        standalone: False
        manufacturer: BTicino
        model: F430/4
      termo_bagno:
        zone: "3"
        name: Termo Bagno
        heat: True
        cool: False
        standalone: False
        manufacturer: BTicino
        model: F430/4
      termo_sala:
        zone: "4"
        name: Termo Sala
        heat: True
        cool: False
        standalone: False
        manufacturer: BTicino
        model: F430/4
      termo_quadro: # not implemented
        zone: "5"
        name: Termo Quadro
        heat: True
        cool: False
        standalone: True
        manufacturer: BTicino
        # model: F430/4

When everything works properly, this is the result


Yes, I’ll try to give you all the help I can !
Julien I’m not gone so deep into your code to understand how do you get data for heating.
Do you send command along the command bus or do you continuously read the event bus ?
With node-red I read from the event bus all the message and when I get

*#4

as beginning of the message then I split the message and check if the third part of the divided message is equal

0 read the Temperature,
14 read the set T,
20 is the valve state
13 is the offset Temperature.

Then I read the value in the fourth part of the message.
In this way I get ever the correct value.
To update HA I think you use the same routine you use for update status light if someone turn off or on it with the wall switch .
Is this correct ?

This is the difference

I tried to call service myhome.send_message, and read data from bus with node-red, the answer is correct, but the data show is not correct.
I get from gateway 20.3 but in frontend there is 20.6

Yes, I’ll try to give you all the help I can !

Thank you very much appreciated, surely you will be able to explain better than me :0)

This is the difference

This is interesting, knowing the status of the valve whether it is on or off! In addition to the set point and local offset.

I get from gateway 20.3 but in frontend there is 20.6

Yes, this often happens to me too, it seems, as written in the readme…

It is possible that upon first install (and updates), the OWNd listener process crashes and you do not get any status feedback on your devices. If such is the case, a restart of Home Assistant should solve the issue.

…that listening to the bus crashes, but it also happens to me for no apparent reason.

Activating debugging,

#configuration.yaml
logger:
  default: warn
  logs:
    custom_components.myhome: debug

I see all the correct data! it is as if in the frontend it does not take the data.

Example log
2020-12-11 21:30:14 DEBUG (MainThread) [custom_components.myhome] Received: *#4*4*0*0179##
2020-12-11 21:30:14 DEBUG (MainThread) [custom_components.myhome] Received: *4*1*1##
2020-12-11 21:30:14 DEBUG (MainThread) [custom_components.myhome] Received: *#4*1*12*0185*3##
2020-12-11 21:30:14 DEBUG (MainThread) [custom_components.myhome] Received: *#4*3*0*0184##
2020-12-11 21:30:14 DEBUG (MainThread) [custom_components.myhome] Received: *#4*3*14*0185*3##
2020-12-11 21:30:14 DEBUG (MainThread) [custom_components.myhome] Received: *#4*4*0*0179##
2020-12-11 21:30:14 DEBUG (MainThread) [custom_components.myhome] Received: *#4*2*13*00##
2020-12-11 21:30:14 DEBUG (MainThread) [custom_components.myhome] Received: *4*311*#2##
2020-12-11 21:30:14 DEBUG (MainThread) [custom_components.myhome] Received: *4*110*#2##
2020-12-11 21:30:14 DEBUG (MainThread) [custom_components.myhome] Received: *4*1*4##
2020-12-11 21:30:14 DEBUG (MainThread) [custom_components.myhome] Received: *#4*3*13*00##
2020-12-11 21:30:14 DEBUG (MainThread) [custom_components.myhome] Received: *4*311*#3##
2020-12-11 21:30:14 DEBUG (MainThread) [custom_components.myhome] Received: *4*110*#3##
2020-12-11 21:30:14 DEBUG (MainThread) [custom_components.myhome] Received: *#4*4*14*0185*3##
2020-12-11 21:30:15 DEBUG (MainThread) [custom_components.myhome] Received: *#4*4*13*00##
2020-12-11 21:30:15 DEBUG (MainThread) [custom_components.myhome] Received: *4*311*#4##
2020-12-11 21:30:15 DEBUG (MainThread) [custom_components.myhome] Received: *4*110*#4##
2020-12-11 21:30:17 DEBUG (MainThread) [custom_components.myhome] Received: *#4*1#1*20*0##
2020-12-11 21:30:18 DEBUG (MainThread) [custom_components.myhome] Received: *#4*3#1*20*1##
2020-12-11 21:30:19 DEBUG (MainThread) [custom_components.myhome] Received: *#4*4#1*20*1##
2020-12-11 21:30:20 DEBUG (MainThread) [custom_components.myhome] Received: *#4*2#1*20*0##

we wait for Julien what he tells us :0)

Hi guys,

My main goal was to use the facilities provided by Home Assistant and try not to add custom patched up parts together.
So right now, I continuously listen on the event bus for data coming in, the messages are turned into python “objects” by the library and passed along to the integration to update status of various entities.

I worked around the limitations of the Home Assistant climate entity as best I could, so I update the valve status as documented.
If the valve is on or off I update the HVAC_Action, now I don’t know if this does anything in the frontend. :thinking:

The local offset is integrated as well. If I take a zone for example, let’s say zone 1:
If you have the temperature set to 20°, the frontend will show 20°.
Now if you dial the local offset to +3°, the frontend will show 23°.
Now if you set the frontend temperature back to 20°, it will set the temperature to 17°, so with the local offset it will show 20°.
Now if you dial the local offset back to 0°, it will show 17° in the frontend.

I’m not sure I explain this correctly…

Then for the 0.3° difference you have… I’m really not sure what’s happening!
Having a few logs would likely help :slight_smile:

Hi all,
I did some testing and it seems as if the variations along the event bus were not read.
If you restart the system all the data is correct, but then it won’t update anymore. Activating the logs, I see all the commands and responses of the command bus, but nothing of the event bus is seen, is that correct?
I confirm that on restart the system recognizes the offset on the set temperature. But as mentioned later there is no longer any update.
I also see the problem on the lights, after a while the switch on command works the light turns on, but the status in HA does not change.
The light can no longer be turned off by HA, because having not updated the status it is turned off. If I turn it off from the switch on the wall and try to turn it back on from HA the command works again but the status does not update
I think the problem is reading the event bus or updating the HA due to changes in the event bus

Does this happen every single time?
Do you have logs of what happens when the event listener crashes?

I am installing a second home assistant on a second raspberry, because I see that having node red - mqtt and myhome active at the same time querying the same gateway creates problems.
So I create a forklift to do the tests with your integration so that I can do all the tests.

Yes, what you say is all right!

Ok, I made the video clearer and sent it to you in pvm, along with the log file.
From there you can see how your component works perfectly!
All settings are taken correctly, but what’s wrong is the lovelace part, so in the frontend.
I hope the video is clearer than words … and that it can help. :sweat_smile:
Thanks for your time and interest. :+1:

edit
I almost forgot … and thanks for adding the slave probe sensor :blush:

I’ve the same issue. When you restart HA , it won’t update anymore. I found how to restart it. Just go to the integrations, choose MYHOME, click on the three dots at the bottom right and click “reload”. The integration restart and all is updated.

1 Like

Unfortunately I had already tried, but in my case it doesn’t work. :disappointed: :frowning_face:
I just have errors similar to this for all components

2020-12-13 12:24:22 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry MH201 Gateway for light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 265, in async_setup_entry
    return await hass.data[DOMAIN].async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 155, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!

Maybe it is due to the non-gateway device? (MH201) I do not know…
Maybe, could it be that I have the recorder in memory? Now I have put the default database back on file.
And let’s see what happens.

edit
Nothing, just by sending the status request frames of the type message: "*#1*0##", everything works again.

EDIT2 Yes, it works go here

Unfortunately it is exactly the same problem that I also had when I tried to develop the integration, the command bus works but the updating of the status of the lights does not work.
I only installed myhome on a new raspberry and it works the same as I saw yesterday.
As soon as it is started, the component works perfectly, but after a while it stops receiving updates from the event bus.
So a light that is off can be turned on from HA, but then by not updating the status in HA ,it is turned off in HA even if it is on and therefore it is impossible to turn it off.
If you turn it off from the wall switch then the status that does not update returns to be correct however and you can then turn it back on.
The same happens if one turns on the light from the wall switch, the status does not update and therefore it is impossible to turn it off from HA.
This is good or bad the same problem I had, the library that read the two buses, even in my case it worked fine, but then the problem was interfacing with HA.
That’s why I switched to node-red and MQTT.
If I’m not mistaken, Sdomotica works because it also passes through MQTT to interface.
Maybe you could keep the OWNl but instead of sending data from a custom component, switch to MQTT and leave interface management to this component.
It was something I wanted to try, but then found that with node-red the creation of the interface between OpenWebNet and MQTT was easily achievable, I opted for this choice.
The system works well, only sometimes it requires the restore of flows in node-red but then everything comes back perfect for weeks.

The system hangs after about 1 minute and 30 seconds, with the following log