Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Singib

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 5
    • Best 0
    • Groups 0

    Singib

    @Singib

    0
    Reputation
    14
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Singib Follow

    Latest posts made by Singib

    • RE: State value

      Thank you, apollon77,

      let me understand the idea.

      1. I specified a new command (ack=false) with some value by calling adapter.setState(,false).

      2. I thought, the my adapter should process this command in a part of my code and then should confirm this change by calling adapter.setState(,true).

      Instead of this, the ioBroker body (ie mqtt) confirms setting of state on its own. So, the state changing is not a command, but just a value.

      OK. but how to understand a documentation sentence "States can be written as commands or as statuses…. "?

      sorry for my stupid questions 🙂

      posted in Entwicklung
      S
      Singib
    • RE: State value

      I'm sorry for delay..

      I'm trying to develop an adapter for Blynk.cc - nice mobile UI (as I use it). The current implementation is there: https://github.com/Go00oglin/ioBroker.blynk

      After I understand that there is a change in UI on mobile device, I modify a value of state in the adapter (https://github.com/Go00oglin/ioBroker.b … er/main.js - lines 131 an d 136):

      adapter.setState(stateName, newValue, false);

      there are no any code in my adapter to revert ACK to true.

      But my log notifies me:

      blynk.0 2018-02-01 07:56:25.511 info stateChange blynk.0.V10 {"val":16,"ack":true,"ts":1517460985504,"q":0,"from":"system.adapter.mqtt.0","lc":1517460985504}

      blynk.0 2018-02-01 07:56:25.484 info stateChange blynk.0.V10 {"val":"16","ack":false,"ts":1517460985478,"q":0,"from":"system.adapter.blynk.0","lc":1517460985478}

      So, after I set a new value to State with ACK=FALSE, the system.adapter.mqtt.0 reverts it to TRUE mostly immediately itself.

      posted in Entwicklung
      S
      Singib
    • RE: State value

      Hi, apollon77!

      Let's clarify the first point at the beginning 🙂

      "After the command got processed by the adapter, the adapter should update the state values to the "current value after processing the command" with ack=true."

      Is it the my task?

      Only I know when my command was processed and completed… Ideally, after I processed a command, I should resend to ioBroker engine a command ACK=TRUE. But instead of this, the MQTT background does it without my actions. Probably, I still didn't perform a command, but my setting a value becomes ACK=TRUE by itself. It worries me 🙂

      posted in Entwicklung
      S
      Singib
    • State value

      Hi, guys.

      I'm trying to develop a new adapter and a couple of questions appears. Please help me with understanding:

      1. After calling "adapter.setState(name, value, false)" in my code, MQTT itself performs ACK = TRUE after short time. Is it a correct behavior? I mean It is not necessary to reset ACK to TRUE after command processing in MY code?

      2. Imagine the State Value was 0 (or even was empty). I set a value to 0 by calling "adapter.setState(name, 0, false)" or even through the web interface. In this case the adapter ACK becomes FALSE (and appears as RED in the web interface) and MQTT does not revert it to TRUE. Is this behavior correct?

      Thank you

      posted in Entwicklung
      S
      Singib
    • State value

      Коллеги, добрый день.

      Пытаюсь создать адаптер, и возникли вопросы. Помогите с ответом, пожалуйста:

      1. Когда делаю adapter.setState(name, value, false), то MQTT через непродолжительное время самостоятельно вызывает (или присваивает) ACK = TRUE. Это правильное поведение? То есть мне не нужно руками переставлять ACK в TRUE после обработки команды?

      2. Если значение состояния было 0 (или вообще отсутствовало), то присвоение ему значения 0 через adapter.setState(name, 0, false) или даже через web interface оставляет состояние в ACK = FALSE (и в веб-интерфейсе оно отображается красным). Как с этим бороться и надо ли?

      Спасибо

      posted in ioBroker разработка
      S
      Singib
    Community
    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
    The ioBroker Community 2014-2023
    logo