Bepacom-Raalte / Bepacom-BACnet-IP-Integration

Bepacom BACnet Integration Repository
Apache License 2.0
12 stars 2 forks source link

Priority Arrays and Relinquish Default #27

Closed rudgej closed 2 months ago

rudgej commented 5 months ago

Good afternoon.

You were amazingly helpful in getting my HA to talk to my Calorex Variheat 600 pool system

I could clearly read values, and as far as i could tell write them.

However .....

The pool area has just been built and until yesterday we could not have the system on due to construction.

When i write the values from HA they dont update on the controllers screen

This did not make sense to me as i was seeing them update in WACNET.

So i called the supplier ....

The implementation seems non standard in that ...

  1. The priority Array needs to be set to Null for the values i want to over write
  2. The Value to write to needs to be written to the Relinquish Default field of the object

The issue i have is that as a Home Assistant Hacker I have no idea how to do either of the above, and indeed if the Bepacom integration is capable of this ( either as is or modified).

I have written great front end screens to control all of this and i am frankly gutted!

I have had a look in the code and it seems to seek to release the priority elements async def write_release(call: ServiceCall) -> ServiceResponse: """Write empty presentValue that serves to release higher priority write request."""

    entity_registry = er.async_get(hass)

    entity_data = entity_registry.async_get(call.data[ATTR_ENTITY_ID][0])

    device_id, object_id = entity_data.unique_id.split("_")

    if call.data.get(ATTR_PRIORITY):
        LOGGER.warning(
            "Priority is currently not functioning. Writing default value."
        )

    await coordinator.interface.write_property(
        deviceid=device_id, objectid=object_id
    )

    return {"status": "successfull!"}

But i do have priority values as i can see them on WacNet

I imagine that the code can be manually changed to write to Relinquish Default ?

I can see that there is an API in the Web UI and that allows post - so if i could figure out the syntax then presumably i can null the priority value and write the relinquish default values. In practice i dont need to control much. Occupied ? Pool Temp and Air Temp will cover much of it

I wonder if you could let me know if this is possible ?

Thank you

Jeremy

Bepacom-Raalte commented 5 months ago

Hello Jeremy,

The implementation seems non standard in that ...

The priority Array needs to be set to Null for the values i want to over write The Value to write to needs to be written to the Relinquish Default field of the object

I think the writing to priority array is only a one time action, correct? Through the add-on API, writing to the relinquish default property should be possible, but I don't know if writing the priority array is possible as I never tried that before. afbeelding

Perhaps you could use WACnet to write the priority array to null?

Currently, through the integration this isn't possible. I'd have to write new services for this to work.

I'll go on vacation for 4 weeks this weekend, so I can't guarantee I can do it before then. I do think it's useful to make it possible through the integration as well, either through services or as configuration option.

rudgej commented 5 months ago

Thank you for your reply. Sorry for my delay as I was away.

Yes the priory array is apparently a one time write according to the supplier so using an api is fine. I just need to figure out the syntax for doing so

the more " main stream " issue is the need to write changes to Relinquish Default as that is required to each change.

The code will clearly define where changes are written to and I assume that changing the destination field of write requests is simple code change that I can do manually.

Could you please let me know which part of the code specifies that field that changes are written to and the change I would need to make to change this to Relinquish Default please ?

Enjoy your vacation

Thank you.

rudgej commented 4 months ago

Good afternoon. I wondered if you were back from holiday.

I am away on the 15th and it would be good to try and get something working for then.

Many thanks

Jeremy

GravySeal commented 4 months ago

I just released integration beta v0.2.2b3. This version allows you to call a service where you can write any property you want. You can write relinquish default through this service. I'll see if I can make it a configuration option to write to this property by default instead of presentValue.

GravySeal commented 4 months ago

Unfortunately I didn't get it done before the weekend's over, but I am close to a solution for your issue. I have some translating to do, then I can release the next beta version for testing. In the next version you have control over what property will be written to

image

rudgej commented 4 months ago

Thank you.

GravySeal commented 4 months ago

Please try v0.2.2b4 when you can. I haven't been able to write to any relinquish default properties yet as I haven't had access to my test devices, so just let me know if it works!

rudgej commented 4 months ago

Hi. I am away at present for the next 4 weeks

I have remote access and will see what I can test. I don't have remote access to the home network ( only via HA - so seeing wac net etc is not possible.

Will give it a go

rudgej commented 4 months ago

I have loaded b6 ( I could not see a way to load b4 - I am on the mobile app ) but b6 says it has the same functions on the change log

I can't seem to find the menu you showed about to change the settings.

Bepacom-Raalte commented 4 months ago

When you installed the latest version, restarted Home Assistant and refreshed your browser, you can enable advanced options while configuring the integration.

afbeelding

After this you should be able to see the menu I showed before.

rudgej commented 3 months ago

Hi sorry for my radio silence - I have been away ( and am away again from Thursday).

Is there any other way to enable this feature? I have antically updated so I cant get back to this screen. I could delete it but that I would prefer not to do as it is linked to all sorts of automatons etc. Thank you

GravySeal commented 3 months ago

You don't have to reinstall the integration. You can just press reconfigure, leave all other options the same and below object name, you should have the option to enable advanced settings. This shouldn't mess up any automations or anything else. If you really want to be sure you can always make a backup before. This is with the v0.2.2b6 version of the integration.

rudgej commented 2 months ago

I am so sorry for my delay in reply but I was away until Sunday evening .

AMAZING ! It works

Thank you so much

Jeremy

Bepacom-Raalte commented 2 months ago

Great! Glad it works now. If there's any more issues, feel free to make a new issue!