Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
KNX Reast API
#1
Bonjour à tous,

j’ai développé une API REST en ASP.NET qui permet de se connecter à un système KNX (via USB, IP ou KNX IP Secure).
Cette API propose de nombreuses fonctionnalités, notamment :
  • WriteBool
  • WriteByte
  • WriteDPT
  • ReadValue
  • le chargement des adresses de groupe à partir d’un fichier XML
  • ainsi que d’autres commandes utiles pour la communication KNX 


En outre, tous les endpoints de l’API sont affichés directement sur le serveur avec des explications détaillées, ce qui facilite grandement l’utilisation et l’intégration.
Vous trouverez ci-dessous quelques-unes des principales fonctionnalités et endpoints :

https://localhost:7061/swagger/index.html
https://localhost:7061/api/knx/connectusb
https://localhost:7061/api/knx/connect?i...1&nat=true
https://localhost:7061/api/knx/connectse...sword=1234
https://localhost:7061/api/knx/dispose
https://localhost:7061/api/knx/readvalue...1=1&dpt2=1
https://localhost:7061/api/knx/writebool...value=true
https://localhost:7061/api/knx/writebyte...&value=100
https://localhost:7061/api/knx/writevalu...1=9&dpt2=1
https://localhost:7061/api/knx/convertto...1=9&dpt2=1
https://localhost:7061/api/knx/convertto...1=9&dpt2=1
https://localhost:7061/api/knx/loaddptli...a\\dpt.xml
https://localhost:7061/api/knx/telegrams
https://localhost:7061/api/knx/check?gro...ess=1/2/10

lien de téléchargement:
https://www.knx-board.org/download.php?f...apiv19.zip
Répondre
#2
KnxNetAPI – Nouvelle version simplifiée

Bonjour à tous,
J'ai écrit une nouvelle version simplifiée de l'ancienne KnxRestAPI.
Elle porte désormais le nom de KnxNetAPI.
  • Contrôle toujours possible facilement via URL
  • Utilisation supplémentaire via une interface web directement dans le navigateur
  • Commandes nettement plus simples
  • Optimisée pour l’intégration dans différents systèmes

Important :
L’API elle-même fonctionne uniquement comme serveur sur :
  • Windows (.NET)
  • Systèmes Linux (Raspberry Pi ou Arduino Uno Q)

Utilisation :
Des appareils comme :
  • Raspberry Pi
  • Arduino
  • ESP8266
  • ESP32

peuvent utiliser l’API pour envoyer des commandes et piloter des capteurs ou d’autres composants.
Avantage :
Cela simplifie considérablement la communication entre différents microcontrôleurs et systèmes.


═══════════════════════════════════════════════════════════════════════════
KNX API AVAILABLE COMMANDS
═══════════════════════════════════════════════════════════════════════════

SYSTEM
http://127.0.0.1:5001/
http://localhost:5001/
───────────────────────────────────────────────────────────────────────────
VERSION
→ VERSION
http://localhost:5001/?cmd=VERSION

INFO
→ INFO
http://localhost:5001/?cmd=INFO


CONNECTION
───────────────────────────────────────────────────────────────────────────
CONNECTUSB
→ CONNECTUSB
http://localhost:5001/?cmd=CONNECTUSB

CONNECTIP <ip> <port> <secure>
→ CONNECTIP 192.168.178.42 3671 true
http://localhost:5001/?cmd=CONNECTIP 192.168.178.42 3671 true

CONNECTIPSECURE <ip> <port> <secure> <user> <password> <key>
→ CONNECTIPSECURE 192.168.178.42 3671 true user pass key

CONNECTIONSTATE
→ CONNECTIONSTATE
http://localhost:5001/?cmd=CONNECTIONSTATE

DISPOSE
→ DISPOSE
http://localhost:5001/?cmd=DISPOSE


DPT / CONVERSION
───────────────────────────────────────────────────────────────────────────
LOADDPTLIST <file>
→ LOADDPTLIST knxxml.xml
http://localhost:5001/?cmd=LOADDPTLIST knxxml.xml

CONVERTTORAW <value> DPT<main>.<sub>
→ CONVERTTORAW 23.5 DPT9.4
http://localhost:5001/?cmd=CONVERTTORAW 23.5 DPT9.4

CONVERTTODPT <raw> DPT<main>.<sub>
→ CONVERTTODPT 0C97 DPT9.4
http://localhost:5001/?cmd=CONVERTTODPT 0C97 DPT9.4


READ VALUES
───────────────────────────────────────────────────────────────────────────
READVALUE <ga>
→ READVALUE 10/0/2
http://localhost:5001/?cmd=READVALUE 10/0/2

READDPTVALUE <ga> DPT<main>.<sub>
→ READDPTVALUE 10/0/2 DPT1.1
http://localhost:5001/?cmd=READDPTVALUE 10/0/2 DPT1.1

READLASTVALUE <ga>
→ READLASTVALUE 10/0/2
http://localhost:5001/?cmd=READLASTVALUE 10/0/2

READLASTDPTVALUE <ga>
→ READLASTDPTVALUE 10/0/2
http://localhost:5001/?cmd=READLASTDPTVALUE 10/0/2

READLASTVALUEINFOS <ga>
→ READLASTVALUEINFOS 10/0/2
http://localhost:5001/?cmd=READLASTVALUEINFOS 10/0/2

READALLLASTVALUES
→ READALLLASTVALUES
http://localhost:5001/?cmd=READALLLASTVALUES

READALLLASTVALUESINFOS
→ READALLLASTVALUESINFOS
http://localhost:5001/?cmd=READALLLASTVALUESINFOS


WRITE VALUES
───────────────────────────────────────────────────────────────────────────
WRITEBOOL <ga> <true|false>
→ WRITEBOOL 1/0/0 true
http://localhost:5001/?cmd=WRITEBOOL 1/0/0 true

WRITEBYTE <ga> <0-255>
→ WRITEBYTE 6/0/9 254
http://localhost:5001/?cmd=WRITEBYTE 6/0/9 254

WRITEDPT <ga> <main> <sub> <value>
→ WRITEDPT 10/0/5 DPT9.4 25.7
http://localhost:5001/?cmd=WRITEDPT 10/0/5 DPT9.4 25.7


SQL DATABASE
───────────────────────────────────────────────────────────────────────────
CREATESQLDATABASE
→ CREATESQLDATABASE
http://localhost:5001/?cmd=CREATESQLDATABASE

STARTSQLWRITING
→ STARTSQLWRITING
http://localhost:5001/?cmd=STARTSQLWRITING

STOPSQLWRITING
→ STOPSQLWRITING
http://localhost:5001/?cmd=STOPSQLWRITING 


Lien de téléchargement :
https://www.knx-board.org/download.php?f...netapi.zip
Répondre


Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)