Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

ZIPATO INDOOR SIREN problems


marbe

Question

Hello,

I booth new ZIPATO INDOOR SIREN and want use it with FIBARO HC2:

- adding at secure mode was successful

- at FIBARO is template for this device missing

- more serious is that this device should support more siren sounds. But for start this sounds is necessary use multilevel switch. But FIBARO added by adding only one switch On-Off.

Command fibaro:call(344, 'setValue', '2'); doesn't work.

Is other possibility to control this device?

Thank you 

 

Link to comment
Share on other sites

Recommended Posts

  • 0

I have a Devolo, and it does not emit sound either.
Do you have an example of LUA to put sound and to change it?

Link to comment
Share on other sites

  • 0
1 hour ago, Borin said:

Do you have an example of LUA to put sound and to change it?

 

If we found a way to send raw z-wave commands, we could create the relevant strings.

 

This guide on Vesternet 

Please login or register to see this link.

 could provide clues for a more tech minded person.

 

Personally, I gave up on Fibaro respecting its customers and use a Sonos 1 speaker connected with tones on my Synology drive to provide sounds.

Link to comment
Share on other sites

  • 0
On 9/1/2019 at 8:40 AM, kevin said:

How did you achive that? Using the Synology for files and the Sonos to play the sounds?

Hi, apologies for the slow reply, I have been searching for the notes I made to achieve the access to the synology. Have changed computer since I did it and remember that the information was all found on google as to how to access an mp3 file on the drive.

 

I recall using a VD found here to achieve same. My current VD is a mess and there are many entries, half of which have not been correctly formatted. I have included one that does work and maybe you can pick some clues out of it. It took about 4 full days of focused "headspace" to get this done and sadly, I am far away from that at the moment. Hope it helps, though I myself cannot figure out everything on re-read and was fiddling, never intended to release this.

 

"

selfId = fibaro:getSelfId()
ip = fibaro:get(selfId, "IPAddress")
port = fibaro:get(selfId, "TCPPort") or 1400

-- local file = "http://dir.xiph.org/listen/3441508/listen.m3u"
-- local file = "//192.168.1.29/Multimedia/Music/Ding.mp3"
-- fibaro:setGlobal("SonosFile", file);
-- fibaro:call(1071, "pressButton", "2"); 

local play_url = "//192.168.1.XXX/Tones/XXX.mp3" --fibaro:getGlobal("SonosFile")
--if string.sub(play_url,1,string.len("http"))=="http" then
--    play_url = "x-rincon-mp3radio://" .. play_url
--else
    play_url = "x-file-cifs:" .. play_url    
--end

fibaro:debug(play_url)

urlencode = function(str)
    if (str) then
        str = string.gsub(str, "\n", "\r\n")
        str =
            string.gsub(
            str,
            "([^%w ])",
            function(c)
                return string.format("%%%02X", string.byte(c))
            end
        )
        str = string.gsub(str, " ", "+")
    end
    return str
end

createRequestBody = function(action, schema, data)
    return string.format('<u:%s xmlns:u="%s">%s</u:%s>', action, schema, data, action)
end

reponseCallback = function(fnc, args)
    if (fnc == nil) then
        return nil
    end
    return fnc(args)
end

createSocket = function()
    -- Check IP and PORT before
    if (ip == nil or port == nil) then
        fibaro:debug("You must configure IPAddress and TCPPort first")
        return
    end
    local socket
    local status, err =
        pcall(
        function()
            socket = Net.FTcpSocket(ip, port)
            socket:setReadTimeout(1000)
        end
    )
    if (status ~= nil and status ~= true) then
        fibaro:debug("socket status: " .. tostring(status or ""))
    end
    if (err ~= nil) then
        fibaro:debug("socket err: " .. tostring(err or ""))
        return
    end
    return socket
end

disposeSocket = function(socket)
    if (socket ~= nil) then
        socket:disconnect()
        socket = nil
        return true
    end
    return false
end

