Aller au contenu

Krikroff

Modérateurs
  • Compteur de contenus

    6 715
  • Inscription

  • Dernière visite

  • Jours gagnés

    124

Krikroff a gagné pour la dernière fois le 21 janvier

Krikroff a eu le contenu le plus aimé !

6 abonnés

À propos de Krikroff

  • Date de naissance 30/01/1976

Profile Information

  • Sexe :
    Homme
  • Ville :
    Région parisienne
  • Intéret :
    Développement informatique - Domotique - Guitare électrique - Nature - Aéromodélisme
  • Box
    Autre
  • Version
    HC3 v5.090.17 - HC3 v5.093.21 (beta) - HC3Lite v5.093.21 (beta) - HC2 v4.600 (the last one)

Visiteurs récents du profil

14 806 visualisations du profil

Krikroff's Achievements

Newbie

Newbie (1/14)

  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges

1,9 k

Réputation sur la communauté

5

Community Answers

Mise à jour unique du statut

Afficher toutes les mises à jour de « Krikroff »

  1. Hi

     

    Can you make something like in the old app HC2 to stream a content to my Sonos in HC3

     

    Greetz Stef

     

    STREAM: Pour utiliser la lecture de Stream depuis une scène ou un périphérique virtuel il faut exécuter le code LUA suivant avec les bons paramètres.

    -- 408 is the Virtual Device ID
    -- 28 is the Process button ID
    local sid, bid = 408, 28
    -- Create STREAM params object
    local params = {
      -- stream: the file / uri
      stream = "//s3.amazonaws.com/smartapp-media/sonos/bell1.mp3",
      -- source: "local" or "http", "local" is setted by default
      source = "http",
      -- duration: play duration in seconds (option) or "auto"
      duration = 8,
      -- volume: the volume for playing the stream
      volume = 10
    }
    local _f = fibaro
    local _x ={root="x_sonos_object",load=function(b)local c=_f:getGlobalValue(b.root)if string.len(c)>0 then local d=json.decode(c)if d and type(d)=="table"then return d else _f:debug("Unable to process data, check variable")end else _f:debug("No data found!")end end,set=function(b,e,d)local f=b:load()if f[e]then for g,h in pairs(d)do f[e][g]=h end else f[e]=d end;_f:setGlobal(b.root,json.encode(f))end,get=function(b,e)local f=b:load()if f and type(f)=="table"then for g,h in pairs(f)do if tostring(g)==tostring(e or"")then return h end end end;return nil end}
    -- Make a request to the remote to process params object instantly
    _x:set(tostring(sid), { stream = params })
    _f:call(sid, "pressButton", bid)
×
×
  • Créer...