Legrand/Bticino MyHome

Hey! Thanks so much for this! One quick question (total noob here), how can I find the OpenWebNet address of my device? I don’t really know how to populate the “where” <Found it!

Now I have an issue setting my thermostat. The model is F430R3V10. Does anyone know what I config I should add for this one?

Hello @Crypt0-M3lon & @anotherjulien
It finally works by commenting if not local_gateways as suggested by Crypt0.
As i had resinstalled (removed/installed) the integration before, MyHome was not present in config/.storage/core.config_entries :upside_down_face: .
To resume:

  1. Remove the integration,
  2. Install MyHome (via HACS),
  3. Add the intregation. If the gateway is not discovered, comment the lines in config_flow.py.
    Re add the integration, select Custom, enter (even if you cannot modify the MAC address) then fill in your informations aboot the F454 gateway (IP, MacAddress, password).
  4. Restart Home Assistant (that never hurts).

Small bonus, the integration looks like this in /config/.storage/core.config_entries:

{
“entry_id”: “bc3117a111c35a5efedf3a61d6949512”,
“version”: 1,
“domain”: “myhome”,
“title”: “F454 Gateway”,
“data”: {
“id”: “YourMacAddress”,
“host”: “YourIP”,
“port”: 20000,
“password”: “XXXX”,
“ssdp_location”: [null],
“ssdp_st”: [null],
“deviceType”: [null],
“friendly_name”: [null],
“manufacturer”: [“BTicino S.p.A.”],
“manufacturerURL”: [“http://www.bticino.it”],
“name”: “F454”,
“firmware”: [null],
“mac”: “YourMacAddress”,
“UDN”: [null],
“lights”: {},
“covers”: {}
},
“options”: {},
“pref_disable_new_entities”: false,
“pref_disable_polling”: false,
“source”: “user”,
“unique_id”: YourMacAddress",
“disabled_by”: null
}

@anotherjulien issue is back, but not that often… :frowning_face:
Anyone else having this problem or solutions ??

Would you have debug logs around the time the issue appears?
I’m curious what’s the last message that was received, maybe that would give a clue?

If I put the debug on for myhome the debug file will be to big before the issue appears

Hi folks :slight_smile:
Semi-major release today!
Any feedback is appreciated, hopefully I did not break anything for anyone :wink:

1 Like

First bug to report: light brightness was not updated if it was modified via a wall switch (including when turning on)
This has been fixed in the master version.
I’ll publish a new release including this fix after either a few days pass or a few more bugs show up!

I think tomorrow I’ll start debugging:rofl: :joy: :+1:

This error originated from a custom integration.

Logger: custom_components.myhome
Source: /usr/local/lib/python3.9/site-packages/OWNd/connection.py:209
Integration: MyHome (documentation, issues)
First occurred: 6:01:19 PM (8266 occurrences)
Last logged: 11:48:55 PM

Command session connection refused, retrying in 1s.
Command session connection refused, retrying in 2s.
Command session connection refused, retrying in 4s.
Command session connection refused, retrying in 6s.
Command session connection refused, retrying in 8s.
This error originated from a custom integration.

Logger: custom_components.myhome
Source: /usr/local/lib/python3.9/site-packages/OWNd/connection.py:204
Integration: MyHome (documentation, issues)
First occurred: 6:01:42 PM (1190 occurrences)
Last logged: 11:48:48 PM

Command session connection still refused after 5 attempts.
This error originated from a custom integration.

Logger: custom_components.myhome
Source: custom_components/myhome/gateway.py:166
Integration: MyHome (documentation, issues)
First occurred: 6:10:01 PM (75 occurrences)
Last logged: 11:40:03 PM

Data received is not a message: None

That… is a lot of retries!
Did you try to reboot the gateway itself?
Alternatively, can you try going in the __init__.py file on line 84 and reduce the number of concurrent workers from 5 down to maybe even just 1?

Yes. I reset everything. I also reinstall the component and select the gateway from the selector, enter the password and restart the home assistant …

Anyway, editing the init file, with for i in range (1): seems to have fixed it.
now, however, this appears from time to time, but I cannot understand what message it is

2021-08-17 17:09:27 INFO (MainThread) [custom_components.myhome.sensor] Sensor 7 is reporting a total power consumption of 1713 Wh.
2021-08-17 17:10:03 DEBUG (MainThread) [custom_components.myhome] Received: None
2021-08-17 17:10:03 WARNING (MainThread) [custom_components.myhome] Data received is not a message: None
2021-08-17 17:10:04 DEBUG (MainThread) [custom_components.myhome] Received: None
2021-08-17 17:10:04 WARNING (MainThread) [custom_components.myhome] Data received is not a message: None

Another silly question … but would the total energy sensor be the total from when it is running?
Sensor 1 is reporting a total power consumption of 15603280 Wh.

editing the init file, with for i in range (1): seems to have fixed it.

Cool! It’s good to know that some gateways do not support having multiple concurrent connections at all! (And maybe it can explain some other edge cases people have been encountering?)
I’ll definitely put 1 worker by default then and work on adding a config option to add more of them if people want more performance out of the system!

would the total energy sensor be the total from when it is running?

Yes. My understanding is that this counter cannot be reset, so it represents the total energy consumption since it’s first been used.
I have no idea what is the register size for this in the actual sensor though…
If you assume that it’s an unsigned 32 bits integer, it would rollover after 4 294 967 295 Wh
The only really annoying part is that it’s updated internally only every hour :slightly_frowning_face:

You made a lot of changes and improvements, I was a little behind … :sweat_smile:

For now, I just need to see the consumption in the dashboard, now I can eliminate the sensors created with Integration - Riemann sum integral :innocent:

I tried the flash attribute, great! :partying_face:

You could use the config flow and add all the options, the integration_blueprint component, can help you create it all.

Thanks for your support and work :+1: :+1:

But you never stop … I was correcting the names of the energy entities, and so I also tried the “master” version :rofl: :rofl: :rofl:

Screenshot 2021-08-18 at 20.07.19
You beat me by 1 device but I beat you by 5 entities :wink:

To be fair, this config option was ready this morning, I tested it all day but I was trying to think if there were other obvious general config options I could add before pushing it to github…
I couldn’t find any but if you have any ideas, I’m all ears!

I have a box full of working actuators (ex covers and more) … :joy::joy:
I don’t know, the configure function is convenient, maybe I change gateway or password?
maybe a check for autoenergy (which activates it, makes the request for energy automatically for all entities?)
autoreload in case of breakage :joy::joy: uhm, let’s see if others have ideas, I have to think about it.

Changing the gateway IP and password is a good idea, I’ll have a look at it!
By autoenergy you mean getting the “instant power”? I think that if I could make it work automatically, there should be no reason to turn it off, right?
Then there’s the big one, auto-reload… Here the problem is not to reload automatically, it’s to detect that it’s not working anymore… :slightly_frowning_face:

Good.

Yes, let’s say that for general power, I have the automation that starts at start-up, as you explained in the readme, and for others I activated them only if the socket turned on, but it doesn’t make sense​:joy::joy:

Yes sore point … I have inserted in an automation, that if the temperature sensor (single sensor not connected to the climate) is 0 then reload the component​:joy::joy: It is not the right thing to do, but it works … uhmmm you have to understand how and if it can be recognized that the component :sweat_smile: is not working properly

@caiosweet, I’ve published a new master if you want to give it a go!

It ended up being a much more involved rewrite than I thought :joy:
It was a good opportunity for a cleanup of the main “runtime” data structure though.

So now you can change the IP and password for the gateway from the component options.
I also added the adequate workflow when the gateway password is wrong (triggering the HA message “Integration requires reconfiguration”)
Similar thing when the IP address of the gateway is unreachable.

You can test both by setting a false pass or IP in the config options.

(Also this was the opportunity to test another mechanism, if your gateway changes IP and is discovered again, it will simply update the IP in the config entry! It should be relatively transparent, maybe a restart at most)

1 Like

@anotherjulien

Two possibilities…
…or are you really crazy :rofl: :rofl:
or you like to write and develop code :rofl: :partying_face:

Anyway, I tried again before reading this post. :blush:
If I put a wrong password in a gateway discovered, then it indicates that it is wrong, but if I intentionally change the password with a wrong one, in a gateway already set, you simply tell me that ok, data set and I do not receive error messages in the form .

Another thing, I don’t remember, is the Bticino password only numeric? If yes, I would set the input as the value of only of type int. :wink: (

I think it is really useful, this option, so I can see what password I have if I have forgotten it hahaha :joy:, and without uninstalling and reinstalling I can change these parameters on the fly.

For now, the master version is installed and I let it run :+1: :+1:

Yeah, I’m not really sure which one either :wink:

Not in the form, no, but you should see the “Integration requires reconfiguration” notification in HA; and if you go back to the integrations page, it shows a red frame with a red “reconfigure” button

The basic password, yes, but the HMAC password is also supported by this component and it’s alphanumeric!