How much notifications append without to open Gui-O
-
@sato said in How much notifications append without to open Gui-O:
Do you mean
Autoconnect (Automatically (re)connect )
Put it now ON. I will test if it fix the frozen of the App, i hope it doesNo, I mean in the Android OS settings. When you turn on the notifications, it displays a message -> "App settings". Click on it and set the values according / similar to this (see images under this link):
https://www.gui-o.com/examples#h.ujq2e0ve4vac
@sato said in How much notifications append without to open Gui-O:
Here we have 3 notifications with only one timestamp, so as more notifications arrive, they are added to the existing ones, which without the timestamps separates them, gets a little bit confusing.
This is a problem on your side. You need to send push notifications one - by one. You are sending them all together...
So, like this:
// first notification... String pushNotification = "your data..."; mqttClient.publish(&Push[0], (const char*) pushNotification.c_str()); // second notification... pushNotification = "your new data"; mqttClient.publish(&Push[0], (const char*) pushNotification.c_str()); // third notification... pushNotification = "your new new data"; mqttClient.publish(&Push[0], (const char*) pushNotification.c_str()); and so on...
@sato said in How much notifications append without to open Gui-O:
If uncomment the Phone1 UUID, the compiler show a error. Redefinition of 'const char* Push'
Of course, you cannot redefine a variable... Do it like this.
//Phone1 UUID static const char *Push1 = "e79a7f79-9fe5-4322-aee3-cfd10f940b1d/notifications"; //Phone2 UUID static const char *Push2 = "d3f1e986-16b3-4158-9724-52db22471d0c/notifications";
then
mqttClient.publish(&Push1[0], (const char*) pushNotification.c_str()); mqttClient.publish(&Push2[0], (const char*) pushNotification.c_str());
P.S. You should not reveal your app id. Now I can send a false push notification to your device Of course, I need access to the broker (which is "public" in this case).
BR,
kl3m3n -
Hi @kl3m3n,
No, I mean in the Android OS settings.
Have not this setting on my Android 12. I search for Auto on settings and it show Android Auto, and there is all options ONYou should not reveal your app id. Now I can send a false push notification to your device
No you can't. Have modified the tokens before sendingThis is a problem on your side
No, you can see on my serial port that every 5 minutes
only one Push notification is send at time, with Arduino serial port timestamp//----- Push notifications every 5 minutes for testings!! --------
void loop() {
if (alert == 1) {
Push_falha(); // send Push
alert = 0; // The timer set it again when passed 5 minutes
}
unsigned long currentTime2 = millis();
if (currentTime2 - previousTime2 >= eventInterval2) { // 5 Min
const String numberStr(random(27));
nr_falha = numberStr.toInt(); //random failure number
alert = 1; // time is passed, set flag, so it can send Push again
previousTime2 = currentTime2;
}
}void Push_falha() {
/* PUSH NOTIFICATION /
texto_falha(); // get the failure text to the variable "avaria"
// ---- add the failure to Historico.txt ----
//-------------------------------------------------------------
strdata = "02-04-2022 14:57"; // Later get timestamp from RTC
strdata = avaria += strdata;
adiciona_falha(); // add to file Historico.txt
// ------------------------------------------------------------
String pushNotification("PixelBox - ");
// send the Push
pushNotification += pixelbox_id += avaria;
mqttClient.publish(&Push[0], (const char)
pushNotification.c_str());
// Print it on serial port
Serial.print("Notification done ");
Serial.println(avaria); // print the failure
nr_falha = 0; // clear the failure number
}Thanks for tip to send the Push for more then one UUID
BR
-
What happens when you tap the "App Settings" (see image below)?
@sato said in How much notifications append without to open Gui-O:
No you can't. Have modified the tokens before sending
Very nice!
@sato said in How much notifications append without to open Gui-O:
mqttClient.publish(&Push[0], (const char)
pushNotification.c_str());Does this code compile? It should be (const char *).
-
-
Perhaps have make a error on copy and paste, but on the code here it is:
mqttClient.publish(&Push2[0], (const char*) pushNotification.c_str());and it compile
Another question: On my other Android 10 i have allready the new version v.1.0.10.1 but i not make any update, do it make the update automatically without to ask?
BR
-
@sato said in How much notifications append without to open Gui-O:
Have the same info on IoT settings
Yes, it compile
BR
Yes, I know, what happens if you press App Settings?
-
@sato said in How much notifications append without to open Gui-O:
Perhaps have make a error on copy and paste, but on the code here it is:
mqttClient.publish(&Push2[0], (const char*) pushNotification.c_str());and it compile
Another question: On my other Android 10 i have allready the new version v.1.0.10.1 but i not make any update, do it make the update automatically without to ask?
BR
This is up to you. You can disable auto update feature from Google Play app. It has nothing to do with GUI-O.
-
Now I am sending the Push notification to both cell phones. I pressed on both CLEAR ALL and also clear my serial port.
5 minutes later, get on both phones the new notification, but it as also added the text of the two previous notifications before the CLEAR ALL pressed.In the Serial port I only have now one notification and that's is correct.
Maybe, you have some Buffer that you don't clear and then the new notification text is sent along with previous notifications?
BR
-
@sato said in How much notifications append without to open Gui-O:
Hi @kl3m3n,
No, I mean in the Android OS settings.
Have not this setting on my Android 12. I search for Auto on settings and it show Android Auto, and there is all options ONYou should not reveal your app id. Now I can send a false push notification to your device
No you can't. Have modified the tokens before sendingThis is a problem on your side
No, you can see on my serial port that every 5 minutes
only one Push notification is send at time, with Arduino serial port timestamp//----- Push notifications every 5 minutes for testings!! --------
void loop() {
if (alert == 1) {
Push_falha(); // send Push
alert = 0; // The timer set it again when passed 5 minutes
}
unsigned long currentTime2 = millis();
if (currentTime2 - previousTime2 >= eventInterval2) { // 5 Min
const String numberStr(random(27));
nr_falha = numberStr.toInt(); //random failure number
alert = 1; // time is passed, set flag, so it can send Push again
previousTime2 = currentTime2;
}
}void Push_falha() {
/* PUSH NOTIFICATION /
texto_falha(); // get the failure text to the variable "avaria"
// ---- add the failure to Historico.txt ----
//-------------------------------------------------------------
strdata = "02-04-2022 14:57"; // Later get timestamp from RTC
strdata = avaria += strdata;
adiciona_falha(); // add to file Historico.txt
// ------------------------------------------------------------
String pushNotification("PixelBox - ");
// send the Push
pushNotification += pixelbox_id += avaria;
mqttClient.publish(&Push[0], (const char)
pushNotification.c_str());
// Print it on serial port
Serial.print("Notification done ");
Serial.println(avaria); // print the failure
nr_falha = 0; // clear the failure number
}Thanks for tip to send the Push for more then one UUID
BR
Do you clear "avaria" variable? And "pixelbox_id"? Where do they come from?
-
@kl3m3n,
Sorry to come back to the same topic, but I think Push notifications should become well functional.From the fourth notification, I stop receiving the following ones on both phones.
Then I pressed CLEAR ALL on both phones, that cleared the notifications data on the phones, but I still don't receive the notifications that are being sent. All the followed notifications I can see on the serial port.Please take a look at it calmly, surely you can solve it.
Best Regards
-
Since I now receive notifications simultaneously on both phones it is easier to make comparisons.
Serial Port debug!
16:00:49.760 -> Push * Zeit zwischen Impulsen überschritten *
16:05:49.767 -> Push * Fehler Bremsschalter1 *
16:10:49.754 -> Push * Beide Bremsschalter Defekt *
16:15:49.773 -> Push * Beide Bremsschalter Defekt *
//Receiving two identical failures in a row is normal because I haven't filtered it yetFrom here, the notifications are no more received, on both Phones, must open a Gui-O on one from them, then it works again
16:20:49.763 -> Push * Außerhalb der Türzone angehalten *These are the screenshots from both, hope it helps.
Best regards
-
@sato ok, let's go step-by-step...
Please try to answer the questions below:
-
Navigate to "Settings -> Quick pair -> IoT settings" and disable IoT notifications. Enable them and when the second dialog pops up, please press the "App settings" button and send the screenshot.
-
Navigate to "Settings -> Quick pair -> IoT settings" and check "Notifications to show". What number does it show? For example, is it showing "Showing 3 recent"? This means the number of notification that will be shown. The oldest notification gets discarded when a new notification arrives. Note that Android cannot show unlimited notifications on screen. You can change the number of notifications to show by pressing the menu entry.
-
I am attaching a windows script that periodically sends the notifications to the specified channel. First download and install mosquitto from https://mosquitto.org/download/
Then download this pub_test.txt
and rename extension to ".bat". Open the script and modify <application UUID> for your case. You can also modifiy the time period with which the notifications are sent... It is 5 seconds by default (see timeout value).Please test if this works with your device.
BR,
kl3m3n -
-
Hello @kl3m3n,
Here the screenshot of Point 1 and Point 2
Have installed mosquitto and run your script with timeout of 10 seconds
Here the screenshot tooBR
-
@sato Again, please press the "App settings" text / button. This is the screenshot I need to examine!
Otherwise, everything looks ok. You are showing 2 last notifications, and they are displayed. You can modify the script to put some additional text and simulate sending data every 300 seconds (5 min).
Do you see any problem here? What would you expect from this test that you just made?
BR,
kl3m3n -
Hi kl3m3n,
Here the sreenshot
Is this what you need?When i choose on the menu, more then 2 notifications to show, then Gui-O freeze many times, have than to force to close the App
Memory allocation?What i expected?
That Gui-O have a good working Push notificationsI will add in your test script, text like that what i do
in my test programm, to see if it works too.
With your script it works fine, have more than 200 on index with timeout of 10 seconds.Afternoon or tomorow i will give feedback
BR
-
Hello @kl3m3n,
So far, your script pub_test.bat is continuously sending notification with the index incrementing. How can I modify it so that it also sends some text.
Thanks for your help
BR
-
@sato try adding the text before %index%:
"this is the text %index% and so is this"
Your notifications are also probably too long. My device automatically removes some of the notification text if they take up to much space. Notifications should be short and to the point.
Did you enable autostart feature for GUI-O app? And disable all battery saving features for it? Samsung has its own way of dealing with such things... Just Google this.
BR,
kl3m3n -
Hie @kl3m3n
Thank youI know, I've googled it.
The Autostart option I haven't found on my phones yet, but I'll keep looking because that could solve the issue.
Yesterday I tried to open Gui-O when the index was at 121, and I found that the App had frozen, but I was still getting the notifications from your script.
I'll turn on logcat and send it to you later, maybe you can see something that will help.Best regards