Changeset ef41170 for Main


Ignore:
Timestamp:
2014-01-23 08:16:46 (11 years ago)
Author:
garrettwp
Branches:
master
Children:
2fb2f8a, c8f38cb
Parents:
490ed33 (diff), b5d6099 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Garrett Power <garrett.power@…> (2014-01-23 08:16:46)
git-committer:
Garrett Power <garrett.power@…> (2014-01-23 08:16:46)
Message:

Merge branch 'master' of http://code.mios.com/git/mios/universal_devices_isy_plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified Main/L_ISYController1.lua

    r490ed33 ref41170  
    12801280                         
    12811281                        -- On 
    1282                         if (status ~= nil and tonumber(status) > 0) then   
     1282                        if (status ~= nil and status ~= " " and tonumber(status) > 0) then   
    12831283                            loadLevel = minMaxConversion(100, status) 
    12841284                            newStatus = 1 
     
    13131313                         
    13141314                        -- On 
    1315                         if (status ~= nil and tonumber(status) > 0) then 
     1315                        if (status ~= nil and status ~= " " and tonumber(status) > 0) then 
    13161316                            loadLevel = minMaxConversion(100, status) 
    13171317                            newStatus = 1 
     
    13351335                         
    13361336                        -- On 
    1337                         if (fanStatus ~= nil and tonumber(fanStatus) > 0) then 
     1337                        if (fanStatus ~= nil and fanStatus ~= " " and tonumber(fanStatus) > 0) then 
    13381338                            fanNewStatus = 1 
    13391339                         
     
    13591359                         
    13601360                        -- On 
    1361                         if (status ~= nil and tonumber(status) > 0) then 
     1361                        if (status ~= nil and status ~= " " and tonumber(status) > 0) then 
    13621362                            loadLevel = minMaxConversion(100, status) 
    13631363                            newStatus = 1 
     
    13881388                         
    13891389                        -- On 
    1390                         if (status ~= nil and tonumber(status) > 0) then 
     1390                        if (status ~= nil and status ~= " " and tonumber(status) > 0) then 
    13911391                            newStatus = 1 
    13921392                           
     
    14171417                         
    14181418                        -- On 
    1419                         if (status ~= nil and tonumber(status) > 0) then 
     1419                        if (status ~= nil and status ~= " " and tonumber(status) > 0) then 
    14201420                            newStatus = 1 
    14211421                           
     
    14431443                         
    14441444                        -- On 
    1445                         if (status ~= nil and tonumber(status) > 0) then 
     1445                        if (status ~= nil and status ~= " " and tonumber(status) > 0) then 
    14461446                            newStatus = 1 
    14471447                         
     
    14641464                         
    14651465                        -- On 
    1466                         if (relayStatus ~= nil and tonumber(relayStatus) > 0) then 
     1466                        if (relayStatus ~= nil and relayStatus ~= " " and tonumber(relayStatus) > 0) then 
    14671467                            relayNewStatus = 1 
    14681468                         
     
    14891489                         
    14901490                        -- tripped 
    1491                         if (status ~= nil and tonumber(status) == 1) then 
     1491                        if (status ~= nil and status ~= " " and tonumber(status) == 1) then 
    14921492                            newStatus = 1 
    14931493                         
     
    15181518                         
    15191519                        -- On 
    1520                         if (status ~= nil and status ~= " " and tonumber(status) > 0) then 
     1520                        if (status ~= nil and status ~= " " and status ~= " " and tonumber(status) > 0) then 
    15211521                            newStatus = 1 
    15221522                           
     
    15381538                         
    15391539                        debugLog("Creating Z-Wave dimmer for: node " .. node) 
     1540                         
     1541                        -- On 
     1542                        if (status ~= nil and status ~= " " and status ~= " " and tonumber(status) > 0) then 
     1543                            newStatus = 1 
     1544                           
     1545                        -- Off  
     1546                        else 
     1547                            newStatus = 0 
     1548                        end 
     1549                         
     1550                        luup.chdev.append(device, children, 
     1551                            string.format("%s", parent), string.format("%s", name), 
     1552                            "urn:schemas-upnp-org:device:DimmableLight:1", "D_DimmableLight1.xml", 
     1553                            "", "urn:upnp-org:serviceId:SwitchPower1,Status=" .. newStatus .. 
     1554                            "\nurn:garrettwp-com:serviceId:ISYController1,Family=4", false) 
     1555                            --.. "\n" .. "urn:upnp-org:serviceId:Dimming1,LoadLevelStatus=" .. loadLevel, false) 
     1556 
     1557                    -- Lock 
     1558                    elseif (zwaveDeviceCategory4.lock[subCat]) then 
     1559                        local newStatus 
     1560                         
     1561                        debugLog("Creating Z-Wave lock for: node " .. node) 
    15401562                         
    15411563                        -- On 
     
    15481570                        end 
    15491571                         
    1550                         luup.chdev.append(device, children, 
    1551                             string.format("%s", parent), string.format("%s", name), 
    1552                             "urn:schemas-upnp-org:device:DimmableLight:1", "D_DimmableLight1.xml", 
    1553                             "", "urn:upnp-org:serviceId:SwitchPower1,Status=" .. newStatus .. 
    1554                             "\nurn:garrettwp-com:serviceId:ISYController1,Family=4", false) 
    1555                             --.. "\n" .. "urn:upnp-org:serviceId:Dimming1,LoadLevelStatus=" .. loadLevel, false) 
    1556  
    1557                     -- Lock 
    1558                     elseif (zwaveDeviceCategory4.lock[subCat]) then 
    1559                         local newStatus 
    1560                          
    1561                         debugLog("Creating Z-Wave lock for: node " .. node) 
    1562                          
    1563                         -- On 
    1564                         if (status ~= nil and status ~= " " and tonumber(status) > 0) then 
    1565                             newStatus = 1 
    1566                            
    1567                         -- Off  
    1568                         else 
    1569                             newStatus = 0 
    1570                         end 
    1571                          
    15721572                        luup.chdev.append(PARENT, children, 
    15731573                            string.format("%s", parent), string.format("%s", name), 
Note: See TracChangeset for help on using the changeset viewer.