Compare commits

..

2 Commits

Author SHA1 Message Date
bc118f2c81 Adding device.conf 2023-01-30 08:27:48 +01:00
61342682ca Adding some comments 2023-01-30 08:27:30 +01:00
2 changed files with 53 additions and 1 deletions

View File

@ -50,7 +50,12 @@ wait_for_trigger() {
fi
}
# APISM has al least two TCP-ports open: 7778 and 7779. To check for a running
# APISM it is therefore enough to check for the port 7778. netcat will return 0
# if the port 7778 is open.
check_for_apism() {
return 0
nc localhost 7778
if [ $? -eq 0 ]; then
return 0
@ -58,7 +63,50 @@ check_for_apism() {
return 1
}
######################### send_to_ismas.txt ###################################
# #M=GH_APP
# #C=REQ_ISMASParameter
# #J={}
# {
# "DEV_ID": {
# "Device_Type": "2020",
# "Custom_ID": 999,
# "Device_ID": 1
# },
# "REQ_ISMASParameter_#1": {}
# }
#
# APISM should respond with (something like this):
#
# {
# "REQ_ISMASPARAMETER#69553_Response": {
# "Aknoledge": "OK"
# },
# "Dev_ID": {
# "Device_Type": "ISMAS",
# "Custom_ID": 999,
# "Device_ID": 2
# },
# "Fileupload": [
# { "IPK": "BladiBlupp.Zip",
# "MD5": "01234567890123456789012345678901"}
# ],
# "Parameter": {
# "Location": "An der Bahn 11",
# "Group": "G1",
# "Zone": "Z1",
# "Name": "Bruno",
# "SecNumber": "0",
# "LastAcc": "1",
# "GPSLat": "49,6019",
# "GPSLon": "12,1258"
# }
# }
#
# where the interesting part is contained in "FileUpload".
#
check_for_updates() {
# ismas_response=$(cat send_to_ismas.txt; sleep 1) | nc localhost 7778)
return 0
}
@ -169,6 +217,9 @@ UpdateController() {
echo "DEBUG no updates available"
continue
fi
echo "$(date +'%Y-%m-%d %T') fetching updates..."
exit 1
# Fetch new updates (using git)
while :

View File

@ -10,7 +10,8 @@ write_config() {
},
\"conf\" : {
\"szeged/1/1/etc/psa_config/emp.conf\" : \"d41d8cd98f00b204e9800998ecf8427e\",
\"szeged/1/1/etc/psa_config/printer.conf\": \"d41d8cd98f00b204e9800998ecf8427e\"
\"szeged/1/1/etc/psa_config/printer.conf\": \"d41d8cd98f00b204e9800998ecf8427e\",
\"szeged/1/1/etc/psa_config/device.conf\" : \"d41d8cd98f00b204e9800998ecf8427e\"
},
\"opkg\" : {"