GO TO THE AME REPO AND PULL THE LATEST SOURCE CODE :
cd ./amedevices
git branch ( make sure it is on master )
git pull
cd ./videodevices
UPGRADE ALL CONTAINERS
( Create a Tmux session and upgrade through the Tmux session , this ensures that the device continues to upgrade even if you lose connection to the device while it is upgrading )
./do_all.sh
After upgrade do the following
ENFORCE PERMISSIONS BY RUNNING THE PERMISSIONS SCRIPT
cd /home/pi/amedevices/videodevices/
sudo ./permissions.sh
INSTALL PLUGINS AND PREREQUISITE SOFTWARE
cd /home/pi/amedevices/videodevices/APPS/edge_bot?
./install_plugins.py
CHECK THAT CHECKLIST IS FUNCTIONING CORRECTLY
cd /var/lib/ame/intertrade*/checklists
sudo more checklist.json
Make sure checklist.json has the following
{"focus": true, "capture": true, "alert": true, "passing": true}
you may need to set permissions on this File if you get an error in ./logs.sh | grep edge_bot
sudo chown pi /var/lib/ame/intertrade*/checklists/checklist.json
sudo chmod 755 /var/lib/ame/intertrade*/checklists/checklist.json
CHECK NETWORK SETTINGS AND ENSURE THAT THEY ARE CORRECT
if PI
sudo nano /etc/dhcpcd.conf
and Add the following lines
denyinterfaces veth*
noipv6
noipv6rs
ipv4only
or
if Nuc
sudo nano /etc/network/interfaces
Add the below line in at the bottom :
denyinterfaces veth*
( Check that there are no duplicate interface configurations )
CHECK CRONTAB AND ENSURE VPN2 RUNS EVERY MINUTE
Check Crontab and ensure that vpn2.sh is running every 1 Minute . ie . * * * * *
This one is incorrect , running every 10 Minutes.
MIGRATING FROM CRON SCHEDULES TO RULE BASED SCHEDULES
Check on the web Interface and note the Crontab Schedules.
Go To the Hub and Set these Schedules in the Rules for each channel according to Crontab.
ENSURE THAT MAINTENANCE SIGNALS ARE CONFIGURED CORRECTLY
Open each Channel on the Hub and ensure the Maintenance signals are Ticked and that Channel 1 Test, Arm, Disarm is enabled and Test, Arm and Disarm are disabled on All other Channels.
ENSURE THAT COMMUNICATION SETTINGS ARE CORRECT AND IN PLACE | IF NOT CREATE A TICKET
On the Gui check the communications Page and ensure that
Monitoring Company : is the Client_ID
and that Queue IP is: 127.0.0.1
After everything is Done.
MONITOR THAT NO ISSUES ARRISE AFTER UPGRADING AND CHECKING EVERYTHING
Monitor the logs by going to :
cd /amedevices/videodevices/
./logs.sh
Grep each container and ensure no issues
./logs.sh | grep video_capture
./logs.sh | grep video_focus
./logs.sh | grep video_alert
./logs.sh | grep edge_bot
./logs.sh | grep ame_interface
./logs.sh | grep ame_vpn_mon
Monitor the Logs for anything other than the expected containers.
sudo more syslog | egrep -av '(video_focus|video_alert|video_capture|mosquitto|systemd|edge_bot|ame_interface|ame_vpn_mon)'
If anything Strange pops up create a Ticket.
Finally , Check that the device can communicate with AME-Maintenance Server.
cd ./amedevices/videodevices/APPS/edge_bot/
python3 online_status.py
IF THE EDGE BOT CONTAINER RESTARTS , CHECK THE LOGS
if mobile_api is the Problem, the following key:value pairs need to be added to device_config.json in "plugin_data"
"sentinel_api_true":"false","sentinel_api_url":"false","sentinel_api_key":"false","autonetics_api_true":"false","autonetics_api_url":"https://autoneticspoc.monitornet.cloud/autonetics/avlytics/avlytics.php","mobile_api_true":"false",
Below is an example of full Plugin_data :
, "plugin_data": {"sentinel_api_true": "false", "sentinel_api_url": "false", "sentinel_api_key": "false", "autonetics_api_true": "false", "autonetics_api_url": "https://autoneticspoc.monitornet.cloud/autonetics/avlytics/avlytics.php", "mobile_api_true": "false", "listener": "", "listener_api": "true", "listener_api_url": "https://www.rxgateway.online/core/", "patriot": "", "patriot_api": "", "patriot_api_url": "", "watchmanager": "", "watchmanager_api": "", "watchmanager_api_url": "", "bvigilant": "", "bvigilant_url": "", "signaltower": "", "signaltower_url": "", "physical_inputs": "false", "relays": "true", "xmitter": "", "chatid": "", "mqtt_server": "127.0.0.1", "monitoring_company": "intertrade_", "listener_tenant": "", "listener_password": "UDh])D!>NNdj", "patriot_tenant": "", "patriot_password": "", "synapse_api_true": "false", "synapse_api_url": "", "synapse_api_key": ""},
This is an example of edge_bot_config.
"edge_bot_config": {"debugging": "false", "debug_consumer": "false", "debug_maintenance": "false", "telegram_maintenance": "false", "arduino": "false", "maintenance_interval": 3600, "manual_arming": "false"}