Bepacom-Raalte/Bepacom-BACnet-IP-Integration

Priority Arrays and Relinquish Default

Opened this issue · 7 comments

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

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.

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

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

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.

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

Thank you.

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!