Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alarm sound to error in Loop #39

Open
cduarte opened this issue Apr 16, 2020 · 6 comments
Open

Alarm sound to error in Loop #39

cduarte opened this issue Apr 16, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@cduarte
Copy link

cduarte commented Apr 16, 2020

I add the Status line with loop info + basal. Very good this information :)

If possible to get ALARM sound when loop not working (ERROR) for more than 15 minutes. So at night is possible to wake up to fix the problem.

@cduarte
Copy link
Author

cduarte commented Apr 18, 2020

I resolve! I add ALARM SOUND when loop not working (ERROR).

In line 1051 I add this:

  if(strcmp(ns->loop_display_label,"Error")==0) {
    // red alarm state
    // M5.Lcd.fillRect(110, 220, 100, 20, TFT_RED);
    Serial.println("LOOP ERROR");
    M5.Lcd.fillRect(0, 220, 320, 20, TFT_RED);
    M5.Lcd.setTextColor(TFT_BLACK, TFT_RED);
    int stw=M5.Lcd.textWidth(tmpStr);
    M5.Lcd.drawString(tmpStr, 159-stw/2, 220, GFXFF);
    if( (alarmDifSec>cfg.alarm_repeat*60) && (snoozeRemaining<=0) ) {
        sndAlarm();
        lastAlarmTime = mktime(&timeinfo);
      }
    }

@mlukasek
Copy link
Owner

Great, but this is just a simple workaround. To make it proper it would need appropriate M5NS.INI settings, update in web interface etc. I will keep it open if I will have some spare time for this.

@mlukasek mlukasek self-assigned this Apr 21, 2020
@mlukasek mlukasek added the enhancement New feature or request label Apr 21, 2020
@mlukasek
Copy link
Owner

mlukasek commented Dec 6, 2020

Solved in release v2020-12-06-01.

@mlukasek mlukasek closed this as completed Dec 6, 2020
@cduarte
Copy link
Author

cduarte commented Sep 11, 2022

I try to turn OFF the loop alarm
But dont work the alarm off.. all time is ALARMING

@mlukasek
Copy link
Owner

mlukasek commented Sep 15, 2022

Yep, strange that none never noticed. I will update it in next release. Or if you are able to update the code, you have to update the condition

  if(strcmp(ns->loop_display_label,"Error")==0) {
   ...
     if( (alarmDifSec>cfg.alarm_repeat*60) && (snoozeRemaining<=0) ) {
   ...

to
if( (alarmDifSec>cfg.alarm_repeat*60) && (snoozeRemaining<=0) && cfg.snd_loop_error) {

@mlukasek mlukasek reopened this Sep 15, 2022
@MrPsi
Copy link

MrPsi commented Nov 9, 2022

I got the same issue. Happens a lot more often now, after updating Loop to Dev (Loop 3), or maybe after updating Nightscout to 14.2.6. I am using a M5Stack Core2. I have set the volume to 0%. But it still makes this weird clicking sound when alarming. Looking forward to the fix.

Thanks for a great tool to monitor my child during the night

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants