--- /dev/null
+To reset power to sernsor, disconnect battery for 40s to drain all capacitors
+(count from 20 to 60 to produce 40s timeout)
+
+Pressing S6 button can be done only when sensor is active (after plugging in battery
+for example)
+
+start server on mqtt.zc‐ssensor.com
+
+dpavlin@subvision:~/zc$ ./mqtt-zc-sensor.sh
+
+Prepare new mqtt server:
+
+./zc-send queue/864823042076992 mqtt
+./zc-send queue/864823042076992 interval 300
+
+factory reset will also reset interval to 86400 seconds
+
+
+
+
+4. Reset Factorry Default Settting
+
+When the product is working abnormally, user can use button S6 to reset the default
+parameters.
+
+Press and hold the buttton S6 for 3 seconds, you will see the sensor red and green lights (D3, D4 LED)
+flash synchronously at 4Hz frequency, then D3, D4 keep light on at the same time.
+
+Release the button S6 now and wait for about 3 seconds, the device will reboot and the parameters
+will be reestored to their default state.
+
+The senssor server IP with CTIOT protocol is restoreed to 117.60.157.137, 568 83.
+For sensor of MQTT prrotocol, the proxy server IP willl be restored to mqtt.zc‐ssensor.com, 1883.
--- /dev/null
+#!/bin/sh
+
+restore_settings() {
+ echo "# restore settings for sensor $1"
+ ./zc-send $1
+ ./zc-send $1 mqtt
+ ./zc-send $1
+ ./zc-send $1 interval 300
+ ./zc-send $1
+}
+
+if [ -d "$1" ] ; then
+ restore_settings $1
+elif [ ! -z "$1" ] ; then
+ grep $1 subvision-numbers.txt | tee /tmp/restore
+ cat /tmp/restore | awk '{ print "queue/"$3 }' | while read queue_path ; do
+ restore_settings $queue_path
+ done
+else
+ echo "usage: $0 queue/864823042076992"
+ echo " or: $0 pattern-from-subvision-numbers.txt"
+fi
+