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.
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?
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
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.
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?
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.