Navigation

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

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 23
    • Best 2
    • Groups 1

    Tomasz Nowak

    @Tomasz Nowak

    Starter

    2
    Reputation
    18
    Profile views
    23
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Tomasz Nowak Follow
    Starter

    Best posts made by Tomasz Nowak

    • RE: How to lower disk writes (for extending life of an sd card)

      @paul53
      Thanks, works like a charm. I've put 28800000 for 8-hour save interval and instantly sd card writes dropped to almost zero on that PRI. Would be great if that interval could be configurable somewhere in the future

      posted in ioBroker general
      Tomasz Nowak
      Tomasz Nowak
    • RE: How to replace null with 0 using alias-manager

      Yes, that's true.

      And for the record, this issue (with Fibaro sceneId) is totally solved with two PR's to mqtt-client adapter proposed by @AlCalzone (#46 & #47) and merged by @apollon77

      You guys are amazing!

      posted in ioBroker general
      Tomasz Nowak
      Tomasz Nowak

    Latest posts made by Tomasz Nowak

    • RE: How to replace null with 0 using alias-manager

      Yes, that's true.

      And for the record, this issue (with Fibaro sceneId) is totally solved with two PR's to mqtt-client adapter proposed by @AlCalzone (#46 & #47) and merged by @apollon77

      You guys are amazing!

      posted in ioBroker general
      Tomasz Nowak
      Tomasz Nowak
    • RE: How to replace null with 0 using alias-manager

      I've never used Javascript in ioBroker, but I have installed Javascript adapter now, created that channel and object under 0_userdata.0 and......
      WOW, it works as it should !!!!!!!!!!!!
      I get 26 and 24 values on 1- and 2-click and then the objects turns to 0. And it works with mqtt-client putting it to the broker just fine:

      9be4e581-c53e-4147-a0ce-0a7deb513310-image.png

      Thank you @paul53 for this quick solution! 🙌

      I hope mqtt-client (and probably zwave2) adapters will be address with this issue in the future, but for now I may switch my lights again!

      posted in ioBroker general
      Tomasz Nowak
      Tomasz Nowak
    • RE: How to replace null with 0 using alias-manager

      @apollon77

      That issue I've also reported here 🙂
      https://github.com/AlCalzone/ioBroker.zwave2/issues/597

      tnowak created this issue in AlCalzone/ioBroker.zwave2

      closed Scene_Activation.sceneId null value seems to be crashing mqtt-client #597

      posted in ioBroker general
      Tomasz Nowak
      Tomasz Nowak
    • RE: How to replace null with 0 using alias-manager

      Thats strange:

      8ab9a02c-3dbe-4017-9d17-a043a51690fb-image.png

      And I still see this object in ioBroker admin panel

      posted in ioBroker general
      Tomasz Nowak
      Tomasz Nowak
    • RE: How to replace null with 0 using alias-manager

      @apollon77 said in How to replace null with 0 using alias-manager:

      Ok, jetuzt mal ganz genau: was ist der exakte wert?

      • In allen screenshots ist gar kein Wert zu sehen - auch nicht "null"
      • Der mqtt-client Adapter crasht weil der state an sich "null" ist - also NICHT "state wert ist null" sondern es gibt gar keinen state!! Nix
      • Aliasse greifen dann nicht weil Sie nur Werte mappen - bedeutet also das der resulting Alias auch "keinen Wert hat"

      Am besten dazu jetzt mal

      iobroker state get zwave2.0.Node_014.Scene_Activation.sceneId

      machen und Ausgabe posten.

      Yes, no value is seen on the screenshots because there no value at all for most of the time. It gets "26" or "24" depending on number of clicks, but only for a second. Then it returns to empty / null.
      Now, because mqtt-client can't handle this correctly, I've been trying to alias this object somehow to push it to MQTT anyway. So, I can not rewrite empty object with any custom value (such as "0" for instance)?

      posted in ioBroker general
      Tomasz Nowak
      Tomasz Nowak
    • RE: How to replace null with 0 using alias-manager

      @apollon77

      • JS-Controller version: 3.2.16
      • Node version: v12.22.1
      • Operating system: docker image @ Raspberry OS
      • all adapters in current released versions
      posted in ioBroker general
      Tomasz Nowak
      Tomasz Nowak
    • RE: How to replace null with 0 using alias-manager

      Mqtt-client crash log is here (I've created an issue out of this):
      https://github.com/Pmant/ioBroker.mqtt-client/issues/45

      tnowak created this issue in Pmant/ioBroker.mqtt-client

      closed Uncaught exception: Cannot read property 'from' of null #45

      posted in ioBroker general
      Tomasz Nowak
      Tomasz Nowak
    • RE: How to replace null with 0 using alias-manager

      @apollon77

      This is JSON for an alias object:

      {
        "from": "system.adapter.admin.0",
        "user": "system.user.admin",
        "ts": 1619609676629,
        "common": {
          "name": "Scene ID",
          "role": "level",
          "type": "number",
          "read": true,
          "write": true,
          "alias": {
            "id": "zwave2.0.Node_014.Scene_Activation.sceneId",
            "read": "val == null?0:val"
          }
        },
        "native": {},
        "acl": {
          "object": 1636,
          "owner": "system.user.admin",
          "ownerGroup": "system.group.administrator",
          "state": 1636
        },
        "_id": "alias.0.Fibaro_Dimmer_1_SceneID.sceneId",
        "type": "state"
      }
      

      and this is for the source object:

      {
        "type": "state",
        "common": {
          "role": "level",
          "read": true,
          "write": true,
          "name": "Scene ID",
          "type": "number",
          "min": 1,
          "max": 255
        },
        "native": {
          "nodeId": 14,
          "valueId": {
            "commandClass": 43,
            "endpoint": 0,
            "property": "sceneId"
          }
        },
        "from": "system.adapter.zwave2.0",
        "user": "system.user.admin",
        "ts": 1619558168447,
        "_id": "zwave2.0.Node_014.Scene_Activation.sceneId",
        "acl": {
          "object": 1636,
          "state": 1636,
          "owner": "system.user.admin",
          "ownerGroup": "system.group.administrator"
        }
      }
      

      Thanks

      posted in ioBroker general
      Tomasz Nowak
      Tomasz Nowak
    • RE: How to replace null with 0 using alias-manager

      @alcalzone I've changed common.type to number - no change.
      @Homoran Tried also == and no change.

      So I have this object: SceneId:

      a90ffa87-ea9e-4a8a-9b28-7497c5fbe57c-image.png

      When I press a mono-switch connected that dimmer I see value "26" for a blink of an eye, than there's noting in that field (I believe its "null"). This null somehow crashes mqtt-broker, so I wanted to change "null" to "0".

      But in an alias object:

      4539395f-acb2-4167-8ccf-0541f12e5f93-image.png

      Its exactly the same - 26 shows for a blink of the eye and then nothing. Both with val === null?0:val and val == null?0:val.
      This alias object also crashes mqtt-client adapter with uncaught null exception.

      This is full config of my alias. I'm not sure if I understand all correctly.

      78aeb06f-e900-4761-a932-6d948d9ce1fa-image.png

      posted in ioBroker general
      Tomasz Nowak
      Tomasz Nowak
    • RE: How to replace null with 0 using alias-manager

      @homoran said in How to replace null with 0 using alias-manager:

      I really don't know, but please try val === null?0:val

      Thanks, but it doesn't seem to work 😞

      posted in ioBroker general
      Tomasz Nowak
      Tomasz Nowak
    Community
    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
    The ioBroker Community 2014-2023
    logo