Version 0.9.1
#!/bin/ksh
#get devices via api:
#http://localhost:8083/ZAutomation/api/v1/namespaces/devices_all
device="$1"
#list of all devices
#the first one will be the major one
case "$device" in
#Thermostat
# "ZWayVDev_zway_13-0-67-1"|"ZWayVDev_zway_13-0-67"|"ZWayVDev_zway_13"|"13") #WZ Heat 1.thermostat
# device="ZWayVDev_zway_13-0-67-1"
# desc="WZ Heat 1"
# type="Thermostat"
# valueOn="21"
# valueOff="18"
# ;;
# "ZWayVDev_zway_14-0-67-1"|"ZWayVDev_zway_14-0-67"|"ZWayVDev_zway_14"|"14") #WZ Heat 2.thermostat
# device="ZWayVDev_zway_14-0-67-1"
# type="Thermostat"
# desc="WZ Heat 2"
# valueOn="21"
# valueOff="18"
# ;;
# "ZWayVDev_zway_15-0-67-1"|"ZWayVDev_zway_15-0-67"|"ZWayVDev_zway_15"|"15") #WZ Heat 3.thermostat
# device="ZWayVDev_zway_15-0-67-1"
# desc="WZ Heat 3"
# type="Thermostat"
# valueOn="21"
# valueOff="18"
# ;;
# "ZWayVDev_zway_16-0-67-1"|"ZWayVDev_zway_16-0-67"|"ZWayVDev_zway_16"|"16") #WZ Heat 4.thermostat
# device="ZWayVDev_zway_16-0-67-1"
# desc="WZ Heat 4"
# type="Thermostat"
# valueOn="21"
# valueOff="16"
# ;;
# "ZWayVDev_zway_18-0-67-1"|"ZWayVDev_zway_18-0-67"|"ZWayVDev_zway_18"|"18") #K Heat 1.thermostat
# device="ZWayVDev_zway_18-0-67-1"
# desc="K Heat 1"
# type="Thermostat"
# valueOn="22"
# valueOff="18"
# ;;
# "ZWayVDev_zway_9-0-67-1"|"ZWayVDev_zway_9-0-67"|"ZWayVDev_zway_9"|"9") #BZ Heat 1.thermostat
# device="ZWayVDev_zway_9-0-67-1"
# desc="K Heat 1"
# type="Thermostat"
# valueOn="22"
# valueOff="18"
# ;;
#Binary Power Switch
# "ZWayVDev_zway_7-0-37"|"ZWayVDev_zway_7"|"7") #WZ Power 1.switchBinary
# device="ZWayVDev_zway_7-0-37"
# desc="WZ Power 1"
# type="Binary Power Switch"
# valueOn="on"
# valueOff="off"
# ;;
#Routing Multilevel Switch
# "ZWayVDev_zway_12-0-38"|"ZWayVDev_zway_12"|"12") #WZ Lamp 1.switchMultilevel
# device="ZWayVDev_zway_12-0-38"
# desc="WZ Lamp 1"
# type="Routing Multilevel Switch"
# valueOn="on"
# valueOff="off"
# ;;
#AV Receiver
# "RXV779"|"AV") #AV-Receiver
# device="RXV779"
# desc="AV-Receiver"
# type="RXV779"
# valueOn="On"
# valueOff="Off"
# ;;
#other
*)
device=">>UNKNOWN<<"
;;
esac