hass_nibe icon indicating copy to clipboard operation
hass_nibe copied to clipboard

Feature request: System configuration to change "Write Access"

Open faanskit opened this issue 2 years ago • 8 comments

When I started to use the integration, I did not subscribe to the Premium Service. Therefore I did not enable "Write Access".

Having now opted in for Premium Service, I'd like to be able to update that configuration in the Configure System dialog. I suppose there are some configuration I can do to revise this, but the preference is to be able to change this in the Ui.

Please take note that the Premium Service is per system and not per account. In my case, I have Premium Service for one of my systems and not the other system.

So, the Write Access configuration should operate om system and not account.

faanskit avatar Jan 22 '22 09:01 faanskit

This is something that i whould also like to see.

frank8the9tank avatar Jan 26 '22 07:01 frank8the9tank

That is sadly complicated since it's re-authentication. So I'd have to add re authentication support. I'm happy to accept pull requests on it.

elupus avatar Jan 26 '22 07:01 elupus

Also. You can't change per system, only per client connection.

elupus avatar Jan 26 '22 07:01 elupus

Hi, is there any workaround for this? Or do I need to re-add the integration to change write-access?

EenerNL avatar Dec 13 '22 15:12 EenerNL

Just re-add. All entities should come back the same.

elupus avatar Dec 13 '22 16:12 elupus

Yes I know, but then I would lose my history. If there is no other option that’s my only option I guess.

Isn’t there an option to change some config files and re-initiate the integration?

Thanks for your quick response.

EenerNL avatar Dec 13 '22 17:12 EenerNL

Yes I know, but then I would lose my history. If there is no other option that’s my only option I guess.

Isn’t there an option to change some config files and re-initiate the integration?

Thanks for your quick response.

I was able to keep history on a Z-wave device that turned dead which I then had to remove and re-add. After re-adding it the device came back with the default name but after changing the name back to what I had changed it to previously (before it disconnected from the Z-wave network), it re-associated with the old entities and history.

I'm not 100% sure if it would work differently by removing and re-adding an entire integration though but when removing a device it seems like the old entities are still kept and can be re-associated with.

Might be worth a try, if you are worried about losing history you could also create a backup before the procedure.

AnonymousRetard avatar Dec 22 '22 08:12 AnonymousRetard

TLDR: It worked for me to delete the entry and readd it in "Write Access" mode. The history is preserved, and HA considers it to be the same device.

I did some experimenting by setting up a docker instance of HA, installing HACS and the nibe integration. Adding the heat pump in read only mode, and letting it record some data for a while.

Then I tried re-adding it (without deleting the existing entries), this did not do much, as it ignored everything for already existing: 2024-01-16 22:18:45.736 ERROR (MainThread) [homeassistant.components.sensor] Platform nibe does not generate unique IDs. ID 127xxx_40067 is already used by sensor.nibe_127xxx_40067 - ignoring sensor.nibe_127xxx_40067

Then I tried deleting the devices from the http://localhost:8123/config/integrations/integration/nibe, reboot to complete the remove, then do "Add Entry". This time choosing "Write Access". This successful connected everything with the same names as the first time. The history plots are continuous, i.e. it considers it to be the same device.


I repeated on my actual HA, and it went fine too. Though I had to rename one device, which had changed from water_heater.nibe_127xxx_40014_47387 to water_heater.nibe_hot_water, and so had disconnected its history. Change the name back in settings fixed it.

samtygier avatar Jan 16 '24 23:01 samtygier