18 Commits

Author SHA1 Message Date
a8a923d16b
Refactor A72_alarm_getter.sh script
The A72_alarm_getter.sh script has been refactored for improved readability and clarity. Changes include:

- Updated script header with standardized information.
- Changed German comments to English for consistency.
- Improved comments and added explanations for key sections.
- Reorganized code structure for better flow.
- Enhanced variable names for increased understanding.
- Added debug information for 'at' jobs.
- Modified output messages for better user understanding.
- Ensured consistent formatting throughout the script.
- Fixed indentation issues and removed unnecessary spaces.

The commit aims to make the script more maintainable and user-friendly, following best practices for scripting.
2024-02-01 13:51:24 +01:00
4bb7048638
Fix weckzeit_datei path in A72_alarm_getter.sh
Corrected the path for the 'weckzeit_datei' variable in A72_alarm_getter.sh script. The original path was pointing to '/root/iobroker_scripts/generel/.weckzeiten.txt' and has been updated to the correct path '/root/iobroker_scripts/general/.weckzeiten.txt'.

This ensures that the script can accurately locate and utilize the 'weckzeit_datei' file, preventing potential issues related to the incorrect file path.
2024-01-26 23:45:34 +01:00
9dfa7f7623
Optimierung von A72_alarm_getter.sh
- Entfernen des nicht benötigten Ping-Tests in der check_ip-Funktion.
- Kommentieren des Codes zum Löschen überholter 'at'-Jobs, da er derzeit auskommentiert ist (Muss ich mich ein anderes mal drum kümmern).
2023-12-28 20:33:37 +01:00
a44e6c91ba
Update A72_alarm_getter.sh
- Adjusted the curl command to include the message data directly without the 'Priority' header.
2023-12-26 17:11:30 +01:00
dde161ae61
Improve IP resolution and add retry mechanism
- 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.
2023-12-26 17:01:34 +01:00
3dd4f72a0e
Fix Weckzeit Calculation and Refactoring
- 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
2023-12-22 15:05:00 +01:00
11ae8bfaf6
Update MAC address in check_ip function
Changed the MAC address in the check_ip function to '1e:46:8c'.
2023-12-22 10:07:40 +01:00
c5d7167bb1
Keep only the next 'at'-job and delete all future jobs in A72_alarm_getter.sh
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.
2023-12-22 09:42:28 +01:00
76d38622c6
Aktualisiere IP-Adressen in A72_alarm_getter.sh und wecker.sh:
- Ändere die MAC-Adresse in beiden Skripten auf '18🆎1d' für die Funktion check_ip.
2023-12-22 09:09:17 +01:00
b114ce5fdc
Update A72_alarm_getter.sh script
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
2023-12-17 21:49:16 +01:00
b881b79bf6
Änderungen am A72_alarm_getter.sh-Skript: Neues Format für Alarmzeit 2023-12-11 16:46:46 +01:00
a0dbcefb1c
Refactor A72_alarm_getter.sh script for improved readability and reliability
- 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.
2023-12-07 13:17:18 +01:00
63720dafea
Add execution timestamp and echo in A72_alarm_getter.sh
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.
2023-12-05 18:00:34 +01:00
c872f1d93d
Funktion zum erfassen der Weckzeit gefixt 2023-11-25 06:49:05 +01:00
5d21fb28c1
Fehlerbehebung bei ping-test 2023-11-22 12:26:43 +01:00
7d9c3574a4
Mac-Adresse gekürzt für ip-Abfrage 2023-11-21 09:18:11 +01:00
1d27119800
checkt ip von a72 2023-11-21 08:49:34 +01:00
c34f28302e
initial commit 2023-11-16 09:17:08 +01:00