Changeset 13
- Timestamp:
- 2011-11-25 23:36:09 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
I_RFXCOM.xml
r12 r13 144 144 RFXCountTS2 = RFXCountTS2 + 1 145 145 RFXDevicesTS2[RFXCountTS2] = v.id 146 luup.log("Registered device " .. RFXDevicesTS2[RFXCountTS2] .. " as temperature sensor ".. RFXCountTS2) 146 147 end 147 148 … … 150 151 RFXCountHS2 = RFXCountHS2 + 1 151 152 RFXDevicesHS2[RFXCountHS2] = v.id 153 luup.log("Registered device " .. RFXDevicesHS2[RFXCountHS2] .. " as humidity sensor ".. RFXCountHS2) 152 154 end 153 155 end … … 1136 1138 1137 1139 -- Execution for temperature sensor 1138 -- Set temperature to command temperature1139 if bitw.band(lnSensorType,RFXConstants.sensorTypeTemperature) ~= 0 then1140 -- Set temperature to command 1141 if bitw.band(lnSensorType,RFXConstants.sensorTypeTemperature) ~= 0 and tostring(v.device_type) == "urn:schemas-micasaverde-com:device:TemperatureSensor:1" then 1140 1142 for lsKey,lsValue in string.gmatch(lsCmd, "(%w+)=([%w%.%-_]+)") do 1141 1143 luup.log("Key=" .. lsKey .. ";Value=" .. lsValue .. ";") 1142 1144 if lsKey == "temperature" then 1145 luup.log("SET CURRENTTEMPERATURE from " .. lsID .. " with value " .. lsValue) 1143 1146 luup.variable_set("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", 1144 1147 lsValue, device) … … 1148 1151 1149 1152 -- Execution for humidity sensor 1150 -- Set temperature to command temperature1151 if bitw.band(lnSensorType,RFXConstants.sensorTypeHumidity) ~= 0 then1153 -- Set humidity to command 1154 if bitw.band(lnSensorType,RFXConstants.sensorTypeHumidity) ~= 0 and tostring(v.device_type) == "urn:schemas-micasaverde-com:device:HumiditySensor:1" then 1152 1155 for lsKey,lsValue in string.gmatch(lsCmd, "(%w+)=([%w%.%-_]+)") do 1153 1156 luup.log("Key=" .. lsKey .. ";Value=" .. lsValue .. ";") 1154 1157 if lsKey == "humidity" then 1158 luup.log("SET CURRENTLEVEL from " .. lsID .. " with value " .. lsValue) 1155 1159 luup.variable_set("urn:micasaverde-com:serviceId:HumiditySensor1", "CurrentLevel", 1156 1160 lsValue, device)
Note: See TracChangeset
for help on using the changeset viewer.