The time value you are getting returned is in Unix style seconds since a specific date. You have to feed it to the os.time function and specify the format you want it as. See Programming in Lua : 22.1 for more info on that.
It look like a good reference but, i m not very good in programming + english reading (mean more difficult).
i just want Sonos to say something like: March 25 2017 at 22:17. (last time sensor been trip)
Thanks if somebody can help with that.
[code]…
local time = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”,“LastTrip”, 183)
local timeString = os.date(" %B %d %Y at %X", time)
local greeting=“personne ,es venu ici depuis le,”
luup.call_action(SONOS_SID, “Say”,
{Text= " Le syst?me de surveillance vous di, "…greeting … timeString, Language=“fr-CA”, GroupZones=SONOS_ZONES,
Volume=volume, SameVolumeForAll=“true”},
SONOS_ID)
[/code]
[code]…
local time = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”,“LastTrip”, 183)
local timeString = os.date(" %d %Y a %X", time)
local month = tonumber(os.date(“%m”,time))
local frMonth = { “janvier”, “fevrier”, “mars”, “avril”, “mai”, “juin”, “juillet”,“aout”,“septembre”,“octobre”,“novembre”,“decembre”}
timeString = frMonth[month] … timeString
local greeting="personne ,es venu ici depuis le, "
luup.call_action(SONOS_SID, “Say”,
{Text= " Le syst?me de surveillance vous di, "…greeting … timeString, Language=“fr-CA”, GroupZones=SONOS_ZONES,
Volume=volume, SameVolumeForAll=“true”},
SONOS_ID)
[/code]
I don’t know how to get the special characters into the text, but maybe the above will work? I bet @amg0 can do better for translation…