luup.variable_get always returns "0"

I had been trying to do a simple trigger, but I always get a “0” back in return. Can you help figure out the issue? The pushover notification works fine:

local http = require("socket.http")
http.TIMEOUT = 5

result, status = http.request("https://api.pushover.net/1/messages.json", "token=<token>&user=<token>&title=CHECKING&message=START&priority=1")

local deviceNo=64
local SS_SID="urn:micasaverde-com:serviceId:ZWaveDevice1"

local armed = luup.variable_get(SS_SID,"Armed",deviceNo) or "0"
if (armed == "1") then
    result, status = http.request("https://api.pushover.net/1/messages.json", "token=<token>&user=<token>&title=SENSOR&message=IS ARMED&priority=1")
else
     result, status = http.request("https://api.pushover.net/1/messages.json", "token=<token>&user=<token>&title=SENSOR&message=IS NOT ARMED&priority=1")
end

result, status = http.request("https://api.pushover.net/1/messages.json", "token=<token>&user=<token>&title=CHECKING&message=END&priority=1")