İçeriğe geç

openHAB entegrasyonu

Aşağıda openHAB'a entegrasyon açıklanmaktadır; böylece çöp bilgilerini akıllı evinizde kolayca işleyebilirsiniz.

Bağımlılıkları kurun

Bağlantı için İKİ şey gereklidir! Biri HTTP Binding, diğeri (verilerin işlenmesi için) JSONPATH Data Transformation Service. HTTP Binding (yeni sekmede açılır) / JSONPATH Data Transformation (yeni sekmede açılır).

openHAB HTTP Binding
openHAB''ta HTTP Binding kurulumu

Thing oluşturun

Bir HTTP Thing oluşturun ve bunu aşağıdaki gibi (kod) yapılandırın – Başlıklarda Almanca özel karakter iletilmemesi gerektiğini unutmayın. Lütfen "ü" yerine örneğin "ue" yazın.

UID: http:url:xxxxxxx
label: Binable
thingTypeUID: http:url
configuration:
  authMode: BASIC
  ignoreSSLErrors: false
  baseURL: https://binable.app/api/fetch
  delay: 0
  stateMethod: POST
  refresh: 21600
  commandMethod: POST
  contentType: text/plain
  timeout: 6000
  bufferSize: 2048
  headers:
    - "X-Address-Street=XXX"
    - "X-Address-HouseNumber=XXX"
    - "X-Address-Zip=XXX"
    - "X-Address-City=XXXX"
    - "X-Address-Country=DE"
channels:
  - id: residual_waste_last
    channelTypeUID: http:datetime
    label: Restmüll (letzte)
    description: ""
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.residualWaste.last
  - id: residual_waste_next
    channelTypeUID: http:datetime
    label: Restmüll (nächste)
    description: null
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.residualWaste.next
  - id: residual_waste_next_days
    channelTypeUID: http:number
    label: Restmüll (nächste) relative
    description: null
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.residualWaste.nextDays
  - id: paper_last
    channelTypeUID: http:datetime
    label: Papier (letzte)
    description: null
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.paper.last
  - id: paper_next
    channelTypeUID: http:datetime
    label: Papier (nächste)
    description: null
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.paper.next
  - id: paper_next_days
    channelTypeUID: http:number
    label: Papier (nächste) relative
    description: null
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.paper.nextDays
  - id: reusable_materials_last
    channelTypeUID: http:datetime
    label: Wertstoffe (letzte)
    description: null
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.reusableMaterials.last
  - id: reusable_materials_next
    channelTypeUID: http:datetime
    label: Wertstoffe (nächste)
    description: null
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.reusableMaterials.next
  - id: reusable_materials_next_days
    channelTypeUID: http:number
    label: Wertstoffe (nächste) relative
    description: null
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.reusableMaterials.nextDays
  - id: bio_last
    channelTypeUID: http:datetime
    label: Bio (letzte)
    description: null
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.bio.last
  - id: bio_next
    channelTypeUID: http:datetime
    label: Bio (nächste)
    description: null
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.bio.next
  - id: bio_next_days
    channelTypeUID: http:number
    label: Bio (nächste) relative
    description: null
    configuration:
      mode: READONLY
      stateTransformation: JSONPATH:$.bio.nextDays
#  - id: christmas_tree_last
#    channelTypeUID: http:datetime
#    label: Weihnachtsbaum (letzte)
#    description: null
#    configuration:
#      mode: READONLY
#      stateTransformation: JSONPATH:$.christmasTree.last
#  - id: christmas_tree_next
#    channelTypeUID: http:datetime
#    label: Weihnachtsbaum (nächste)
#    description: null
#    configuration:
#      mode: READONLY
#      stateTransformation: JSONPATH:$.christmasTree.next
#  - id: christmas_tree_next_days
#    channelTypeUID: http:number
#    label: Weihnachtsbaum (nächste) relative
#    description: null
#    configuration:
#      mode: READONLY
#      stateTransformation: JSONPATH:$.christmasTree.nextDays
Kanal dahil Thing yapılandırması

Not: Şu anda aşağıdaki çöp türleri vardır (etiket / key): Kağıt çöpü (paper), biyo çöp (bio), kalan çöp (residualWaste), geri dönüşüm malzemesi (reusableMaterials), Noel ağaçları (christmasTree), zararlı maddeler (toxic), bebek bezi (diaper) ve çit/ağaç budama atığı (hedgeTreeTrimming)

Items

İlgili kanallara göre Items oluşturun.

İsteğe bağlı: Tarih biçimi

Örneğin "%1$td.%1$tm.%1$tY" biçiminde bir State Description oluşturarak tarihi doğru biçimlendirebilirsiniz. Kalan günler için de şu State Description kullanılabilir "%.0f gün".

Tamam!

Hepsi bu kadar. Sık istekler gerekli olmadığından lütfen "delay" değerini düşürmeyin.

← Entegrasyonlara genel bakış