JoDehli / PyLoxone

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

[Bug]: New Light Control not synced #233

Closed seb4stian4s closed 4 months ago

seb4stian4s commented 4 months ago

Describe the bug

After I was shown in the devices that an entity (Loxone Light Control V2) was no longer available (I had removed it in the miniserver), I deleted this entity via the HA web interface.

Now I have added this light control again in another, newly created room, but PyLoxone does not recognize it as a new device.

I have looked in the LoxAPP3.json and the lighting control can be found there. In the PyLoxone options, I have activated that newly added entities should be activated.

Yes, I have of course restarted the HA and even the miniserver and the HA. No change, it does not recognize or find this light control.

Unfortunately, I have no idea how and where to find the lighting controls that have been created so far to see if I can add them there manually.

Is this a bug in the new version? Does anyone have any ideas?

By the way: I have already stopped PyLoxone, restarted HA, uninstalled PyLoxone, restarted HA, reinstalled PyLoxone via HACs and restarted HA again. It simply does not add this light control.

Here data from LoxAPP3.json:

 "1c47aeef-0148-0739-ffffed57184a04d2": {
      "name": "Lichtsteuerung Gaestebad",
      "type": "LightControllerV2",
      "uuidAction": "1c47aeef-0148-0739-ffffed57184a04d2",
      "room": "1c47aec7-006e-e3e0-ffffed57184a04d2",
      "cat": "15ea0aa4-0244-3a4a-ffffed57184a04d2",
      "defaultRating": 1,
      "isFavorite": false,
      "isSecured": false,
      "restrictions": 0,
      "details": {
        "jLockable": true,
        "controlHistory": true,
        "hasHistory": 20,
        "masterValue": "1c47aeef-0148-0739-ffffed57184a04d2/masterValue"
      },
      "states": {
        "jLocked": "9c47aeef-0148-06f9-07ff16a5fe91f1bb",
        "activeMoods": "1c47aeef-0148-06c0-ffff16a5fe91f1bb",
        "moodList": "1c47aeef-0148-06c1-ffff16a5fe91f1bb",
        "activeMoodsNum": "1c47aeef-0148-06c8-ffff16a5fe91f1bb",
        "favoriteMoods": "1c47aeef-0148-06c2-ffff16a5fe91f1bb",
        "additionalMoods": "1c47aeef-0148-06c3-ffff16a5fe91f1bb",
        "circuitNames": "1c47aeef-0148-06c7-ffff16a5fe91f1bb",
        "daylightConfig": "1c47aeef-0148-06c9-ffff16a5fe91f1bb"
      },
      "subControls": {
        "1c47aeef-0148-0739-ffffed57184a04d2/masterValue": {
          "name": "Master-Helligkeit",
          "type": "Dimmer",
          "uuidAction": "1c47aeef-0148-0739-ffffed57184a04d2/masterValue",
          "defaultRating": 0,
          "isFavorite": false,
          "isSecured": false,
          "restrictions": 0,
          "states": {
            "position": "1c47aeef-0148-0734-42ff16a5fe91f1bb",
            "min": "1c47aeef-0148-06c5-ffff16a5fe91f1bb",
            "max": "1c47aeef-0148-06c6-ffff16a5fe91f1bb",
            "step": "1c47aeef-0148-070e-1cff16a5fe91f1bb"
          }
        },

Firmware of your Miniserver

14.5.12.7

HomeAssistant install method

Standalone on IBM NUC

Version of HomeAssistant

Core 2024.1.3 Supervisor 2023.12.0 Operating System 11.4 Frontend 20240104.0

Version of Pyloxone

0.6.1

Update pyloxone

it's latest version

Log

Set log level as described. No entry to uuid of Light Controller or to any name like the room name "Gaestebad". No errors or warnings.

2024-01-14 11:39:25.250 DEBUG (MainThread) [custom_components.loxone.api] hash_credentials successfully... 2024-01-14 11:39:25.250 DEBUG (MainThread) [custom_components.loxone.api] get_new_aes_chiper successfully... 2024-01-14 11:39:25.346 DEBUG (MainThread) [custom_components.loxone.api] parse_loxone_message successfully... 2024-01-14 11:39:25.399 DEBUG (MainThread) [custom_components.loxone.api] save_token successfully... 2024-01-14 11:39:25.399 DEBUG (MainThread) [custom_components.loxone.api] get_new_aes_chiper successfully... 2024-01-14 11:39:25.462 DEBUG (MainThread) [custom_components.loxone] starting loxone scene...

JoDehli commented 4 months ago

@seb4stian4s do you have the room created in home assistant?

seb4stian4s commented 4 months ago

@JoDehli at first not, because I thought it will be created automatically like all the other rooms before. For testing I did create the room without any success.

JoDehli commented 4 months ago

@seb4stian4s do you see the light controller in your official app and with the same user as you use for the pyloxone connection.

seb4stian4s commented 4 months ago

@JoDehli I do.

JoDehli commented 4 months ago

@seb4stian4s for now I have no idea what went wrong.

seb4stian4s commented 4 months ago

@JoDehli any idea how to add it manually ? I know the uuid ... or how to completely delete everything and reinstall it ?

JoDehli commented 4 months ago

@seb4stian4s I would try it like this:

  1. first disable the pyloxone integration and restart ha
  2. go to the entities and delete them all. you can select all entities. only the missing or wrong entities will be deleted.
  3. restart ha
  4. activate pyloxone again
  5. restart the last time
seb4stian4s commented 4 months ago

@JoDehli thx. I tried it and tried with PyLoxone 0.4.3 but no chance. Now I will completely delete HA and reinstall everything from scratch and try it that way. very strange

seb4stian4s commented 4 months ago

@JoDehli - got it and solved it. I've created a new room and forgot to give the HomeAssistant user permissions for the new room!