Hello to all friends of the fantastic Homeassistant,
i am looking for help with getting notifications to my phone Xiaomi Poco with Android 11 please.
I installed a simple waterleakdetector connected to an ESP8266 triggering a binary-sensor in HA (wich is running on RaspberryPi3b with SSD).
Then made an automation with service notify.mobile_app and switching on/off a light.
Sometimes it works correct, get the notification with ringing on the phone after some seconds the watersensor indicates and the light flashes. (all testet in LAN and WLAN)
But often only the light flashes and there is nothing on the phone until i switch it on. The notification always is indicated as “now”, although the alarm has happend 20 minutes ago.
I checked al permissions on the phone but can not find anything wrong (and sometimes it actually works correctly too) Can it be that HA stores the notification because there is any interruption connecting to companion app ?
Any ideas please ?
(because it doesn’t make sense that way. The basement flat is flooded before I notice anything :–))
I checked it again, i do not have any of the two powersave-modes enabled. Also companion-app has no power saving. I switched to maximum power-mode (wich tells me now permanently that there is less battery runtime) but it changes nothing.
Sometimes, also after 1 hour without phone-activity it works. But mostly also after some minutes not.
I actually suffer this too, with my OnePlus 6T Android 11. I never find what to change to make it work. The only thing I noticed is, it works flawlessly, when the phone is attached to a charger. So I don’t think, it is a HA issue, it must be something on the phone.
But I did not dive deeper in it, I did setup a TTS announcer with a speaker, that can be heard in the whole house, so critical announcements can’t be missed. That works like charm.
@dshokouhi : that got me the solution ! Thank you !
already i used my own chanel and ‘importance: high’ etc. but ‘ttl: 0’ and ‘priority: high’ brought the success. Now i am back with the phone at normal mode and it runs perfekt !
(now the light don’t turn off, but no problem … have to read and learn more :–)
@BebeMischa : perhaps you should read also what dshokouhi told us ?
@Ede : the sonsor is a simple two-transistor darlington as you can find the information all over the internet. It’s direct connected with 3 pins over a shielded, 3 meter long cable to a GPIO of an ESP8266, with pull-up activated (programmed with the ESP-Home integration). The sensor stands on the floor with 3 pairs of M3-Inox-screws wich are the sensor-probes (i do not expect oxidation, normaly all is dry :–) Thats it.
Later i will install some more sensors of that type not only in my water-room, also in the heating- and in the laundry-room. Perhaps i use additionally selfmade 3D-printed mechanic sensors with floatation body and Hall-sensor with another input of the ESP8266 … this theme is very important to me.
sorry for replying on an old topic.
for me, it still was not sufficient to work.
I had to chain the solution from dshokouhi, but send a “command_screen_on” prior.
Something is still wrong on the phone side but it always worked after the screen got turned on.