JoDehli / PyLoxone

Python Loxone binding
Apache License 2.0
164 stars 40 forks source link

Entity list - incomplete #212

Closed hndenman closed 6 months ago

hndenman commented 6 months ago

Describe the bug

I have a number of 1-wire sensors connected to Loxone room controlllers The room controllers seem to show up reliably in Home Assistant as devices But some (not all) of the 1-wire sensors appear as entities I want each 1-wire sensor to appear reliably as entities PyLoxone seems to update name changes (initiated in Loxone) to HA but only to previously recognised entities Adding a new room controller does not seem to get updated in PyLoxone How can I ensure a full refresh and make all individual sensors appear as entities?

Firmware of your Miniserver

14.4.9.25

HomeAssistant install method

Manual install onto Intel NUC

Version of HomeAssistant

2023.11.2

Version of Pyloxone

0.4.9

Update pyloxone

Yes

Log

Settings for the log can be found on the main page under the section Log Configuration

JoDehli commented 6 months ago

@hndenman do you see all the 1- wire sensors in the official app. If not you must set all sensor as visible.

All changes to the sensors are only applied by restart homeassistant. The automatic reloading when the miniserver restarts is not implemented yet. This is not perfect but normally you have not too many changes if your system is completely setup.

hndenman commented 6 months ago

Hi and many thanks I can see the Temp Sensor in the App I can see the Temp Sensor in the Structure file
For a Temp Sensor NOT showing up I have

"0e6d6ac5-00f7-7397-ffffb01e549eafa0": { "name": "Bedroom 1 Temp", "type": "InfoOnlyAnalog", "uuidAction": "0e6d6ac5-00f7-7397-ffffb01e549eafa0", "room": "0d8057d5-0222-145d-ffffb01e549eafa0", "cat": "0d4fbc41-0033-032f-ffffb01e549eafa0", "defaultRating": 0, "isFavorite": false, "isSecured": false, "defaultIcon": "IconsFilled/thermometer.svg", "restrictions": 0, "details": { "jLockable": false, "format": "%.1f°" }, "states": { "value": "0e6d6ac5-00f7-7397-ffffb01e549eafa0", "error": "0e6d6ac5-00f7-7396-ffff0cc52129ab82" } },

and for a Temp Sensor showing up I have

"0e54ed92-02be-f1d7-ffffb01e549eafa0": {
  "name": "Bedroom 4 Bath Temp",
  "type": "InfoOnlyAnalog",
  "uuidAction": "0e54ed92-02be-f1d7-ffffb01e549eafa0",
  "room": "0e4a6cac-02c7-b005-ffffb01e549eafa0",
  "cat": "0d4fbc41-0033-032f-ffffb01e549eafa0",
  "defaultRating": 0,
  "isFavorite": false,
  "isSecured": false,
  "defaultIcon": null,
  "restrictions": 0,
  "details": {
    "jLockable": false,
    "format": "%.1f°"
  },
  "states": {
    "value": "0e54ed92-02be-f1d7-ffffb01e549eafa0",
    "error": "0e54ed92-02be-f1d6-ffffb5808dcbcfba"
  }
},

But I changed the Description name in Loxone and the HA sensor name did not update

It feels to me as if the Loxone structure file is not being re-read and updated

I have a Gen 1 Miniserver and I am connecting directly via port redirection - I note that if I had a Gen 2 Miniserver i would need to go via Loxone

Thanks

JoDehli commented 6 months ago

@hndenman I guess you updated it in the app or on the web app not in the loxone config application

hndenman commented 6 months ago

I meant to say that I have restarted the HA a number of times as well without the sensors being added

hndenman commented 6 months ago

Hi I have done both ways Yes the most recent change was through the App but that seems to be syncing to the Miniserver

Pls See this screen shot of a 1-wire that is not loading

image

JoDehli commented 6 months ago

@hndenman on every restart of home assistant (not only pyloxone) the structure file is read. There is no caching for this file. At the moment I do not know if the description is read at all. I think I use only the name of the sensor. But I am not sure for 1-wire sensors as I do not use them.

What sometimes can happen is that the name is already set in homeassistant and a renaming is not successful. For the you can disable pyloxone temporally then restart home assist with pyloxone disabled and delete all entities from pyloxone and loxone. Then restart again ( only to make sure everything is still deleted after a restart). Then enable pyloxone again sn restart a last time.

hndenman commented 6 months ago

Hi JoDelhi Where a description is included this becomes the default name for the HA Entity, I see this where the name and description were different in Config I have tried to disable PyLoxone and disable and delete the entities HA will not let me until I remove PyLoxone I will try that and reinstall and see if the sensors with a changed description are loaded in case the old names were creating a conflict in HA

hndenman commented 6 months ago

Working ! Could not delete entities even if PyLoxone was disabled I disabled PyLoxone I think I then deleted the configuration to my MiniServer I rebooted HA a few times I reconfigured the connection to the MiniServer and now I have 155 entities from 57 Great but odd The HA naming likes to take the Description from Config but if the name includes the Room Area it seems to shorten the name - other sensors with no room name overlap do not do this

Lox Entity Overview Tile

Lox Entity Settings

JoDehli commented 6 months ago

@hndenman I never used a description only the name. But I can not understand why sensor naming is different for sensors with rooms defined or not. This is done by ha itself. But if it works now we can leave it for now..

hndenman commented 6 months ago

Many thanks Will be great to get the updating feature working in due course Will send you a coffee

JoDehli commented 6 months ago

@hndenman thanks for the coffees. I try my best to keep the integration running.