#10 (this is partial as it contains similar as those shared above for the other devices)
local HomeMode = luup.variable_get(“urn:micasaverde-com:serviceId:HouseModes1”, “HMode”, 59) or “”
if (tonumber(HomeMode) == 1) then HomeModetxt =" Home Mode. " elseif (tonumber(HomeMode) == 2) then HomeModetxt =" Away Mode. " elseif (tonumber(HomeMode) == 3) then HomeModetxt =" Night Mode. " elseif (tonumber(HomeMode) == 4) then HomeModetxt =" Vacation Mode. " else HomeModetxt = " Unavailable. " end
local HomeEnergy = math.ceil(luup.variable_get(“urn:micasaverde-com:serviceId:EnergyMetering1”, “Watts”, 308)) or “”
local DiningOutlet = math.ceil(luup.variable_get(“urn:micasaverde-com:serviceId:EnergyMetering1”, “Watts”, 207)) or “”
local SalaOutlet = math.ceil(luup.variable_get(“urn:micasaverde-com:serviceId:EnergyMetering1”, “Watts”, 14)) or “”
local Piano = math.ceil(luup.variable_get(“urn:micasaverde-com:serviceId:EnergyMetering1”, “Watts”, 221)) or “”
local Monitor = luup.variable_get(“urn:upnp-org:serviceId:SwitchPower1”, “Status”, 297) or “”
local AqBig = luup.variable_get(“urn:upnp-org:serviceId:SwitchPower1”, “Status”, 277) or “”
local AqSmall = luup.variable_get(“urn:upnp-org:serviceId:SwitchPower1”, “Status”, 278) or “”
local Grotto = luup.variable_get(“urn:upnp-org:serviceId:SwitchPower1”, “Status”, 279) or “”
local mylights = luup.variable_get(“urn:micasaverde-com:serviceId:PhilipsHue1”, “StateForAll”, 51) or “”
local roomlights = luup.variable_get(“urn:micasaverde-com:serviceId:PhilipsHue1”, “StateForAll”, 113) or “”
if (tonumber(DiningOutlet) > 1) then DiningOutlettxt = “… Dining Outlet consumes …” … DiningOutlet … " watts. " else DiningOutlettxt = “” end
if (tonumber(SalaOutlet) > 1) then SalaOutlettxt = “… Sala Outlet consumes …” … SalaOutlet … " watts. " else SalaOutlettxt = “” end
if (tonumber(Piano) > 1) then Pianotxt = “… The Piano is on …” else Pianotxt = “” end
if (Monitor == “1”) then Monitortxt = “… CCTV Monitor is on …” elseif (Monitor == “0”) then Monitortxt = “” else Monitortxt = “… CCTV Monitor is unavailable …” end
if (AqBig == “1”) then AqBigtxt = “… Big Aquarium is on …” elseif (AqBig == “0”) then AqBigtxt = “” else AqBigtxt = “… Big Aquarium is unavailable …” end
if (AqSmall == “1”) then AqSmalltxt = “… Small Aquariums are on …” elseif (AqSmall == “0”) then AqSmalltxt = “” else AqSmalltxt = “… Small Aquarium is unavailable …” end
if (Grotto == “1”) then Grottotxt = “… Grotto light is on …” elseif (Grotto == “0”) then Grottotxt = “” else Grottotxt = “… Grotto light is unavailable …” end
if (mylights == “1”) then mylightstxt = “… Dad Mom room lights are on …” elseif (mylights == “0”) then mylightstxt = “” else mylightstxt = “… Dad Mom room lights are unavailable …” end
if (roomlights == “1”) then roomlightstxt = “… Entertainment room lights are on …” elseif (roomlights == “0”) then roomlightstxt = “” else roomlightstxt = “… Entertainment room lights are unavailable …” end
THEN SAME AS ABOVE #6, #7, #8 & #9 BUT THE ALEXA SAY MESSAGE SHOULD BE CONSOLIDATED TO ONE AS IN-
luup.call_action(“urn:dlna-org:serviceId:DLNAMediaController1”, “Say”, {Text="System is in " …HomeModetxt… " Home Energy Consumption is " … HomeEnergy … "watts. " … DiningOutlettxt … SalaOutlettxt … Pianotxt … Monitortxt … AqBigtxt … AqSmalltxt … Grottotxt … mylightstxt … roomlightstxt … " There are " … TotalTV … " TVs powered on " … DadMomTVtxt … KidsTVtxt … SalaTVtxt … EntTVtxt … "There are " … motion … " Motions Detected inside Home. " … DadMomRoomtxt … BoysRoomtxt … InaRoomtxt … EntRoomtxt … Diningtxt … "The temperature in your Room is " … DadMomTemp … " degrees Celsius. Boys’ Room is " … BoysTemp … " degrees Celsius. Ina’s Room is " … InaTemp … " degrees Celsius. Entertainment Room is " … EntTemp … " degrees Celsius. and Dining Room is " … DiningTemp … " degrees Celsius. There are " … doors … " Doors Closed and " … locks … " Doors Locked. The Main Door is " … MainDoortxt … ". The Entertainment Room Door is " … EntDoortxt … ". The Kitchen Door is " … KitchenDoortxt, Volume=50, GroupZones=“Dad Mom room”, Repeat = 1}, 307)