Changeset 22


Ignore:
Timestamp:
2012-05-14 22:46:41 (13 years ago)
Author:
evanes
Message:

anemosensor has speed and speedav

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • D_EZAnemoSensor.json

    r17 r22  
    9797                    "ControlType": "label", 
    9898                    "Label": { 
    99                         "lang_tag": "gust", 
     99                        "lang_tag": "speed", 
    100100                        "text": "Speed" 
    101101                    }, 
     
    127127                    "ControlType": "label", 
    128128                    "Label": { 
    129                         "lang_tag": "gust_unit", 
     129                        "lang_tag": "speed_unit", 
    130130                        "text": "m/s" 
    131131                    }, 
  • I_RFXCOM.xml

    r20 r22  
    780780       
    781781      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) 
    783783      lsRFXMSG = string.format("[OREGON: WIND3 Device: %s Direction: %3d Speed: %5.2f Speed av: %5.2f]", lsID, liDataDir, lnDataSpeed, lnDataSpeedav) 
    784784 
     
    15021502                        and v.id == fullId then 
    15031503                    for lsKey,lsValue in string.gmatch(lsCmd, "(%w+)=([%w%.%-_]+)") do 
    1504                         -- 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:micasaverde-com:serviceId:HaDevice1", "BatteryLevel", lsValue, device) 
    1520                         end 
    1521                     end 
     1504                        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 
    15221522                end 
    15231523            end 
  • S_EZAnemoSensor.xml

    r17 r22  
    2525       <name>SpeedAv</name> 
    2626       <dataType>string</dataType> 
    27        <shortCode>speedAv</shortCode> 
     27       <shortCode>speedav</shortCode> 
    2828    </stateVariable> 
    2929     
Note: See TracChangeset for help on using the changeset viewer.