t0bst4r / home-assistant-matter-hub

Publish your Home-Assistant Instance using Matter.
Apache License 2.0
146 stars 8 forks source link

Cannot import automation, input_boolean in helpers #140

Closed Hr-Frodo closed 5 days ago

Hr-Frodo commented 1 week ago

Hello,

I introduced a helper input_boolean.bla or input_button.bla (is not in support list; I know) to switch on an automation with the help of a voice command.

in Matter Hub configuration I configured {"type": "pattern", "value": "input_boolean.bla"},

and hoped it shows up in the Entitys in the Matter Hub. In principal it works because if I include a light this is showing up in the Alexa App.

Since this didn't work, I tried to introduce an automation.bla or scene.bla, but this didn't show up in the Matter Hub either. Then I updated to the latest version 3.0.0-alpha.31, without success.

Regards Flo

t0bst4r commented 6 days ago
Hr-Frodo commented 6 days ago

input_boolean.alexa_automation_tv_schauen is unique_id in my system automation was created with UI

-> if you like we can have also a debug session via MicrosoftTeams e.g. -> can contact you via email or LinkedIn -> may be can help you to develop if you have some tasks

t0bst4r commented 6 days ago

unique_id is not the same as entity_id. Normally entities have that property, but when creating entities via config (e.g. template switches) they don't get a unique_id, if you don't specify it.

You can verify it by opening the settings of that entity in home assistant (where you configure labels and friendly name). Home Assistant will warn you, that you can only edit labels and names if the entity has a unique_id.

t0bst4r commented 6 days ago

Just for completion: can you paste your bridge config here? Just to verify.

Hr-Frodo commented 6 days ago

Hello,

sorry for mixing up unique_id and entity_id.

here are the settings of the scene: scene.tv_schauen

entity_id: - light.wohnzimmer_stehlampe - light.wohnbereich_ambientelampe - light.wohnzimmer_hangelampe - switch.wohnbereich_fernseher - light.kuchenblock_kuche - light.kuchenblock_esszimmer - media_player.era id: "1731616538163" icon: mdi:youtube-tv friendly_name: TV Schauen

the helper: input_boolean.alexa_automation_tv_schauen

editable: true icon: mdi:account-voice friendly_name: Alexa_Automation_TV_Schauen

the automation: automation.alexa_tv_schauen

id: "1731682272452" last_triggered: "2024-11-15T14:56:26.673468+00:00" mode: single current: 0 icon: mdi:youtube-tv friendly_name: Alexa_TV_Schauen

bridge config.json

so while writting the post I input the config again, as I did several times... now it works after I revied the entities in the Developer Tools and copied in the post.

Other thing what I figured out in the Alexa App the Devices work only after adding the Bridge fresh. After closing and opening the App the devices shown up as "do not react"

Regards Flo

t0bst4r commented 6 days ago

So the actual problem has resolved itself?

When restarting the bridge, Alexa needs to re-establish the connection. For me it works to just wait about 10 minutes. Or else go to the Alexa app and turn on one switch, it will be shown offline. Then wait 10 seconds, turn it on/off again. Wait another 10 seconds. Now it should be operational.

Hr-Frodo commented 5 days ago

Hello Tobias,

yes the issue has resolved itself. Why? I don't know. Did it several times before writing here.

No update, No change since than (may be a restart from the docker containers). While writing the comment here and adding the pattern today to the bridge config for posting the bridge_config.json here the entities was shown in the bridge list.

here my docker-compose.yaml for home assistant matter hub: services: matter-hub: hostname: matter-hub container_name: matter-hub environment: - HAMH_HOME_ASSISTANT_URL=http://192.168.178.111:8123/ - HAMH_HOME_ASSISTANT_ACCESS_TOKEN=*** - HAMH_LOG_LEVEL=info - HAMH_WEB_PORT=8482 volumes: - /home/pi/homeassistant-matter-hub/data:/data network_mode: host restart: always image: ghcr.io/t0bst4r/home-assistant-matter-hub:3.0.0-alpha.32

so the complete configuration in this thread helps may be other users to configure their home assistant matter hub

Regards Flo

PS: If you need help at development/documentation... let me know. I'm software developer as well. May be it is worth to update the docker section with my docker compose.