http request mit JSON Befehl / Java Script - HIlfe

HMIP lokale Installation

Moderator: Co-Administratoren

Antworten
superbraz
Beiträge: 184
Registriert: 05.04.2019, 00:18
Hat sich bedankt: 20 Mal
Danksagung erhalten: 2 Mal

http request mit JSON Befehl / Java Script - HIlfe

Beitrag von superbraz » 05.05.2024, 14:27

Gruß in die Runde,

ich möchte einen HTTP / Java Befehl durch ein Programm triggern...
also "wenn virtuelle Taste X, dann führe folgenden http befehl aus"

mit meinem Türöffner klappt es (AXIS)

da nutze ich folgenden Befehl und der Türöffner wird 3 Sekunden geöffnet:

Code: Alles auswählen

string stderr;
string stdout;
string url="http://USER:PASSWORD@IP/axis-cgi/io/port.cgi?action=PORT%3A%2F3000%5C";
system.Exec("wget -O /dev/null -q "#url, &stdout, &stderr);
nun soll das Ganze noch durch einen LED Stripe in der Türsprechstation signalisiert werden,
der Hersteller Support hat mir folgendes per Mail geschickt, aber ich bekomme es nicht über die CCU im Skript "gesendet",
also auf deutsch: es funktioniert nicht...nun habe ich aber von Skripten und Co. keine wirkliche Ahnung.
Kann mir das jemand von euch ggf so zusammenstellen, wie es korrekt ist?

Code: Alles auswählen

[http://{{username}}:{{password}}@{{ip}}/vapix/axdsapi]http://{{username}}:{{password}}@{{ip}}/vapix/axdsapi

{

  "axdsapi:SetUiFeedback": {

    "internal": false,

    "ledFeedbacks": [

      {

        "led": "stripe",

        "runStyle": "oneshot",

        "durationOnMillisec": 100,

        "durationOffMillisec": 100,

        "valueOn": "green",

        "valueOff": "off",

        "loops": 15

      }

    ]

  }

}
er hat noch auf folgenden LInk verwiesen: https://www.axis.com/vapix-library/subj ... -t10163356

wäre sehr dankbar für Hilfe! :)

Bembi
Beiträge: 98
Registriert: 04.02.2015, 02:15
System: CCU und Access Point
Wohnort: Bochum
Hat sich bedankt: 7 Mal
Danksagung erhalten: 16 Mal

Re: http request mit JSON Befehl / Java Script - HIlfe

Beitrag von Bembi » 12.05.2024, 14:03

Moin,
ich interpretiere mal aus Deiner Doku Abschnitt "cURL Simple" und würde mal folgendes probieren:
(alles in einer Zeile, ich schreibe das hier nur mehrzeilig, damit es besser lesbar ist...)

http://USER:PASSWORD@IP/vapix/axdsapi

?SetUiFeedback_internal=false

&SetUiFeedback_ledFeedbacks_led="stripe"
&SetUiFeedback_ledFeedbacks_runStyle="oneshot"
&SetUiFeedback_ledFeedbacks_durationOnMillisec=100
&SetUiFeedback_ledFeedbacks_durationOffMillisec=100
&SetUiFeedback_ledFeedbacks_valueOn="green"
&SetUiFeedback_ledFeedbacks_valueOn="off"
&SetUiFeedback_ledFeedbacks_loops=15

oder

http://USER:PASSWORD@IP/vapix/axdsapi

?format=simple

&SetUiFeedback_internal=false
&SetUiFeedback_ledFeedbacks_led="stripe"
&SetUiFeedback_ledFeedbacks_runStyle="oneshot"
&SetUiFeedback_ledFeedbacks_durationOnMillisec=100
&SetUiFeedback_ledFeedbacks_durationOffMillisec=100
&SetUiFeedback_ledFeedbacks_valueOn="green"
&SetUiFeedback_ledFeedbacks_valueOn="off"
&SetUiFeedback_ledFeedbacks_loops=15
1 x CCU3 mit aktuell 36 Geräten (HM, HmIP, HmIPW)
1 x CCU3 mit aktuell 66 Geräten (HM, HmIP, HmIPW)
2 x CCU2 und einen Schrank voll mit Restbeständen

superbraz
Beiträge: 184
Registriert: 05.04.2019, 00:18
Hat sich bedankt: 20 Mal
Danksagung erhalten: 2 Mal

Re: http request mit JSON Befehl / Java Script - HIlfe

Beitrag von superbraz » 18.05.2024, 11:25

hallo und vielen Dank schonmal, für deine Hilfe...

gebe ich die URL in den Browser ein (beide varianten) kommt:

Code: Alles auswählen

No action specified!
path:
/vapix/intercom
options:
SetUiFeedback_internal=false&SetUiFeedback_ledFeedbacks_led=%22stripe%22&SetUiFeedback_ledFeedbacks_runStyle=%22oneshot%22&SetUiFeedback_ledFeedbacks_durationOnMillisec=100&SetUiFeedback_ledFeedbacks_durationOffMillisec=100&SetUiFeedback_ledFeedbacks_valueOn=%22green%22&SetUiFeedback_ledFeedbacks_valueOn=%22off%22&SetUiFeedback_ledFeedbacks_loops=15
API functions:
axdsapi:GetServiceCapabilities
axdsapi:ValidateConfiguration
axdsapi:SetConfiguration
axdsapi:UpdateConfiguration
axdsapi:GetConfiguration
axdsapi:Configuration
axdsapi:GetServerReport
axdsapi:GetCardReaderConfiguration
axdsapi:GetSupportedTagTypes
axdsapi:GetDefaultTagTypes
axdsapi:GetTagTypes
axdsapi:SetTagTypes
axdsapi:GetLastTag
axdsapi:GetTag
axdsapi:InjectTag
axdsapi:RegisterReader
axdsapi:UnregisterReader
axdsapi:KeepAliveReader
axdsapi:GetCurrentReaders
axdsapi:ProbeIPAccessConfiguration
axdsapi:UpdateIPAccessConfiguration
axdsapi:GetCardData
axdsapi:WriteCardData
axdsapi:ReaderCommand
axdsapi:GetExternalOSDPStatus
axdsapi:GetKeySequence
axdsapi:GetLastKeySequence
axdsapi:InjectKeySequence
axdsapi:CallTerminate
axdsapi:CallAnswer
axdsapi:CallByPhonebookEntryId
axdsapi:InjectPresence
axdsapi:SetUIBehavior
axdsapi:GetLedCapabilities
axdsapi:SetStateVisualization
axdsapi:SetUiFeedback
axdsapi:GetContactUIAttributes
axdsapi:GetContacts
axdsapi:SetContacts
axdsapi:RemoveContacts
axdsapi:Contacts
axdsapi:ExportContacts
axdsapi:ImportContacts
axdsapi:RemoveAllContacts
axdsapi:GetPhonebookEntries
axdsapi:SetPhonebookEntries
axdsapi:RemovePhonebookEntries
axdsapi:PhonebookEntries
axdsapi:ExportPhonebookEntries
axdsapi:ImportPhonebookEntries
axdsapi:RemoveAllPhonebookEntries
axdsapi:GetScreenshot
axdsapi:InjectTouch
axdsapi:Backup
axdsapi:Restore
axdsapi:VAPIX
mache ich aus dem ? ein : hinter axdsapi kommt:

Code: Alles auswählen

Forbidden
You don't have permission to access this resource.
trotz korrecter credentials...

Antworten

Zurück zu „HomeMatic IP mit CCU“