nightscout / cgm-remote-monitor

nightscout web monitor
GNU Affero General Public License v3.0
2.38k stars 71.59k forks source link

2 bugs in ifttt maker when Nightscout language is set to ru #8104

Open Stan-Di opened 11 months ago

Stan-Di commented 11 months ago

Hello! I find 2 bugs in ifttt maker when Nightscout language is set to ru:

1) There is no ns-warning trigger, only ns-events:

2023-10-08T02:34:11.796Z    EMITTING ALARM:
  {"level":"Осторожно","title":"Осторожно LOW","message":"BG Now: 3.8 -0.2 → mmol/L\nКалькулятор болюса: 0.24U\nIOB: -0.57U","group":"default","plugin":"simplealarms","debug":{"lastSGV":3.8,"thresholds":{"bgHigh":260,"bgTargetTop":220,"bgTargetBottom":75,"bgLow":55}}}
WS: Connection from client ID:  eHLv8gciObYgE740AAAA  IP:  ::ffff:213.87.157.144
sent maker request:  https://maker.ifttt.com/trigger/ns-event/with/key/my_very_secret_key?value1=%D0%9E%D1%81%D1%82%D0%BE%D1%80%D0%BE%D0%B6%D0%BD%D0%BE%20LOW&value2=%0ABG%20Now%3A%203.8%20-0.2%20%E2%86%92%20mmol%2FL%0A%D0%9A%D0%B0%D0%BB%D1%8C%D0%BA%D1%83%D0%BB%D1%8F%D1%82%D0%BE%D1%80%20%D0%B1%D0%BE%D0%BB%D1%8E%D1%81%D0%B0%3A%200.24U%0AIOB%3A%20-0.57U

2) Notifications arrive EVERY MINUTE But if language=en, there is a line in the log notify: simplealarms_1 has ALREADY been sent and notifications arrive once every 15-30 minutes by default

if the language is en then it looks like this:

2023-10-08T03:11:59.385Z    EMITTING ALARM:
  {"level":"Warning","title":"Warning LOW","message":"BG Now: 3.8 +0.5 ↗ mmol/L\nBWP: 0.22U\nIOB: -0.55U","group":"default","plugin":"simplealarms","debug":{"lastSGV":3.8,"thresholds":{"bgHigh":260,"bgTargetTop":220,"bgTargetBottom":75,"bgLow":55}}}
sent maker request:  https://maker.ifttt.com/trigger/ns-event/with/key/my_very_secret_key?value1=Warning%20LOW&value2=%0ABG%20Now%3A%203.8%20%2B0.5%20%E2%86%97%20mmol%2FL%0ABWP%3A%200.22U%0AIOB%3A%20-0.55U
sent maker request:  https://maker.ifttt.com/trigger/ns-warning/with/key/my_very_secret_key?value1=Warning%20LOW&value2=%0ABG%20Now%3A%203.8%20%2B0.5%20%E2%86%97%20mmol%2FL%0ABWP%3A%200.22U%0AIOB%3A%20-0.55U
sent maker request:  https://maker.ifttt.com/trigger/ns-warning-low/with/key/my_very_secret_key?value1=Warning%20LOW&value2=%0ABG%20Now%3A%203.8%20%2B0.5%20%E2%86%97%20mmol%2FL%0ABWP%3A%200.22U%0AIOB%3A%20-0.55U
sent maker event:  {

For now I solved the problem with a "crutch" :) I replaced it in the cgm-remote-monitor/translations/ru_RU.json file lines 469, 470 and 471 into English names and it seems to have worked :) And notifications not arrive every minute. But unfortunately this is a bad decision.

version of Nightscout is master 14.2.6

Stan-Di commented 10 months ago

I confirm this bug in the version 15.0.2 (master)