victronenergy / gui-v2

Other
25 stars 9 forks source link

Temperature sensor names not displayed in the "Temperature control rules" menu. #1277

Closed ReinvdZee closed 2 months ago

ReinvdZee commented 3 months ago

Reported on community:

image

I reproduced this: After configuring a relay as "Temperature", the submenu "Temperature control rules" shows up. This submenu shows the active temperature sensors, but all are just named "Temperature sensor". I changed the custom name of the temperature sensors, but it is not showing here. Like in the devicelist, this menu should show the /CustomName if set, and /ProductName if /CustomName is not set. image

blammit commented 3 months ago

Currently com.victronenergy.temprelay/Sensor/<sensor_id>/ServiceName provides the service name for each temperature sensor under `com.victronenergy.temperature.*. (For example, if there's a sensor with the name com.victronenergy.temperature.ruuvi_f00f00d00001, the "sensor id" is ruuvi_f00f00d00001.)

On D-Bus, this /ServiceName is sufficient for locating the relevant com.victronenergy.temperature.* service for each sensor. However on MQTT, gui-v2 also needs a device instance to locate the service. This is a similar problem to https://github.com/victronenergy/gui-v2/issues/1025 where /ActiveBmsInstance was added to allow the device instance to be found for the BMS service.

@ReinvdZee Could you also add com.victronenergy.temprelay/Sensor/<sensor_id>/ServiceInstance or something like that, so that on MQTT gui-v2 can compose an id like mqtt/temperature/<DeviceInstance> to find the correct ProductName or CustomName for the service?

ReinvdZee commented 3 months ago

@blammit

I've added com.victronenergy.temprelay/Sensor/<sensor_id>/ServiceInstance to the service.

Will be included in 3.50 beta.

blammit commented 3 months ago

Thanks @ReinvdZee !

blammit commented 2 months ago

Need to mark as blocked until the change to add com.victronenergy.temprelay/Sensor/<sensor_id>/ServiceInstance in VenusOS is released.

mpvader commented 2 months ago

Hey @blammit , this is unblocked now, per Venus OS v3.50~5 its available.

blammit commented 2 months ago

Thanks! Will look into adding this support.