Skip to content

Commit

Permalink
added openHAB thing, items, sitemap files
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaus-hee committed Dec 21, 2021
1 parent 3c0747b commit b22721e
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
11 changes: 11 additions & 0 deletions benq.items
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Google Assistant items
Group BenQ_Group "TV" <projector> { ga="TV" [ volumeDefaultPercentage="2", levelStepSize="1", volumeMaxLevel="10", availableInputs="HDMI=HDMI,SVID=SVID,VID=VID,RGB=RGB,RGB2=RGB2"] }

Switch BenQ_Power "Power" <switch> (BenQ_Group) { ga="tvPower", channel="mqtt:topic:34c510f090:20807f1aae:BenQ_Power" }
Switch BenQ_Mute "Mute" <soundvolume_mute> (BenQ_Group) { ga="tvMute", channel="mqtt:topic:34c510f090:20807f1aae:BenQ_Mute" }
Number BenQ_Volume "Volume" <soundvolume> (BenQ_Group) { ga="tvVolume", channel="mqtt:topic:34c510f090:20807f1aae:BenQ_Volume" }
String BenQ_Input "Input" <flowpipe> (BenQ_Group) { ga="tvInput", channel="mqtt:topic:34c510f090:20807f1aae:BenQ_Source" }

// Other items
String BenQ_Lamp_Mode "Lamp mode" <lightbulb> { channel="mqtt:topic:34c510f090:20807f1aae:BenQ_LampMode" }
Number BenQ_Lamp_Hours "Lamp hours" <time> { channel="mqtt:topic:34c510f090:20807f1aae:BenQ_LampHours" }
6 changes: 6 additions & 0 deletions benq.sitemap
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Default item=BenQ_Power label="Projector"
Default item=BenQ_Source label="Source/ input" mappings=[HDMI="HDMI",SVID="SVID",VID="VID",RGB="RGB",RGB2="RGB2"] visibility=[BenQ_Power==ON]
Setpoint item=BenQ_Volume label="Volume" minValue=0 maxValue=10 step=1 visibility=[BenQ_Power==ON]
Default item=BenQ_Mute label="Mute" visibility=[BenQ_Power==ON]
Default item=BenQ_Lamp_Mode label="Lamp mode" mappings=[LNOR="Normal",ECO="Eco",SECO="SmartEco",SECO2="LampSaver"] visibility=[BenQ_Power==ON]
Default item=BenQ_Lamp_Hours label="Lamp hours" visibility=[BenQ_Power==ON]
58 changes: 58 additions & 0 deletions benq_thing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
UID: mqtt:topic:34c510f090:20807f1aae
label: BenQ TH530 Projector
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: <UID of your mqtt broker, e.g. mqtt:broker:34c510f090>
channels:
- id: BenQ_Power
channelTypeUID: mqtt:switch
label: Power
description: ""
configuration:
commandTopic: cmnd/projector/POWER
stateTopic: stat/projector/STATUS
transformationPattern: JSONPATH:$.POWER
- id: BenQ_Source
channelTypeUID: mqtt:string
label: Source
description: ""
configuration:
commandTopic: cmnd/projector/SOURCE
allowedStates: HDMI,SVID,VID,RGB,RGB2,UNKNOWN
stateTopic: stat/projector/STATUS
transformationPattern: JSONPATH:$.SOURCE
- id: BenQ_Volume
channelTypeUID: mqtt:number
label: Volume
description: ""
configuration:
commandTopic: cmnd/projector/VOLUME
min: 0
stateTopic: stat/projector/STATUS
transformationPattern: JSONPATH:$.VOLUME
max: 10
- id: BenQ_LampMode
channelTypeUID: mqtt:string
label: Lamp Mode
description: ""
configuration:
commandTopic: cmnd/projector/LAMP_MODE
allowedStates: LNOR,ECO,SECO,SECO2
stateTopic: stat/projector/LAMP_MODE
transformationPattern: JSONPATH:$.LAMP_MODE
- id: BenQ_Mute
channelTypeUID: mqtt:switch
label: Mute
description: ""
configuration:
commandTopic: cmnd/projector/MUTE
stateTopic: stat/projector/STATUS
transformationPattern: JSONPATH:$.MUTE
off: UNKNOWN
- id: BenQ_LampHours
channelTypeUID: mqtt:number
label: Lamp Hours
description: ""
configuration:
stateTopic: stat/projector/STATUS
transformationPattern: JSONPATH:$.LAMP_HOURS

0 comments on commit b22721e

Please sign in to comment.