Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Simple-api stateId mit #

    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

    Simple-api stateId mit #

    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      xcashy last edited by

      Hallo,

      In meinen iobroker sind mehrere shelly1 geräte mit dem shelly adapter integriert.

      Mein Ziel ist es nun mit dem simple-api adapter dessen werte auslesen und tooglen zu können.

      Allerdings haben alle shellys hashes in ihrerer stateId enthalten, z.B.: shelly.0.SHSW-1#0581D0#1.Relay0.Switch.

      Da ein hash als fragment identifier behandelt wird sagt simple-api dass das Objekt nicht gefunden wurde.

      Daraufhin hab ich es mit prozent encoding versucht, doch %23 hat bei befehlen wie get, getPlainValue oder toggle nicht funktioniert.

      Lediglich bei befehlen in welchen ich die id im query string angeben kann (z.B. objects?pattern=) hat %23 funktioniert. Da ich so jedoch den Value nicht ändern kann bringt mir das leider nichts.

      Weiß jemand hier wie ich dieses Problem lösen kann?

      1 Reply Last reply Reply Quote 0
      • apollon77
        apollon77 last edited by

        Hast du mal einen beispiel call der Nicht tut?

        Gesendet vom Handy …

        1 Reply Last reply Reply Quote 0
        • X
          xcashy last edited by

          Ja klar,

          ohne encoding:

          getPlainValue/shelly.0.SHSW-1#0581D0#1.Relay0.Switch

          error: datapoint "shelly.0.SHSW-1" not found.

          mit encoding:

          getPlainValue/shelly.0.SHSW-1%230581D0%231.Relay0.Switch

          error: datapoint "shelly.0.SHSW-1%230581D0%231.Relay0.Switch" not found

          1 Reply Last reply Reply Quote 0
          • apollon77
            apollon77 last edited by

            Du testest das wie? Im Browser? Per curl? Teste mal per curl bitte

            Gesendet vom Handy …

            1 Reply Last reply Reply Quote 0
            • X
              xcashy last edited by

              Hab es gerade mit curl versucht, leider das selbe resultat.

              1 Reply Last reply Reply Quote 0
              • apollon77
                apollon77 last edited by

                Bei curl auch mit %23 probiert?

                Gesendet vom Handy …

                1 Reply Last reply Reply Quote 0
                • X
                  xcashy last edited by

                  Ja, wieder einmal mit und einmal ohne probiert.

                  1 Reply Last reply Reply Quote 0
                  • Bluefox
                    Bluefox last edited by

                    Eigentlich sollte

                    decodeURI(req.url);

                    Die Arbeit machen…

                    1 Reply Last reply Reply Quote 0
                    • X
                      xcashy last edited by

                      Laut docu von decodeUri():
                      ` > Description

                      Replaces each escape sequence in the encoded URI with the character that it represents, but does not decode escape sequences that could not have been introduced by encodeURI. The character “#” is not decoded from escape sequences. `
                      https://developer.mozilla.org/en-US/doc … /decodeURI

                      1 Reply Last reply Reply Quote 0
                      • C
                        Chris197 last edited by

                        Hallo,

                        stehe ebenfalls vor dem Problem.

                        @xcashy

                        schon eine Lösung gefunden?

                        Gruß,

                        Chris

                        1 Reply Last reply Reply Quote 0
                        • apollon77
                          apollon77 last edited by

                          Ihr könnt mal die Instanz per debug ligature starten und dann einen Zugriff machen. Log hier bitte Posten.

                          Gesendet vom Handy …

                          1 Reply Last reply Reply Quote 0
                          • apollon77
                            apollon77 last edited by

                            Bitte 2.0.1 vm Github versuchen und Rückmeldung geben

                            1 Reply Last reply Reply Quote 0
                            • X
                              xcashy last edited by

                              Mit der neusten Version (2.0.2) von Github ist das Problem gelöst. Danke 🙂

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

                              Support us

                              ioBroker
                              Community Adapters
                              Donate
                              FAQ Cloud / IOT
                              HowTo: Node.js-Update
                              HowTo: Backup/Restore
                              Downloads
                              BLOG

                              475
                              Online

                              31.9k
                              Users

                              80.1k
                              Topics

                              1.3m
                              Posts

                              4
                              13
                              1877
                              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