Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Error/Bug
    4. [Gelöst] [Bug] ZWave stateChange number->string

    NEWS

    • 15. 05. Wartungsarbeiten am ioBroker Forum

    • Monatsrückblick - April 2025

    • Minor js-controller 7.0.7 Update in latest repo

    [Gelöst] [Bug] ZWave stateChange number->string

    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User last edited by

      Hallo all,

      ich habe bei mir Fehler im zwave Adapter.

      Ich habe als controler den USB Stick Aeotec AEOEZW090-C Aeon Labs im Einsatz.

      Bei mehreren meiner Fibaro Sensoren habe ich Fehler bei numerischen Werten.

      1.

      Device: FIBARO System FGWPE/F Wall Plug Gen5

      ! {
      ! "common": {
      ! "name": "FIBARO System FGWPE/F Wall Plug Gen5",
      ! "role": "state"
      ! },
      ! "native": {
      ! "manufacturer": "FIBARO System",
      ! "manufacturerid": "0x010f",
      ! "product": "FGWPE/F Wall Plug Gen5",
      ! "producttype": "0x0602",
      ! "productid": "0x1001",
      ! "type": "On/Off Power Switch",
      ! "name": "",
      ! "loc": "",
      ! "nodeID": 8
      ! },
      ! "acl": {
      ! "object": 1636,
      ! "owner": "system.user.admin",
      ! "ownerGroup": "system.group.administrator"
      ! },
      ! "_id": "zwave.0.NODE8",
      ! "type": "device"
      ! }
      State: zwave.0.NODE8.SENSOR_MULTILEVEL.Power_1

      ! {
      ! "common": {
      ! "name": "Power",
      ! "type": "number",
      ! "role": "sensor",
      ! "read": true,
      ! "write": false
      ! },
      ! "native": {
      ! "value_id": "8-49-1-4",
      ! "node_id": 8,
      ! "class_id": 49,
      ! "type": "decimal",
      ! "genre": "user",
      ! "instance": 1,
      ! "index": 4,
      ! "label": "Power",
      ! "units": "W",
      ! "help": "",
      ! "read_only": true,
      ! "write_only": false,
      ! "min": 0,
      ! "max": 0,
      ! "is_polled": false
      ! },
      ! "type": "state",
      ! "_id": "zwave.0.NODE8.SENSOR_MULTILEVEL.Power_1",
      ! "acl": {
      ! "object": 1636,
      ! "state": 1636
      ! }
      ! }

      Die numerischen Werte werden als string auf den state geschrieben.

      Auszug aus den Events:

      stateChange zwave.0.NODE8.SENSOR_MULTILEVEL.Power_1 "157.1" true zwave.0 2017-10-27 21:03:45.555 2017-10-27 21:03:45.555

      Device: FIBARO System FGK10x Door Opening Sensor

      ! {
      ! "common": {
      ! "name": "FIBARO System FGK10x Door Opening Sensor",
      ! "role": "state"
      ! },
      ! "native": {
      ! "nodeID": 14,
      ! "manufacturer": "FIBARO System",
      ! "manufacturerid": "0x010f",
      ! "product": "FGK10x Door Opening Sensor",
      ! "producttype": "0x0701",
      ! "productid": "0x1001",
      ! "type": "Access Control Sensor",
      ! "name": "",
      ! "loc": ""
      ! },
      ! "type": "device",
      ! "_id": "zwave.0.NODE14",
      ! "acl": {
      ! "object": 1636
      ! }
      ! }
      Styte: zwave.0.NODE14.SENSOR_MULTILEVEL.Temperature_1

      ! {
      ! "common": {
      ! "name": "Temperature",
      ! "type": "number",
      ! "role": "value.temperature",
      ! "read": true,
      ! "write": false
      ! },
      ! "native": {
      ! "value_id": "14-49-1-1",
      ! "node_id": 14,
      ! "class_id": 49,
      ! "type": "decimal",
      ! "genre": "user",
      ! "instance": 1,
      ! "index": 1,
      ! "label": "Temperature",
      ! "units": "C",
      ! "help": "",
      ! "read_only": true,
      ! "write_only": false,
      ! "min": 0,
      ! "max": 0,
      ! "is_polled": false
      ! },
      ! "type": "state",
      ! "_id": "zwave.0.NODE14.SENSOR_MULTILEVEL.Temperature_1",
      ! "acl": {
      ! "object": 1636,
      ! "state": 1636
      ! }
      ! }

      Auszug aus den Events:

      stateChange zwave.0.NODE14.SENSOR_MULTILEVEL.Temperature_1 "23.12" true zwave.0 2017-10-27 21:03:33.544 2017-10-27 21:03:33.544

      Ein kleiner Test mithilfe des ergab:

      log (typeof getState("zwave.0.NODE14.SENSOR_MULTILEVEL.Temperature_1").val);
      
      21:15:37.784	[info]	javascript.1 script.js.test.zwave: string
      21:15:37.784	[info]	javascript.1 script.js.test.zwave: registered 0 subscriptions and 0 schedules
      

      Ist der Bug schon bekannt?

      Hat jemand den Bug bei sich auch?

      Folgende Versionen habe ich laufen:

      ioBroker.zwave: 0.8.0

      ioBroker.js-controller: 1.1.3

      ioBroker.admin: 2.0.9

      1 Reply Last reply Reply Quote 0
      • AlCalzone
        AlCalzone Developer last edited by

        Ist mir bei Aeotec-Multisensoren und Fibaro Relais noch nicht aufgefallen, aber schau ich mir morgen mal an.

        Das interessante dabei ist, dass die Werte und Typinformationen eigentlich 1:1 aus dem Treiber übernommen werden.

        Edit: Fibaro Relais (beides als number definiert):

        let x = getState("zwave.0.NODE2.SENSOR_MULTILEVEL.Power_1").val;
        log(typeof x); // => string
        x = getState("zwave.0.NODE2.SWITCH_MULTILEVEL.Level_1").val;
        log(typeof x); // => number
        
        1 Reply Last reply Reply Quote 0
        • P
          Pman last edited by

          @AlCalzone:

          Ist mir bei Aeotec-Multisensoren und Fibaro Relais noch nicht aufgefallen, aber schau ich mir morgen mal an.

          Das interessante dabei ist, dass die Werte und Typinformationen eigentlich 1:1 aus dem Treiber übernommen werden. `

          Ich konnte den Fehler bei mir jetzt auch feststellen, anscheinend kommen von OZW teilweise Strings statt Floats an, die dann auch im State landen. Ich habe einen Pull-Request erstellt, leider keine Zeit zum Testen :roll: .

          Gerne mal von hier installieren und testen:

          https://github.com/Pmant/ioBroker.zwave/tree/patch-1

          1 Reply Last reply Reply Quote 0
          • AlCalzone
            AlCalzone Developer last edited by

            Für existierende Objekte funktioniert der Fix (sie werden mit dem korrekten State aktualisiert). Neue Objekte werden noch falsch angelegt. Ich probiere mal, wie man das allgemeiner lösen kann.

            1 Reply Last reply Reply Quote 0
            • AlCalzone
              AlCalzone Developer last edited by

              Ursache gefunden:

              https://github.com/OpenZWave/node-openz … ils.cc#L90

              Für decimal-Werte gibt node-openzwave-shared strings zurück. Fixed in 0.9.0

              1 Reply Last reply Reply Quote 0
              • ?
                A Former User last edited by

                Fehler tritt mit Version 0.9.0 nicht mehr auf.

                -> Gelöst

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                Support us

                ioBroker
                Community Adapters
                Donate

                981
                Online

                31.6k
                Users

                79.4k
                Topics

                1.3m
                Posts

                3
                6
                896
                Loading More Posts
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes
                Reply
                • Reply as topic
                Log in to reply
                Community
                Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                The ioBroker Community 2014-2023
                logo