diff --git a/common.sh b/common.sh index ebb6f4b..2984074 100755 --- a/common.sh +++ b/common.sh @@ -61,8 +61,8 @@ wifi_connect() { while [ "${AP_MATCHED_NAME}" == "" ]; do if [ ${FIRST_RUN} == true ]; then SCAN_MESSAGE="Scanning for open Tuya SmartLife AP" - if [ "${OVERRIDE_SSID}" != "" ]; then - SCAN_MESSAGE="${SCAN_MESSAGE} ${OVERRIDE_SSID}" + if [ "${OVERRIDE_AP_SSID}" != "" ]; then + SCAN_MESSAGE="${SCAN_MESSAGE} ${OVERRIDE_AP_SSID}" fi echo ${SCAN_MESSAGE} FIRST_RUN=false @@ -75,8 +75,8 @@ wifi_connect() { RESCAN_ARG="" fi - if [ "${OVERRIDE_SSID}" != "" ]; then - SSID_REGEX="${OVERRIDE_SSID}" + if [ "${OVERRIDE_AP_SSID}" != "" ]; then + SSID_REGEX="${OVERRIDE_AP_SSID}" else # Search for an AP ending with - and 4 hexidecimal characters that has no security mode, unless we've already connected to one, in which case we look for that specific one SSID_REGEX="-[A-F0-9]{4}" diff --git a/tuya-cloudcutter.sh b/tuya-cloudcutter.sh index add06e1..10afbc7 100755 --- a/tuya-cloudcutter.sh +++ b/tuya-cloudcutter.sh @@ -28,7 +28,7 @@ while getopts "hrntvw:p:f:d:l:s::a:k:u:o:" flag; do a) AUTHKEY=${OPTARG};; k) PSKKEY=${OPTARG};; u) UUID=${OPTARG};; - o) OVERRIDE_SSID=${OPTARG};; + o) OVERRIDE_AP_SSID=${OPTARG};; s) getopts-extra "$@" METHOD_DETACH="true" HAVE_SSID="true"