-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
slow response with Version: 1.2.3 #22
Comments
hi, regarding your questions:
The "_get_state_filtered" function implements the whitelist and blacklist on all entites in home-assistant. If you perform an initial request with telegram bot such as "state person" all entites from home-assistant are requested and filtered. You can disable the debug output by changing the "debug" option to "false". So if the output is slowing down your system that should be gone then. The way you configured "filter_blacklist" all entities with e.g. "light.dcede305_a5afe582" in theire entitiy name are removed an not handled by the telegrambot. I will think about a way to only request the related entities regarding the action you chose. But probably there wasn't a good way to do this with appdaemon. Do you have such massive enitites in you home-assitant instance?
The hass "token" an "ha_url" are used the the actions "get log" and "get error log". When you can use curl to run a request from appdaemon against home-assistant using the configured "ha_url" thats good. The token is needed to authenticate against home-assistant. You can check it by manually sending the following headers with curl "Authorization": "Bearer {token}", "Content-Type": "application/json".
|
The waze feature is not working currently on my side. I get an error, have to look into it. |
This delay sounds familiar. For me if I press for example "turnon light" in Telegram, there is also a delay of about 20 seconds. In my case this has always been the case. I think it depends on the number of devices/entities you have, or the size of DB? Since I cleaned up lots of my unused devices, the result is 2 times quicker (delay was 50-60 seconds before). Apart from that for me this is not a big issue as I pin the results of the frequent used commands to my Telegram app. This way I can acces them quick. As long as the HA instance is not restarted, the device numbered codes remain working, without issueing a new "turnon light" command. The Waze function I do not use, also the use-case of this function is not clear to me. @avico78 : Did you also update appdaemon to newest version? I am reluctant to update because it might break this telegrambot? |
If you also have this delay it probably has to do with the number of entities in home-assistant. How many are in your instance? I am currently running "acockburn/appdaemon:latest" without any issues for me. |
@GeitjeG on v1.1 - with same number of entities the respond is fast ,
Suggestion : for person :
for logs: When clicking on get log or get error log - nothing happened for ~2-3 min,
in same time an error show in error.log
|
I have 1142 entities, I might want to clean up a little :-) |
@GeitjeG - thanks , i can live with the lag (i just suppress the print for the entities ) , |
To reduce the delay. What do you think about the following solution:
|
Regarding the retrievement of the log.
Both are using different api endpoints. Currently only get_log is working as the endpoint "api/error/all" is not available anymore. (https://developers.home-assistant.io/docs/api/rest). I suggest we just remove the action"get_error_log". |
With waze correct workflow was:
Problem: Thus if this functionality is still required we have to find a differend workflow. Does one of you need this functionality? Any ideas? |
@avico78: Just realised, that you had problems with the get_log function. According to your error message in the log you have som connection problems between appdaemon an home-assistant. Are they both on the same docker network? Are you using a reverse proxy in front of home-assistant? |
from AP i'm able to get data from HA:
When click on get_error_log on telegram - it hands for ~3 min and than i see in error.log:
And yes , using traefik as RP , auth_providers:
- type: homeassistant
- type: trusted_networks
trusted_networks:
- 192.168.1.0/24
- 172.29.0.0/20 |
@avico78: With curl you used the ip 192.168.1.113. The appdaemon error log shows the ip 192.1.168.113. Is this just a typo in your post or a wrong configuration of appdaemon? |
@foxcris - nice catch ! it did solved the get_log but get_errors still not working ,
and
Questions if I may: 1.Is it possible to send text to the bot which can be use in some HA automation ? |
|
After 2 years with v1.1 I try to upgrade to latest ,
I also update AD to latest .
1.It is much slower (click on telegram --> getting result takes more than 20 sec)
i.e - when i click on "state person " - i see in the log it fetching from HA hundreds of entities not related to person .
very small example from debug:
This not happened with v1.1
i suspect it related with how filtering list working in new version but not sure as i use exactly same configuration in the app.yaml
Actually when click on "get log" or "get error log" it hangs for ~1 min
2.How does the Waze location works?
It doesn't appear in menu and Person location doesn't return with any calculation of routing .
I see in v1.2.3 there's need to add a token to apps.yaml- where exactly it's needed?
I added the token and ha_url - but keep getting this errors .
I enter to the AD docker and manage to
execute curl - so not sure where this error coming:
from inside the AD docker:
apps.yaml
The text was updated successfully, but these errors were encountered: