Unable to configure a widget

I’m not sure how to diagnose as to why it won’t load the data for the widget to configure it. I don’t see any invalid or bad services and I don’t see any log info in any of the logs that would help give me a clue as to where to start.

Any help? I’m using the latest version of HA app for android Ave I even tried configuring this on a different phone to rule out something with the app where I’d need to clear the data. Thank you.

If you look at the text below the first field it calls out a custom component is causing the issue. First update all custom components and if the issue still persists, disable one at a time and keep checking this screen. You will need to create a new widget on try because the call to check services is made only once when the page is loaded.

What exactly is a custom component? Are we talking entries in configuration.yaml like mosquito and ring? Or are we talking add-ons? Thank you

like stuff you would add from HACS or in /config/custom_components

I don’t have any custom components. Only a few integrations added from within HA on hassio. That folder doesn’t even exist on my box.

the custom_components folder is located inside the config directory where your configuration.yaml and other files are located…what integrations do you have enabled?

Yes I checked. There’s no folder like that in the config/ as I’ve not used any.

Mqtt mosquito
Ring hassio
Tp-link kasa smart
MyQ
Nest
Smartthings

Pretty vanilla tbh.

what version of home assistant are you on? both the app and HA core

I would also check HA start up errors to see if it complains about missing services.yaml, something seems amiss here if you are only using core integrations…the easiest way to figure out which integration is the culprit is to disable one at a time and check the screen…then once we know which integration to investigate in we can get it fixed

2021.3.1-full app
Home Assistant 2021.3.4

If I disable an integration, check and then re-enable it, will it break anything referencing those integration entities/devices/etc?

Disabling should not cause a removal, but if you remove YAML then you might need to rename it after you add it back

I went through and disabled them all one at a time and retried but still the same issue.

There’s also nothing of interest in the logs.

ok in that case can you get teh device logs?

https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs

we need to see what the actual error is so we can fix it, i konw its a bit of steps but its important for us to see what the actual error is.

The issue might be related to the output from /api/services which is a HA REST API, you can also see if you can look at the ouput from it on this page https://developers.home-assistant.io/docs/api/rest if you are comfortable with stuff like this otherwise the error should be good enouigh

logcat doesn’t produce any logcat output or errors when attempting to add the widget. I believe that in order to produce more verbose logging for the home assistant app, the app itself would need to increase debug logging. I didn’t see a way to do increase that logging from the app unless i’ve missed it.

I also grabbed the output from the api and piped it through jq so I could read it. Nothing jumped out at me as wrong. There weren’t any weird characters or anything that looked wrong with hte JSON. I could post it if you’d like to take a look at it but it looks fine. It would be helpful to know which fields the app is attempting to parse maybe but I didn’t see anything ‘wrong’ with it.

How do you know what to look for? Did you grant the proper permissions which are required for verbose logging? Have you developed Android apps before?

I think you should post it since I’m not sure how you know what to look for if you haven’t seen the error before. If you know that to look for you can look at the Android code to see what is expected.

I’m comfortable with ADB and android but I haven’t developed apps themselves besides some tinkering. I simply ran a logcat and grepped the output for homeassistant as I performed the operation. The permissions for studio or the logviewer I believe are needed to actually use logcat within the tools. Here the app isn’t actually crashing so there is no crash data reported in logcat. I was wrong though, due to buffering in the terminal there was a few lines:

adb logcat | grep homeassistant

dell-xps:~/Downloads$ adb logcat | grep homeassistant 
03-26 09:36:31.249  1494  4663 I ActivityTaskManager: START u0 {cmp=io.homeassistant.companion.android/.widgets.button.ButtonWidgetConfigureActivity (has extras)} from uid 10460
03-26 09:36:31.328  1494  1559 I ActivityTaskManager: Displayed io.homeassistant.companion.android/.widgets.button.ButtonWidgetConfigureActivity: +78ms
03-26 09:36:43.564  1494  3236 D ContentCapturePerUserService: Notified activity assist data for activity: Token{dd21ea5 ActivityRecord{6b827a u0 io.homeassistant.companion.android/.widgets.button.ButtonWidgetConfigureActivity t12429}} without a session Id
03-26 09:36:43.565  6624  6624 I AndroidIME: AbstractIme.onActivate():85 LatinIme.onActivate() : EditorInfo = Package = io.homeassistant.companion.android : Type = Text : Learning = Enable : Suggestion = Show : AutoCorrection = Enable : Microphone = Show : NoPersonalizedLearning = Disable : AutoStartVoiceInput = Disable : AutoStartEmojiInput = Disable : SimulateDeviceLocked = False : imeActionName = NEXT : imeOptions = 8000005 : privateImeOptions = null, IncognitoMode = false, DeviceLocked = false
03-26 09:36:44.067  3025 23571 W llp     : Infinite Data has no result for io.homeassistant.companion.android [CONTEXT service_id=177 ]
03-26 09:36:44.096  3025 21552 W llp     : Infinite Data has no result for io.homeassistant.companion.android [CONTEXT service_id=177 ]

I looked at anything obvously missing but no I don’t know specifically what to look for or what the app is expecting.

Any help is really appreciated. Thank-you.

When we first saw this error it didn’t mention home assistant as the error came from a dependency which is probably the same case here.

Hi. I’m not sure where to go from there really. I think you’re asking if I can generate logs via android studio that are more specific to the app and its dependencies. TBH, that’s beyond where I’m comfortable and i’m not sure what or how to even do it.

Taking a look at the services can you look at the below script and show me hwo it is setup?

script.emergency_alert

 {"emergency_alert": {"name": "", "description": "Sends an emergency alert to phones even on DND with appropriate Volume", "fields": {"volume": {"example": "6"}, "title": {"example": "Default Title"}, "message": {"example": "Default Message"}}}, 

I beleive the issue here is that the fields are missing their description which is required, I see examples are provided for each field like volume but there is no description. CAn you try adding the description for each of these fields?

1 Like

:smiley:

That worked!

fields:
volume:
description: Volume on the device
example: 6
title:
description: Title of the android alert
example: Default Title
message:
description: Message of the android alert
example: Default Message

Thanks so much! It would be good if HA would complain when this was created so the end user would know. But this is good. I missed the requirement in the yaml spec.

1 Like