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

scena


marcinwojciesz

Question

Chciałem zrobić scenke na blokach, która po wyłączeniu TV wyłączy inne urządzenie, i zrobiłem:

Please login or register to see this attachment.

ale nie działało wiec lukam w LUA:

Please login or register to see this attachment.

a tu nie ma kawałka nawet kodu który mówi o 30 watach jakie są wyżej.

Czemu? dodam że jest to qubino.

2 scenka oczywiście jest przeciwna.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • poradziłem sobie inaczej, przerobiłem troszkę kod dotyczący "LUA Script: Pralka, która daje znać, że skończyło się pranie" (opisany tu

    Please login or register to see this link.

    )

    wsadziłem zmienna "tv" i kod:

    Please login or register to see this code.

    i jeżeli wartość spadnie poniżej 30 to zmienia zmienną na OFF, jeżeli powyżej na ON.

    Teraz scenka która czyta zmienną - jeżeli ON to odpala w moim wypadku neTV, jeśli OFF to wyłącza.

    Musiałem coś  wymyśleć ponieważ moje neTV na dłuższą metę się zawieszało a teraz jest OK. 

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Jest problem czy ktoś mi podpowie jak dopisać aby:

    jeżeli wartość spadnie poniżej 30 "NA 3 SEKUNDY" to i dalej jak jest.

    problem wynikł w czasie oglądania tv potrafi zejść poniżej tej wartości na ułamek sekundy i wtedy wyłącza mi NeTV

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Link to comment
    Share on other sites

    • 0
    Guest damian

    Mam pomysł jak to łatwo zrobić, ale jako że polskie forum dalej na marginesie a ja nie lubię na marginesach bazgrać, to chyba nie napiszę...

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Link to comment
    Share on other sites

    • 0

    poradziłem sobie inaczej, przerobiłem troszkę kod dotyczący "LUA Script: Pralka, która daje znać, że skończyło się pranie" (opisany tu

    Please login or register to see this link.

    )

    wsadziłem zmienna "tv" i kod:

    Please login or register to see this code.

    i jeżeli wartość spadnie poniżej 30 to zmienia zmienną na OFF, jeżeli powyżej na ON.

     

     

    a co jak wm_pc == 31 ?????????????????????

     

    Jacek

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • hehe Jacek - też to zauważyłem później ale nie ma to znaczenia może się nie dziać nic bo taka wartość występuje przez ułamek sek. teraz bardziej walczę z tymi 3 sek.

    Damian - jestem z tobą mnie to też wnerwia co zresztą opisałem chyba jako pierwszy w poście tym samym co Ty

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Link to comment
    Share on other sites

    • 0

    Please login or register to see this link.

     

    pomógł bym ale nie mogę robić "wbrew" damian`owi...

     

    Jestem za "POLSKIM" forum i też od dzisiaj się wyłączam z dyskusji.....

     

    Jacek

    Link to comment
    Share on other sites

    • 0

    kurcze może bym pomógł ale nie chce być łamistrajkiem

    Please login or register to see this image.

    /emoticons/default_biggrin.png" alt=":D" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Link to comment
    Share on other sites

    • 0

    A może ktoś by jednak pomógł - trochę czasu minęło, nikt już nikomu nic za złe miał nie będzie;)

     

    Ja też używam sceny z "pralki" w połączeniu z dekoderem polsatu i nie mogę poradzić sobie z wstawieniem zależności: ... przełącz na Standby, gdy spadek poboru trwa dłużej, niż 3s i to samo przy przełącz na ON, gdy wzrost poboru trwa dłużej niż 3s.

     

    PS.

    Oczywiście te śmieci z "WM" powyrzucam, gdy scena sama w sobie zacznie dobrze działać z dekoderem.

     

    A może ktoś ma taką gotową scenkę, będę wdzięczny.

     

     

     

    --[[
    %% properties
    1918 power
    %% globals
    --]]

    -----------------------------------------------------------------------------
    fibaro:debug("SCENE START --------------------------")
    fibaro:debug("sceneInstance: "..fibaro:countScenes())
    if fibaro:countScenes() > 1 then
    fibaro:debug("SCENE ABORT --------------------------")
    fibaro:abort()
    end
    -----------------------------------------------------------------------------

    local wm_pc = tonumber( fibaro:getValue(1918, "power") )


    fibaro:debug( wm_pc )

    local wm_state = fibaro:getGlobalValue("DEKODER_STATE")

    if wm_pc <= 1.5 then -- OFF
      fibaro:call(1919, 'turnOff');
      fibaro:setGlobal("DEKODER_STATE", "OFF")
      fibaro:debug("zmiana na OFF" )
    elseif wm_pc > 1.5 and wm_pc < 11.8 then -- STANDBY
      if wm_state ~= "STANDBY" and
        wm_state ~= "OFF" then
        fibaro:call(1919, 'turnOff');
        fibaro:setGlobal("DEKODER_STATE", "STANDBY")
        fibaro:debug("zmiana na STANDBY" )
        fibaro:sleep(60 * 1000)
        pc = tonumber( fibaro:getValue(1918, "power") )
        -- check if stable
        if pc > 1.5 and pc < 11.8 then

        fibaro:debug("Washing has finished")
             fibaro:call(2, "sendDefinedPushNotification", "2588");
             fibaro:call(312, "sendDefinedPushNotification", "2588");
        end
      end
    elseif wm_pc >= 11.8 and wm_pc < 15 then
      if wm_state ~= "ON" then
          fibaro:call(1919, 'turnOn');
          fibaro:setGlobal("DEKODER_STATE", "ON")
          fibaro:debug("zmiana na ON" )
      end
    elseif wm_pc >= 15 then
      if wm_state ~= "ON_PLUS" then
        fibaro:call(1919, 'turnOn');
        fibaro:setGlobal("DEKODER_STATE", "ON_PLUS")
        fibaro:debug("zmiana na ON_PLUS" )
      end
    end

    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...