PiBrewing / cbpi4-scd30-co2-sensor

Cradftbeerpi4 Plugin for scd30 CO2 Sensor
GNU General Public License v3.0
1 stars 0 forks source link

co2 alarm if co2 exceeds a specific value #2

Closed fraubi89 closed 9 months ago

fraubi89 commented 10 months ago

I have my fermentation controller with CBPI4 and also with an SCD30 sensor and the SCD30 based CO2 Sensor Plugin. Is it possible to configure an alarm if the co2 sensor exceeds an specific value? I also have the co2 gas bottle in the fermentation room, and I thougt it would be cool to use CBPI and the SCD30 Plugin also for alarms if the bottle leaks? alarm should only trigger an GPIO if an value is exceeded! on the GPIO I will connect an alarm buzzer with an red light and an very loud buzzer! Thanks, Daniel

avollkopf commented 10 months ago

Are you using mqtt sensors? I have added an alarm, if they don't respond for a defined time and a Notification will pop up on the screen that needs to be klicked. This will reset the alarm and another alarm will pop up again, if the sensor does not send data.

This request could be realized in a similar way with a trigger limit of the Sensor value. Would that be working?

fraubi89 commented 9 months ago

No, I'm not using mqtt sensors so far.

avollkopf commented 9 months ago

Please test development version on github.

Alarmlimit added in Hardware settings: image

You need to activate 'Sensor Action' for your sensor reading in the dashboard config for your sensor to see the menu right of your sensor data (3 dots). image

If you click on the sensor menu, you can reset the alarm as Alarm will only pop up once or if value falls below limit and raises again: image

Please report back, if this is working for you. Then I can release a new version also on pypi.org

fraubi89 commented 9 months ago

Wow great! will test it this week! Currently upgrading to bookworm and so on! :-)

fraubi89 commented 9 months ago
image

Works great at my first test! :-) will connect hardware buzzer this week and let you know further! Thanks so much!!

fraubi89 commented 9 months ago

ok it looks like the buzzer sound is only played once (for 1 second) and not permanent till alarm reset! is there a chance to implement an permanent playing till alarm reset?

avollkopf commented 9 months ago

This was the purpose. But I can add a parameter that the alarm goes off every new sensor reading, but not with the confirmation button as it would open too many windows in the browser

fraubi89 commented 9 months ago

ok that sounds good! and sorry, maybe my wish was not clear at the beginning!

avollkopf commented 9 months ago

No worries, try 0.0.8.a4 and select Continuous as Alarmtype -> It'll also send notifications on every sensor reading if you have enabled PushNotifications (Can be annoying, but I can't separate it)

avollkopf commented 9 months ago

... an alarm is now triggered on every sensor reading (e.g. every 30 sec, if you have set the readings every 30 sec in the global settings for the SCD30 sensor)

avollkopf commented 9 months ago

.. and AlarmType 'Single' plays the alarm only once until it has been resetted or the value is falling below the limit and goes up again

fraubi89 commented 9 months ago

oh man! that works great! thank you so much!!!

avollkopf commented 9 months ago

ok, I will release this version as 0.0.8 and close the issue