Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Users
    • air-Q Shop

    Hausautomation: openHAB-Binding?

    Smart Home
    8
    42
    2666
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Aurelio last edited by

      Hallo zusammen
      Da die API des airQ in einer Betaversion schon für Tests zugänglich ist, bin ich daran, ein Binding für openHAB zu schreiben.
      Wer auch openHAB verwendet und das Binding derzeit dann testen möchte, kann sich gerne mit mir in Verbindung setzen.

      J Mario [air-Q] 2 Replies Last reply Reply Quote 1
      • J
        jheiler @Aurelio last edited by

        @Aurelio Bin interessiert.
        Viele Grüße

        1 Reply Last reply Reply Quote 1
        • Mario [air-Q]
          Mario [air-Q] last edited by

          Wir danken Wolfgang R. für sein Engagement. Er hat uns erlaubt seine openHAB Einbindung zu Posten.
          Download ist hier möglich:
          Anleitung air-Q Integration in openHAB (pdf)
          air-Q Integration in openHAB (air-q-data.sh)

          Wissen was in der Luft ist!

          1 Reply Last reply Reply Quote 0
          • J
            jheiler last edited by

            Vielen Dank an den Autor!

            Ich habe getestet mit Openhab 2.5.6 und erhalte folgenden Fehler:

            ~ $ sudo -u openhab /usr/bin/python3 /usr/local/bin/air-q-data.shTraceback (most recent call last):
              File "/usr/local/bin/air-q-data.sh", line 45, in <module>
                msg['content'] = json.loads(decodeMessage(msg['content']))
              File "/usr/local/bin/air-q-data.sh", line 33, in decodeMessage
                return unpad(cipher.decrypt(msg[16:]).decode('utf-8'))
            UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 3: invalid continuation byte
            

            Es werden keine Daten angezeigt, s. Screenshot. Der Air-Q läuft im lokalen Netzwerk und in der Cloud, in der Android App werden Daten angezeigt.

            Viele Grüße

            Bildschirmfoto vom 2020-07-20 15-17-18.png

            1 Reply Last reply Reply Quote 1
            • J
              jheiler last edited by

              Ergänzend noch die openhab.log

              2020-07-20 17:10:29.585 [WARN ] [ng.exec.internal.handler.ExecHandler] - Couldn't transform response because transformationService of type 'REGEX' is unavailable
              2020-07-20 17:10:34.442 [WARN ] [rthome.model.script.actions.BusEvent] - Cannot convert 'Traceback (most recent call last):
                File "/usr/local/bin/airq-data.sh", line 45, in <module>
                  msg['content'] = json.loads(decodeMessage(msg['content']))
                File "/usr/local/bin/airq-data.sh", line 33, in decodeMessage
                  return unpad(cipher.decrypt(msg[16:]).decode('utf-8'))
              UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcc in position 0: invalid continuation byte
              Traceback (most recent call last):
                File "/usr/local/bin/airq-data.sh", line 45, in <module>
                  msg['content'] = json.loads(decodeMessage(msg['content']))
                File "/usr/local/bin/airq-data.sh", line 33, in decodeMessage
                  return unpad(cipher.decrypt(msg[16:]).decode('utf-8'))
              UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcc in position 0: invalid continuation byte' to a state type which item 'AirQ_Timestamp' accepts: [DateTimeType, UnDefType].
              2020-07-20 17:10:34.467 [WARN ] [rthome.model.script.actions.BusEvent] - Cannot convert 'Traceback (most recent call last):
                File "/usr/local/bin/airq-data.sh", line 45, in <module>
                  msg['content'] = json.loads(decodeMessage(msg['content']))
                File "/usr/local/bin/airq-data.sh", line 33, in decodeMessage
                  return unpad(cipher.decrypt(msg[16:]).decode('utf-8'))
              UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcc in position 0: invalid continuation byte
              Traceback (most recent call last):
                File "/usr/local/bin/airq-data.sh", line 45, in <module>
                  msg['content'] = json.loads(decodeMessage(msg['content']))
                File "/usr/local/bin/airq-data.sh", line 33, in decodeMessage
                  return unpad(cipher.decrypt(msg[16:]).decode('utf-8'))
              UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcc in position 0: invalid continuation byte' to a state type which item 'AirQ_aktZeit' accepts: [DecimalType, QuantityType, UnDefType].
              2020-07-20 17:10:34.487 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Air-Q meldet neue Werte': For input string: "Traceback (most recent call last):
                File "/usr/local/bin/airq-data.sh", line 45, in <module>
                  msg['content'] = json.loads(decodeMessage(msg['content']))
                File "/usr/local/bin/airq-data.sh", line 33, in decodeMessage
                  return unpad(cipher.decrypt(msg[16:]).decode('utf-8'))
              UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcc in position 0: invalid continuation byte
              Traceback (most recent call last):
                File "/usr/local/bin/airq-data.sh", line 45, in <module>
                  msg['content'] = json.loads(decodeMessage(msg['content']))
                File "/usr/local/bin/airq-data.sh", line 33, in decodeMessage
                  return unpad(cipher.decrypt(msg[16:]).decode('utf-8'))
              UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcc in position 0: invalid continuation byte"
              
              Mario [air-Q] 1 Reply Last reply Reply Quote 1
              • Mario [air-Q]
                Mario [air-Q] @jheiler last edited by Mario [air-Q]

                @jheiler Ich habe Wolfgang einmal kontaktiert. Er ist nicht hier im Forum bisher.
                Wir haben selbst leider im Moment kein openHAB System zum Testen.
                @Daniel-air-Q hat die Smart Home Integrationen aber auf dem Schirm. Wir kümmern uns noch intensiv darum. Im Moment ist die Auslastung wg Bugfixing an anderen Stellen noch recht groß.

                Wissen was in der Luft ist!

                1 Reply Last reply Reply Quote 0
                • Mario [air-Q]
                  Mario [air-Q] @Aurelio last edited by

                  @Aurelio Wie weit bist Du gekommen?

                  Wissen was in der Luft ist!

                  A 1 Reply Last reply Reply Quote 0
                  • W
                    Wolfgang last edited by

                    Hallo jheiler,

                    ist in Deinem air-q-data.sh der Header korrekt definiert für die UTF-8-Codierung ?

                    #!/usr/bin/python
                    #-*- coding:utf-8 -*-
                    

                    Grüße
                    Wolfgang

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      jheiler @Wolfgang last edited by

                      @Wolfgang

                      Hallo,

                      ich habe alles so implementiert, wie es im 3.Post angegeben ist. EXEC und JSONPATH laufen. Der Hinweis auf REGEX ist nicht plausibel, da die Transformation doch mit JSONPATH erfolgen soll.

                      Viele Grüße

                      1 Reply Last reply Reply Quote 0
                      • J
                        jheiler last edited by

                        Ich habe alles noch einmal installiert, in der Beispieldokumentation für Things ist ein Tipfehler, ich hatte noch einen weiteren produziert (vermutlich Editor-Problem). Ergebnis: der REGEX-Fehler ist immer noch da, aber ich habe Daten.

                        Vielen Dank noch einmal an den Autor.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 1 / 5
                        • First post
                          Last post



                         |   |   | 

                        © 2023 air-Q