I can’t provide any insight into the issue I’m afraid, but those that can will probably want to know what version of the app you are running, and what version of local server as well.
Information from the Blynk local server logs, especially those relating to the notification send process will probably be helpful too.
I assume that your local server has a constant connection to the internet and that there are no issues with this, and that you’ve tried rebooting everything, including the router?
There was an issue previously with iOS notifications, which required the Blynk app to be uninstalled then reinstalled to fix the issue…
Any actions on your side during this time? Login/logout, stop/run project… did you open Blynk app at all during this time?
Are you the only one using the project (it is not used on other phones)?
How often notifications are sent?
What response do you get when sending notification using http api?
I opened the app and I am sure the app disconnected and connected automatically during that time due to lost WiFi etc.
I am using notifications in several projects on my local server. One project is shared but others are not. All do not work now. Before I had the effect, that the shared device got the notification and I did not on the main project.
With the http call the notification worked on all projects! In my project I use the Nodered notification widget or on the esp the function call.
I get the following response:
Many of the following line…
== Info: Expire in 0 ms for 1 (transfer 0x1c55880)
== Info: Trying ::1…
== Info: TCP_NODELAY set
== Info: Expire in 149999 ms for 3 (transfer 0x1c55880)
== Info: Expire in 200 ms for 4 (transfer 0x1c55880)
== Info: Connected to localhost (::1) port 8080 (#0)
=> Send header, 170 bytes (0xaa)
0000: POST //notify HTTP/1.1
0038: Host: localhost:8080
004e: User-Agent: curl/7.64.0
0067: Accept: /
0074: Content-Type: application/json
0094: Content-Length: 15
00a8:
=> Send data, 15 bytes (0xf)
0000: {“body”:“test”}
== Info: upload completely sent off: 15 out of 15 bytes
<= Recv header, 17 bytes (0x11)
0000: HTTP/1.1 200 OK
<= Recv header, 24 bytes (0x18)
0000: connection: keep-alive
<= Recv header, 32 bytes (0x20)
0000: access-control-allow-origin: *
<= Recv header, 19 bytes (0x13)
0000: content-length: 0
<= Recv header, 2 bytes (0x2)
0000:
== Info: Connection #0 to host localhost left intact
When you said that with the http call the notification worked on all projects, did you mean that a notification, sent using http api with a token of a device used in a shared project, was received on both phones (both main and shared account received push)?
What phone/app version is used on a shared account?
When you say you had effect notification received on a shared but not main project - was it just once? Is it possible that when you say notifications don’t work (for this particular, shared project) they actually do work for a shared account?
The the code from esp8266 that handles notifications dispatch uses ordinary Blynk.notify() function, right?
Shared device is using same app version and also iOS. For now I signed out on the shared device for closing in on the problem.
I just found out - and I can reproduce it - when I stop and start the one project under my user that does not send notifications it starts again sending. But the other one stops. When I do same stop/start on the second one it works on it but stops on the first one.
Seems like either the one or the other project can send the notification. Or at least the app on the phone processes it.
I still don’t understand how come http /notify api works when Blynk.notify() don’t.
Can you increase the server log level to trace, this will make server output to blynk.log file not just errors, but when notification sent successfully as well, so you know for sure notification was dispatched.
In the log file I can find the following for the “not working project” (garage):
22:08:43.418 TRACE- Incoming id=648, command=Push, body=‘Garage door opened’
22:08:43.419 DEBUG- User has no access token provided for push widget.
Then I stopped the garage project and started again. The following test sent a push and log file says:
22:14:19.413 TRACE- Incoming id=1028, command=Push, body=‘Garage door closed’
22:14:19.414 TRACE- Sending push for user xxx@xxx.xx, with message : ‘Garage door closed’.
22:14:19.416 DEBUG- Using pooled Channel ‘[id: 0x85121bee, L:/192.168.11.11:50668 - R:fcm.googleapis.com/172.217.16.74:443]’ for ‘POST’ to ‘https://fcm.googleapis.com/fcm/send’
22:14:19.416 DEBUG- Using open Channel [id: 0x85121bee, L:/192.168.11.11:50668 - R:fcm.googleapis.com/172.217.16.74:443] for POST ‘/fcm/send’
Now the Homeautomation Project doesnt send push and log file is:
22:14:31.109 TRACE- Incoming id=94, command=Push, body=‘Test!’
22:14:31.109 DEBUG- User has no access token provided for push widget.
What is the “access token for push widget” ?
When I run the HTTP API call on the non working project, I get the following error as a response to the command: “Notification widget not initialized.”