- Modified the IP resolution process to allow for multiple attempts with a specified interval.
- Added a retry mechanism to check the IP address multiple times before considering it unsuccessful.
- If the target IP cannot be found after the specified number of attempts, an error message is displayed.
- Updated the SSH command to run the alarm script in the background.
- Combined IP retrieval and ping test into a single function 'check_ip'.
- Improved error handling for better script robustness.
- Removed unnecessary commented-out code and added comments for clarity.
- Ensured consistency in indentation and formatting.
Author: Michael, Haider
Date: 22.12.2023
- Corrected the calculation of the variable 'lightsOn' to ensure the correct time is set for turning on lights.
- Refactored the script by combining the IP retrieval and ping test into a single function 'check_ip'.
- Improved error handling and added comments for better readability.
Author: Michael, Haider
Date: 22.12.2023
Modified delete_expired_at_jobs function to retain only the next 'at'-job and delete all upcoming jobs. This ensures that only the immediate 'at'-job remains scheduled.
- Geänderte Mac-Adresse für die Funktion check_ip.
- Verwende 'arp-scan' für die IP-Ermittlung.
- Verbesserte Ausgabe und Wartezeit in der Funktion check_notification.
- Start des Alarm-Scripts auf dem Handy mit protokollierter Ausgabe.
- Geänderte Mac-Adresse für Lisas iPhone in check_ip-Funktion.
- Verbesserte Ausgabe und Wartezeit in der check_notification-Funktion.
- Angepasste Schritte und Dauer für die Helligkeits- und Farbtemperaturanpassung.
- Start des Alarm-Scripts auf dem Handy ohne protokollierte Ausgabe.
- Änderung des Bluetooth-Ausschaltbefehls zu 'svc bluetooth disable'.
- Aktualisierung des Lautstärke-Erhöhungsbefehls.
- Verbesserte Ausgabe in der check_notification-Funktion.
- Entfernung des Timeout-Befehls bei der Überprüfung der Weckerbenachrichtigung.
- Hinzufügen von 'killall mpv' bei Beendigung des Weckers.
- Geänderte Mac-Adresse für Lisas iPhone in check_ip-Funktion.
- Verbesserte Ausgabe in der check_notification-Funktion.
- Angepasste Schritte und Dauer für die Helligkeits- und Farbtemperaturanpassung.
- Start des Alarm-Scripts auf dem Handy mit protokollierter Ausgabe.
- Adjusted the 'check_notification' function to execute the SSH command within a timeout.
- Modified the logging of wecker.sh start and end times for better monitoring.
Changes:
- Modified line 41 in wecker.sh to execute the SSH command within a timeout for 'check_notification' function
from:
output= [0] "Beenden" -> PendingIntent{cb58c43: PendingIntentRecord{9bf5dfe com.urbandroid.sleep startActivity (allowlist: 27215bc:+30s0ms/0/NOTIFICATION_SERVICE/NotificationManagerService)}}
to:
output=Timeout
- Added date and echo statements to log the start and end times in 'check_notification' function.
- Moved the 'ssh root@ '/data/scripts/morning-alarm.sh'' line to the end of the script to trigger the morning alarm.
Author: Michael Haider
Date: 17.12.2023
Adjusted the wecker.sh invocation in A72_alarm_getter.sh to redirect output to /root/wecker.log for better logging. Now, when scheduling a new alarm, the script will log the wecker.sh execution details to the log file.
Changes:
- Modified line 87 in A72_alarm_getter.sh to redirect wecker.sh output to /root/wecker.log
from:
echo "/root/iobroker_scripts/schlafzimmer/wecker.sh" | at ""
to:
echo "/root/iobroker_scripts/schlafzimmer/wecker.sh > /root/wecker.log" | at ""
Author: Michael Haider
Date: 17.12.2023
This script turns off Bluetooth, increases the media volume to 100%, and continuously checks if the alarm has been dismissed on the Android device. Additionally, it plays the morning alarm sound in an infinite loop until the alarm is dismissed.
- Script Name: morning-alarm.sh
- Features:
- Turn off Bluetooth
- Set media volume to 100%
- Play the morning alarm sound in an infinite loop
- Continuously check for alarm dismissal
Author: Michael Haider
Date: 17.12.2023
- Removed unnecessary variable interpolation in the 'echo' statement.
- Changed the path for 'atq' and 'atrm' commands to use the full path.
- Updated the 'ping' command to use the full path for better compatibility.
- Added comments and improved formatting for better script understanding.
In this commit, an echo statement is added to display the execution timestamp
in the A72_alarm_getter.sh script. The timestamp is printed with the command
'echo 'Ausgeführt um: ''.
Additionally, the script now contains a function called delete_expired_at_jobs
to check and delete expired 'at' jobs. The current time is obtained using the
'date' command and stored in the variable current_time.
1. Added a new function `check_external_light_status` to check if the light is turned off externally.
2. Modified the condition in the `check_notification` function to correctly check if the notification contains "[1]" and the specified strings.
3. Corrected the assignment statement inside the `while` loop. Changed `first_brightness_cmason.nvimhange=false` to `first_brightness_change=false`.