-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-IoTaWatt setup issue with identical inputs #14
Comments
@janecker I knew this would become an issue at some point! The name is coming from the If we could get to unique names entered through the Config Flow UI, then for example if you enter in |
@gtdiehl: Thanks for the response, your idea with the naimg was exactly what my thought was. The only issue witht this might be, that it will break the existing names and will potentially break a lot of stuff if someone updates to the newer version. I don't think HA does allow multiple entites with the same unique ID (same display name is fine). I think I have seen other integraitons just adding _1, _2 etc. as a suffix to the unique IDs if they already exist, but I am not sure how it is possible to assign these unique IDs to the correct Iotwatt instance than... |
@janecker I see your point with updating to a new version, but with the integration being bundled with Home Assistant unfortunately this will be the case. The integration, right now the way the code stands from the review process, is that the sensor names have been reduced in length. The HA will automatically append But getting back to the example you had in the original issue I'm wondering is this a display issue or does Home Assistant have an issue showing the second |
For me this is not to big of an issue, I just have to make sure to rename some template entites when updating to the newer version, just wanted to mention it :).
I just checked my logs and I am getting the following errors regarding the addtional voltage inputs:
There is only one entity showing up as While checking the log I also noticed the following error quite a few times:
I don't think this is related to the other issue at all but I thought it would be good to mention it (should I create a new issue for this?). |
@janecker The last issue you saw is the next issue I need to resolve. It's in the API library when retrieving the data. I need some retry. Though @jyavenard has made some changes I need to take a look at. Maybe it will resolve this one. I'll take a look at the unique ID issue. It appears the mac address is not getting set, so the sensors don't have a unique ID. |
@janecker I found the problem in the API library. I'll try and fix it this week. The mac address is only set during the connect() method. This method is only used during setup, so the mac address is not set when the setup goes to discover the sensors. |
@janecker I made the change and pushed an update. You can test it out. But what I found after I released is that new sensors will be created because of a new ID. The old ones will become unavailable and the new ones will be appended with |
Your last change only includes a bump in the version numbers. It's unfortunate that it's not backward compatible with earlier versions, going to mess up history. I wonder if there would be a way to allow for a smooth transition of system with a single iotawatt , so the first iotawatt doesn't need the Mac address, but secondary iota do. |
@gtdiehl: I tried the latest version and everything seems to work fine now, thank you! @jyavenard: it is very unfurtnate that the naming changes and it took me 30-45 mins to rename / reassign everything but I am not sure if there really is a better solution for this. I think this was actually a bug if the mac address was not assigned as expected. At least all new users should get the proper assignment in future such that they to not have any issue when adding additional iotawatts in the future.... |
And it’s going to change again :( the official iotawatt integration used another unique_id format for the input sensor. And yet another for the output. And that one too will change another time later once the iotawatt firmware is updated to provide a unique Id for the outputs. |
Oh i see, ok that gonna suck :(, is there any ETA on when the integration will be part of the core? Will this integration be integrated into the core or is there a parallel development going on? |
It's landed on dev ; will be in HA 2021.9 |
I think the plan is to have the HACS version follow the official version with extra tweaks until it can be all merged back into HA core. I've already rebased my changes on top of it there: This adds an extra set of sensors, which is high accuracy energy readouts. Perfect to calculate import and export |
Hi,
first of all thanks for your work, I am new to HA and I am currently testing your integration. I have 3 IoTaWatt units in use (one for each phase). With that setup I have notices an issue with your integration:
If I have two inputs with the same name in multiple IoTaWatt units, the entities cannot be created properly. For me this is the case for the voltage, which is named the same in each and every unit. Maybe it would be a good idea to add a prefix to every entitiy name tha represents the IoTaWatt unit to which it belongs.
The text was updated successfully, but these errors were encountered: