Re: HTTP Switch, ITEM erstellen,
Verfasst: 11. Dez 2021 15:54
schön das es jetzt geht!
aber auf Netzwerk Probleme muss man erst mal kommen!
aber auf Netzwerk Probleme muss man erst mal kommen!
Code: Alles auswählen
UID: http:url:0de4fe720f
label: HTTP URL Thing
thingTypeUID: http:url
configuration:
authMode: BASIC
ignoreSSLErrors: true
baseURL: http://192.168.178.199:80/
delay: 0
stateMethod: GET
refresh: 30
commandMethod: GET
timeout: 3000
bufferSize: 2048
channels:
- id: km1
channelTypeUID: http:switch
label: km1
description: ""
configuration:
onValue: FF0101
mode: WRITEONLY
offValue: FF0100
commandExtension: "%2$s"
- id: km2
channelTypeUID: http:switch
label: km2
description: null
configuration:
onValue: FF0201
mode: WRITEONLY
offValue: FF0200
commandExtension: "%2$s"
- id: km3
channelTypeUID: http:switch
label: km3
description: null
configuration:
onValue: FF0301
mode: WRITEONLY
offValue: FF0300
commandExtension: "%2$s"
- id: km4
channelTypeUID: http:switch
label: km4
description: null
configuration:
onValue: FF0401
mode: WRITEONLY
offValue: FF0400
commandExtension: "%2$s"
- id: km5
channelTypeUID: http:switch
label: km5
description: null
configuration:
onValue: FF0501
mode: WRITEONLY
offValue: FF0500
commandExtension: "%2$s"
- id: km6
channelTypeUID: http:switch
label: km6
description: null
configuration:
onValue: FF0601
mode: WRITEONLY
offValue: FF0600
commandExtension: "%2$s"
- id: km7
channelTypeUID: http:switch
label: km7
description: null
configuration:
onValue: FF0701
mode: WRITEONLY
offValue: FF0700
commandExtension: "%2$s"
- id: km8
channelTypeUID: http:switch
label: km8
description: null
configuration:
onValue: FF0801
mode: WRITEONLY
offValue: FF0800
commandExtension: "%2$s"
Code: Alles auswählen
Thing http:url:0de4fe720f "Aio Gateway http" [baseURL="http://192.168.178.23/command?", authMode= "BASIC", ignoreSSLErrors = true , bufferSize = "2048", timeout = "3000", refresh=60 ]
{
Channels:
Type switch : http_Rev_1 "Rev 1 http" [onValue = "XC_FNC=Send2&type=CODE&code=190800810005001903004400e300d9004e0044090100010101000100010101000100010000000000000101000002", offValue = "XC_FNC=Send2&type=CODE&code=190800810005001903004400e300d600510044090100010101000100010101000100010000000000000000010102", commandExtension = "%2$s" ]
Type switch : http_Rev_2 "Rev 2 http" [onValue = "XC_FNC=Send2&type=CODE&code=190800810005001903004400e300d9004e004408ff00010101000100010001010100010000000000000101000002", offValue = "XC_FNC=Send2&type=CODE&code=190800810005001903004400e300d9004e0044090100010101000100010001010100010000000000000000010102", commandExtension = "%2$s" ]
Type switch : http_Rev_3 "Rev 3 http" [onValue = "XC_FNC=Send2&type=CODE&code=190800810005001903004500e300da004e004508fe00010101000100010001000101010000000000000101000002", offValue = "XC_FNC=Send2&type=CODE&code=190800810005001903004300e400da004e0043090200010101000100010001000101010000000000000000010102", commandExtension = "%2$s" ]
Type switch : http_FS20_1 "FS20 1 http" [onValue = "XC_FNC=SendSC&type=FS20&data=e79f001000", offValue = "XC_FNC=SendSC&type=FS20&data=e79f000000", commandExtension = "%2$s" ]
Type switch : http_FS20_3 "FS20 3 http" [onValue = "XC_FNC=SendSC&type=FS20&data=e79f021000", offValue = "XC_FNC=SendSC&type=FS20&data=e79f020000", commandExtension = "%2$s" ]
Type switch : http_FS20_4 "FS20 4 http" [onValue = "XC_FNC=SendSC&type=FS20&data=e79f031000", offValue = "XC_FNC=SendSC&type=FS20&data=e79f030000", commandExtension = "%2$s" ]
}
Code: Alles auswählen
Switch http_FS20_1 "FS20 1 http" { channel="http:url:0de4fe720f:http_FS20_1"}
Switch http_FS20_3 "FS20 3 http" { channel="http:url:0de4fe720f:http_FS20_3"}
Switch http_FS20_4 "FS20 4 http" { channel="http:url:0de4fe720f:http_FS20_4"}
Switch http_Rev_1 "Rev 1 http" { channel="http:url:0de4fe720f:http_Rev_1"}
Switch http_Rev_2 "Rev 2 http" { channel="http:url:0de4fe720f:http_Rev_2"}
Switch http_Rev_3 "Rev 3 http" { channel="http:url:0de4fe720f:http_Rev_3"}
und die Items sehen bei OH3 anders aus als oben beschrieben.
Code: Alles auswählen
sudo openhab-cli backup
so geht es bei mir nicht, das dürfte nur für OH2 sein!PeterA hat geschrieben: ↑9. Dez 2021 20:45 Also Http-Befehle kann man auch direkt im Item definieren:
Dann dann ist keine Rule notwendig.Code: Alles auswählen
Switch ShellyPlugS_02 "Shelly TV u. BD [%s]" <poweroutlet> (gShelly) {http=">[ON:POST:http://192.168.2.42/relay/0?turn=on] >[OFF:POST:http://192.168.2.42/relay/0?turn=off]"}