Changeset 22
- Timestamp:
- 2012-05-14 22:46:41 (13 years ago)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
D_EZAnemoSensor.json
r17 r22 97 97 "ControlType": "label", 98 98 "Label": { 99 "lang_tag": " gust",99 "lang_tag": "speed", 100 100 "text": "Speed" 101 101 }, … … 127 127 "ControlType": "label", 128 128 "Label": { 129 "lang_tag": " gust_unit",129 "lang_tag": "speed_unit", 130 130 "text": "m/s" 131 131 }, -
I_RFXCOM.xml
r20 r22 780 780 781 781 lsID = "ORE" .. string.format("%02X", string.byte(lsCommand, 4) ) 782 lsCmd = string.format("direction=% 3d;speed=%5.2f;speedav=%5.2f",liDataDir, lnDataSpeed, lnDataSpeedav)782 lsCmd = string.format("direction=%.0f;speed=%.2f;speedav=%.2f",liDataDir, lnDataSpeed, lnDataSpeedav) 783 783 lsRFXMSG = string.format("[OREGON: WIND3 Device: %s Direction: %3d Speed: %5.2f Speed av: %5.2f]", lsID, liDataDir, lnDataSpeed, lnDataSpeedav) 784 784 … … 1502 1502 and v.id == fullId then 1503 1503 for lsKey,lsValue in string.gmatch(lsCmd, "(%w+)=([%w%.%-_]+)") do 1504 --luup.log("Key=" .. lsKey .. ";Value=" .. lsValue .. ";")1505 if lsKey == "direction" then1506 luup.log("SET DIRECTION from " .. lsID .. " with value " .. lsValue)1507 luup.variable_set("urn:upnp-org:serviceId:EZAnemoSensor1", "Direction", lsValue, device)1508 end1509 if lsKey == "speed" then1510 luup.log("SET SPEED from " .. lsID .. " with value " .. lsValue)1511 luup.variable_set("urn:upnp-org:serviceId:EZAnemoSensor1", "Speed", lsValue, device)1512 end1513 if lsKey == "speedav" then1514 luup.log("SET SPEEDAV from " .. lsID .. " with value " .. lsValue)1515 luup.variable_set("urn:upnp-org:serviceId:EZAnemoSensor1", "SpeedAv", lsValue, device)1516 end1517 if lsKey == "battery" then1518 luup.log("SET BATTERY from " .. lsID .. " with value " .. lsValue)1519 luup.variable_set("urn:micasaverde-com:serviceId:HaDevice1", "BatteryLevel", lsValue, device)1520 end1521 end1504 luup.log("Key=" .. lsKey .. ";Value=" .. lsValue .. ";") 1505 if lsKey == "direction" then 1506 luup.log("SET DIRECTION from " .. lsID .. " with value " .. lsValue) 1507 luup.variable_set("urn:upnp-org:serviceId:EZAnemoSensor1", "Direction", lsValue, device) 1508 end 1509 if lsKey == "speed" then 1510 luup.log("SET SPEED from " .. lsID .. " with value " .. lsValue) 1511 luup.variable_set("urn:upnp-org:serviceId:EZAnemoSensor1", "Speed", lsValue, device) 1512 end 1513 if lsKey == "speedav" then 1514 luup.log("SET SPEEDAV from " .. lsID .. " with value " .. lsValue) 1515 luup.variable_set("urn:upnp-org:serviceId:EZAnemoSensor1", "SpeedAv", lsValue, device) 1516 end 1517 if lsKey == "battery" then 1518 luup.log("SET BATTERY from " .. lsID .. " with value " .. lsValue) 1519 luup.variable_set("urn:upnp-org:serviceId:EZAnemoSensor1", "Battery", lsValue, device) 1520 end 1521 end 1522 1522 end 1523 1523 end -
S_EZAnemoSensor.xml
r17 r22 25 25 <name>SpeedAv</name> 26 26 <dataType>string</dataType> 27 <shortCode>speed Av</shortCode>27 <shortCode>speedav</shortCode> 28 28 </stateVariable> 29 29
Note: See TracChangeset
for help on using the changeset viewer.