In the SocketController component, we have notifications and notification.message. This message comes in the following format:
"DeviceName stopped at 2025-05-06 10:13:46\n", this response could come with a slightly different response, something like: "DeviceName&stopped at&2025-05-06 10:13:46", this notification message allows me to use javascript's .split and get an array like ["DeviceName", "stopped at", "2025-05-06 10:13:46"], like this:
const parts = message.split("&");
const device = parts[0]; --->"DeviceName"
const action = parts[1]; --->"stopped at"
const date = parts[2]; --->"2025-05-06 10:13:46"
This way, I can work individually with the device, the action and the date, translate the action with my useTranslation hook (I would probably still need to separate the "stopped" from the "at" to use the hook correctly) and not need to make a major adaptation to achieve the same result.
Unfortunately, I don't know JAVA yet to suggest this change on the server's github, but I can suggest it on the Web App.

You don't have to use the formatted string. You can use the raw data that also comes through the same websocket.
Thank you! I was able to find and adapt it to my needs.
In the SocketController component, we have notifications and notification.message. This message comes in the following format:
"DeviceName stopped at 2025-05-06 10:13:46\n", this response could come with a slightly different response, something like: "DeviceName&stopped at&2025-05-06 10:13:46", this notification message allows me to use javascript's .split and get an array like ["DeviceName", "stopped at", "2025-05-06 10:13:46"], like this:
const parts = message.split("&");
const device = parts[0]; --->"DeviceName"
const action = parts[1]; --->"stopped at"
const date = parts[2]; --->"2025-05-06 10:13:46"
This way, I can work individually with the device, the action and the date, translate the action with my useTranslation hook (I would probably still need to separate the "stopped" from the "at" to use the hook correctly) and not need to make a major adaptation to achieve the same result.
Unfortunately, I don't know JAVA yet to suggest this change on the server's github, but I can suggest it on the Web App.