sendSoapMessage = function(url, service, action, args, callback, retry)
    local socket = createSocket()
    if (socket == nil) then
        return
    end
    retry = retry or 0
    -- prepare data
    local url = "POST " .. url .. " HTTP/1.1"
    fibaro:debug(ip)
    local so1 = "HOST: " .. ip .. ":1400"
    local soapaction = 'SOAPACTION: "' .. service .. "#" .. action.name .. '"'
    local body = createRequestBody(action.name, action.service, tostring(args or ""))
    local envelope =
        '<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body>' ..
        body .. "</s:Body></s:Envelope>"
    local ctl = "Content-Length: " .. string.len(envelope)
    local payload = url .. "\r\n" .. so1 .. "\r\n" .. ctl .. "\r\n" .. soapaction .. "\r\n" .. "\r\n" .. envelope
    -- write data
    local bytes, errorcode = socket:write(payload)
    if (errorcode == 0) then
        local state, errorcode = socket:read()
        if (errorcode == 0) then
            if (string.len(state or "") > 0) then
                -- callback
                if (callback ~= nil) then
                    reponseCallback(callback, state)
                end
                -- dispose ...
                disposeSocket(socket)
                return true
            else
                fibaro:debug("Error: Invalid response. response length: " .. string.len(state or ""))
            end
        else
            if (retry < 5) then
                fibaro:debug("retry #" .. retry .. " action: " .. action.name)
                return sendSoapMessage(url, service, action, args, callback, (retry + 1))
            else
                fibaro:debug("Error: Code returned " .. tostring(errorcode or ""))
            end
        end
    elseif (errorcode == 2) then
        fibaro:debug("Error: You must check your IP and PORT settings.")
    else
        if (retry < 5) then
            fibaro:debug("retry #" .. retry .. " action: " .. action.name)
            return sendSoapMessage(url, service, action, args, callback, (retry + 1))
        else
            fibaro:debug("Error: Code returned " .. tostring(errorcode or ""))
        end
    end
    -- dispose ...
    disposeSocket(socket)
    -- default response
    return false
end

sendSoapMessage(
    -- control url
    "/MediaRenderer/AVTransport/Control",
    -- service type
    "urn:schemas-upnp-org:service:AVTransport:1",
    -- action
    {name = "SetAVTransportURI", service = "urn:schemas-upnp-org:service:AVTransport:1"},
    -- soap body data (options)
    "<InstanceID>0</InstanceID><CurrentURI>" .. play_url .. "</CurrentURI><CurrentURIMetaData /></u:SetAVTransportURI>",
    -- callback (options)
    function(response)
        fibaro:debug("url sent")
        return sendSoapMessage(
            -- control url
            "/MediaRenderer/AVTransport/Control",
            -- service type
            "urn:schemas-upnp-org:service:AVTransport:1",
            -- action
            {name = "Play", service = "urn:schemas-upnp-org:service:AVTransport:1"},
            -- soap body data (options)
            "<InstanceID>0</InstanceID><Speed>1</Speed>",
            -- callback (options)
            function(response)
                fibaro:debug("play sent")
            end
        )
    end
)

Link to comment
Share on other sites

  • 0
On 9/1/2019 at 8:40 AM, kevin said:

@PepsiMac

 

How did you achive that? Using the Synology for files and the Sonos to play the sounds?

Think i found a useful link which helped me in the past,

 

Try this: 

Please login or register to see this link.

 for pointers

Link to comment
Share on other sites

  • 0

So I have the same problem with Zipato Indoor siren. Only two switches/inputs are available: Siren On and OFF and in Breach input that can be armed. 

Not possible to use other sounds for other purposes than alarm siren (example door chime). 

Another problem  - since without template we can't configure parameters of of device -> when there is a breach (tamper) detected siren will start alarm sound - even if tamper input is not armed in fibaro alarm panel. I'm sure we can disable this, but... without template....

 

I'm really surprised that Fibaro did not add template for this device since few years... There are not many z-wave sirens and the market and fibaro does not have their own siren. On top of that zipato siren in quite popular and mainstream choice (as well as other re-branded versions of it).

 

Fibaro - please - it's time. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...