How much notifications append without to open Gui-O
-
@sato Hello,
the notification panel itself shows only the last notification... I can maybe upgrade this to show the last 5 or 10 messages (maybe this could be a user setting)? Note that the entire log for all messages is already accessible from the GUI-O application.
I don't understand why you stop receiving notifications. Is the notification panel visible when you stop receiving notifications? Have you tried setting up your settings as described here (see images):
https://www.gui-o.com/examples#h.ujq2e0ve4vacIt is currently not possible to distinguish between the different devices sending the notifications - all messages are transmitted on the same channel / topic. You should also send the "id" of your device when you send a notification. For example: "DEVICE NAME: NOTIFICATION TEXT"
Firstly, I would like to confirm that the notification service is stable on your side. If I understand correctly, the notifications still don't show properly. I have tested on 2 devices and had no problems - even when running for 10+ hrs. I need to get some more information about this - could you please describe exactly what you are doing and what the problem is (step-by-step)?
BR,
kl3m3n -
Hello @kl3m3n,
What is happening in my tests is that after receiving about 4 or 5 messages without opening the Gui-O, these accumulate and are visible, "which is fine".
From then on, most of the time I stop receiving notifications from this device.
The notifications are still being sent, I can see them on the serial monitor.
To receive them again you just need to open the Guio-O to connect to that device and close the App again.
I always know which device sent the notification because I send the respective device name, "Thank you" plus the text of the failure.
Today, I once had to force Guio-O to stop because it wouldn't open.
In real life, I think this won't be a problem, because whoever receives notifications will certainly open the Gui-O.
I talked about each device having independent notification, for the simple fact that, for example, if two messages are received almost at the same time, from different devices, there won't be time to open the Gui-O, so you will only be able to see the last one, if the device does not send messages again, will not be
able to see it anymore.
Of course, this can also be solved by the microcontroller side, for example, i can create a button in the Gui-O to validate the message reception, otherwise the microcontroller would send it again, always until it is confirmed.Best regards
-
Hi @kl3m3n,
Thanks for Update 1.0.8.1
It is already much better, since the msgs from the various devices are now displayed, but these messages persist even after opening the app and connecting to all the devices that have sent Push messages.
As such, these messages should be eliminated, otherwise they persist from then on even though they have already been consulted in Gui-O and the failures resolved.
If this improvement is possible, that would be great, or the user to have a way to eliminate the Push that no longer interests him.Regards
-
@sato ok, I will check. Meanwhile, you can send an empty string to the notification channel to clear them...
I am now checking other problems you've mentioned.
BR,
kl3m3n -
@sato I think I have found the cause of the black screen (GUI-O not starting when pressing the notification). I must test this a little bit more and will get back to you.
BR,
kl3m3n -
-
@sato The version v1.0.9 should be available soon.
In addition to other fixes, the notifications are not cleared whenever the GUI-O is "moved to the front".
BR,
kl3m3n -
-
Hi @kl3m3n,
Push notifications being, in my opinion, one of the most interesting and useful features, it's worth the continuous improvements kl3m3n is making, for which we are grateful.
Version v1.0.9.1
App froze 3 times and I had to force close it, because it wouldn't open anymore
On another occasion, it was frozen, but after a while it opened, without having to force closeFor a more precise information, all notifications should also show the hour:minutes information
I am not speaking for myself, as I have an RTC on my devices, I can add this information in the body of the message, other GUI-O users may not have the RTC.I attach the screenshot where you can see that the notifications add up, it's a little confusing.
It could show all notifications with only the fault that caused that notification.Example of notifications, easier to understand, in my opinion:
10:45 OF24 xxx * Fault xxx *
10:48 Obra_21 xxx * Load limit *
10:50 OF24 xxx * Fault Brake switch1 *
10:53 Obra_21 xxx * Overload *
10:55 OF24 xxx * Load limit *
10:58 Obra_21 xxx * Over Temperature *
and so on...Hope it helps
BR
-
I have added date / time to each notification for next release, e.g.:
[12 Jun, 00:26] <notification text>
@sato said in How much notifications append without to open Gui-O:
Version v1.0.9.1
App froze 3 times and I had to force close it, because it wouldn't open anymore
On another occasion, it was frozen, but after a while it opened, without having to force closeCan you please tell me step by step, when does this occur. Can you reproduce this problem? It would be very good if you can record a logcat when this happens and send it to me.
I cannot reproduce this problem on any of my devices or emulators (using Android 12).Thank you,
kl3m3n -
Hi @kl3m3n,
What has been happening is, I get about 4-7 notifications without opening the App, from then on there are no more notifications, my device keeps sending every 5 minutes. I open the App, only up to Connect . Create . Control and then close it again. Then it starts receiving notifications again until later it stops receiving them again.
In the next version, if I continue with this problem, I make log and send it.
BR
-
Hi @kl3m3n,
Here the Log from the PC_SerialPort
12:26:05.237 -> Language 2
12:26:05.237 -> MQTT connecting...
12:26:05.610 -> MQTT connected!
12:30:55.920 -> Notification send * reserviert *
12:35:57.190 -> Notification send * Kabine Lastgrenze *
12:40:57.231 -> Notification send * Motorwärmesensor Fehler *
12:45:57.203 -> Notification send * Nr_failure 0 *
12:50:57.226 -> Notification send * Manuelle Tür schließt nicht. *
13:00:57.217 -> Notification send * Schwache kommunikation *
13:05:57.253 -> Notification send * Sicherheitskreis Ausfall während der Bewegung *
13:10:57.236 -> Notification send * Schwache kommunikation *
13:15:57.272 -> Notification send * Auf der Etage angehalten, Kommunikationsfehler *
13:20:57.278 -> Notification send * Stromausfall *
13:25:57.261 -> Notification send * Motorwärmesensor Fehler *
13:30:57.268 -> Notification send * Stromausfall *
13:35:57.284 -> Notification send * Zwangskalibrierung durchgeführt *
13:40:57.261 -> Notification send * Sicherheitskreis in Bewegung wiederhergestellt *
13:45:57.305 -> Notification send * Übertemperatur in der Steuerung *
13:50:57.304 -> Notification send * Tür schließen Versuche überschritten *
13:55:57.317 -> Notification send * Motorwärmesensor Fehler *
14:00:57.295 -> Notification send * Manuelle Tür schließt nicht. *Comparing both, it looks like the Printscreen is missing some notifications.
I think this Serial port format, would be ideal. I don't know if it is possible for You to do it so.
The timestamp comes from the Arduino Serial Port. I disabled sending the RTC time from my device, because it's not necessary, you already send that info in the Push notification.I haven't done any more tests yet. Perhaps you can check why notifications are missing on the Printscreen.
A useful function would be that by pressing CLEAR ALL, before deleting, this content could always be incremented "APPEND" in a Log_Push file in the Gui-O document area on the cellphone. It could later be used if needed to analyze failures over time, but it is just an idea.
BR
-
@sato Hello,
I am sorry, but I do not understand this...
Where is "PixelBox - Obra_21..." text on the serial console? There seems to be some missing text that is shown on the print screen, but not on the serial console.
Serial port format - I don't understand this either. You mean there should be a -> sign? Maybe the seconds could also be displayed, but milliseconds is an overkill.
Again, I don't understand what does "APPEND" mean?
BR,
kl3m3n -
Hi @kl3m3n,
"PixelBox" is the product type
"Obra_21 R. do Caires 46" is the location
In this case prepared to: PixelBox - Obra_21 R. do Caires 46 is the complet device name = pixelbox_idpushNotification += pixelbox_id += failure;
mqttClient.publish(&Push[0], (const char*) pushNotification.c_str());So, the Push notification from this device is like:
PixelBox - Obra_21 R. do Caires 46 * Stromausfall *
------------ pixelbox_id ---------- -- Failure --The results on the Gui-O App should be like this, if possible.
[your timestamp] PixelBox - Obra_21 R. do Caires 46 * Stromausfall *
[your timestamp] PixelBox - Obra_21 R. do Caires 46 * Übertemperatur in der Steuerung *
----- can receive Push from other device too, is this case from location: OF24 R. de Paris Nr.12 -----
[your timestamp] PixelBox - OF24 R. de Paris Nr.12 * Stromausfall *
[your timestamp] PixelBox - Obra_21 R. do Caires 46 * Max Temperatur *The Arduino timestamp, have it activated to compare with the Gui-O Push notifications timestamps.
To simply the debug, only for my serial port, i filter out the PixelBox and location, than for the tests have only one device connected, that send notifications every 5 minutes
---------simplified Serial port output ----------
17:04:01.408 -> Push * Beide Bremsschalter Defekt *
17:09:01.370 -> Push * Kabine Lastgrenze *What i mean with Append, is: Gui-O can create a txt file on the Gui-O area on the cellPhone memory.
When click on CLEAR ALL, before delete the notifications, write it to this txt file:
[your timestamp] PixelBox - Obra_21 R. do Caires 46 * Übertemperatur in der Steuerung *
[your timestamp] PixelBox - OF24 R. de Paris Nr.12 * Stromausfall *
[your timestamp] PixelBox - Obra_21 R. do Caires 46 * Max Temperatur *Next time clicking CLEAR ALL, befor delete, open this txt file again and write "append" to that txt file the content of the received Push notific. on Gui-O:
[your timestamp] PixelBox - OF24 R. de Paris Nr.12 * Batterie Ausfall *
[your timestamp] PixelBox - Obra_21 R. do Caires 46 * Min Temperatur *so the txt file as now the sumary of the content of both times, the 5 Push notifications lines, and so on.....
When need to look for any reason all the received notifications, we can go to the Gui-O memory area and copy this txt file and open it on a editor.
I hope I was able to explain it in a way you can understand
BR -
@sato there is already a log for push notifications. You can open it from the GUI-O app. It is located in the "Notifications" folder on the device. You can also set how many notifications are shown (press the menu entry to change)...
See screenshot below.
Every new notification gets a timestamp, so I still don't understand your format? The notifications are already displayed like this. Control the timestamp with publish messages. Each publush will get its own timestamp.
Where the text breaks - this is up to the Android...BR,
kl3m3n -
Hi @kl3m3n,
Sorry, I didn't see that you had already added that feature.
Good, that way we always have a backup of all notifications, just in case we ever need it.If I want to delete the whole content of that file, because it has too many test notifications, how can I do it?
Output on Gui-O
Look that here the timestamp are no more to see, wich of these notifications are send with 5 minutes interval
[21:09] PixelBox - Obra_21 R. do Caires 46 * Position is changed * * Fehler Bremsschalter2 * * Motorwärmesensor normalisiert *Where the text breaks - this is up to the Android.
It could be, but all the notifications are sent with their timestamps, where are they?That's should look like. Every notification separated trough the timestamp.
[21:09] PixelBox - Obra_21 R. do Caires 46 * Position is changed *
[21:04] PixelBox - Obra_21 R. do Caires 46 * Fehler Bremsschalter2 *
[20:59] PixelBox - Obra_21 R. do Caires 46 * Motorwärmesensor normalisiert *Another issue is that from the 4th notification, Gui-O stops receiving more notifications. To continue receiving, I have to open the App, after 5 minutes I receive the next notification, and so on.
Another question, if I want my device to send Push Notifications to 2 or 3 cell phones, is that possible?
So, would Gui-O have to support more than one Application UUID, or can it be colonized?BR
-
@sato said in How much notifications append without to open Gui-O:
If I want to delete the whole content of that file, because it has too many test notifications, how can I do it?
Currently, you need to do this from the system's "file manager" app. Go to Android/data/com.guio.guioapp/files/Notifications
I can add a delete icon to the GUI-O app.
@sato said in How much notifications append without to open Gui-O:
Another issue is that from the 4th notification, Gui-O stops receiving more notifications. To continue receiving, I have to open the App, after 5 minutes I receive the next notification, and so on.
Are you sure you have "Autostart" for GUI-O enabled from the system settings? Sometimes, on my device the service is also killed by the OS, but the OS restarts it automatically after 1 second.
@sato said in How much notifications append without to open Gui-O:
Another question, if I want my device to send Push Notifications to 2 or 3 cell phones, is that possible?
No problem, just use the application UUID for each GUI-O app, when sending the notification. Each device has a unique id, so you just need to publish to the appropriate topic from your device side.
BR,
kl3m3n -
Hi @kl3m3n
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 doesI have 4 notifications and the 5 minutes time has passed, as such I should receive the next one, but it don't, to continue receiving I have to open the App
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.
[10:09] PixelBox - Obra_21 R. do Caires 46 * Position verloren * * Bremsschalter2 * * Motorwärmesensor normalisiert *
This is better. Can you fix that to this?
[10:09] PixelBox - Obra_21 R. do Caires 46 * Position verloren *
[10:04] PixelBox - Obra_21 R. do Caires 46 * Bremsschalter2 *
[09:59] PixelBox - Obra_21 R. do Caires 46 * Motorwärmesensor normalisiert *Phone1 UUID
//static const char *Push = "e79a7f79-9fe5-4322-aee3-cfd10f940b1d/notifications";
Phone2 UUID
static const char *Push = "d3f1e986-16b3-4158-9724-52db22471d0c/notifications";//send Push
mqttClient.publish(&Push[0], (const char*) pushNotification.c_str());If uncomment the Phone1 UUID, the compiler show a error. Redefinition of 'const char* Push'
BR
-
@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