]> git.basschouten.com Git - openhab-addons.git/blob
b4d4bcc50d18e1363664aca110748e2992178108
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.russound.internal.rio;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.russound.internal.RussoundBindingConstants;
17 import org.openhab.core.thing.ThingTypeUID;
18
19 /**
20  * The class defines common constants ({@link ThingTypeUID} and channels), which are used across the rio binding
21  *
22  * @author Tim Roberts - Initial contribution
23  */
24 @NonNullByDefault
25 public class RioConstants {
26
27     // BRIDGE TYPE IDS
28     public static final ThingTypeUID BRIDGE_TYPE_RIO = new ThingTypeUID(RussoundBindingConstants.BINDING_ID, "rio");
29     public static final ThingTypeUID BRIDGE_TYPE_CONTROLLER = new ThingTypeUID(RussoundBindingConstants.BINDING_ID,
30             "controller");
31
32     public static final ThingTypeUID THING_TYPE_ZONE = new ThingTypeUID(RussoundBindingConstants.BINDING_ID, "zone");
33     public static final ThingTypeUID THING_TYPE_SOURCE = new ThingTypeUID(RussoundBindingConstants.BINDING_ID,
34             "source");
35
36     // the port number rio listens on
37     public static final int RIO_PORT = 9621;
38
39     // SYSTEM PROPERTIES
40     public static final String PROPERTY_SYSVERSION = "Firmware Version";
41
42     // SYSTEM CHANNELS
43     public static final String CHANNEL_SYSSTATUS = "status"; // readonly
44     public static final String CHANNEL_SYSLANG = "lang"; // read/write - english, chinese, russian
45     public static final String CHANNEL_SYSALLON = "allon"; // read/write - english, chinese, russian
46     public static final String CHANNEL_SYSCONTROLLERS = "controllers"; // json array [1,2,etc]
47     public static final String CHANNEL_SYSSOURCES = "sources"; // json array [{id: 1, name: xxx},{id:2, name: xxx}, etc]
48
49     // CONTROLLER PROPERTIES
50     public static final String PROPERTY_CTLTYPE = "Model Type";
51     public static final String PROPERTY_CTLIPADDRESS = "IP Address";
52     public static final String PROPERTY_CTLMACADDRESS = "MAC Address";
53
54     // CONTROLLER CHANNELS
55     public static final String CHANNEL_CTLZONES = "zones"; // json array [{id: 1, name: xxx},{id:2, name: xxx}, etc]
56
57     // ZONE CHANNELS
58     public static final String CHANNEL_ZONENAME = "name"; // 12 max
59     public static final String CHANNEL_ZONESOURCE = "source"; // 1-8 or 1-12
60     public static final String CHANNEL_ZONEBASS = "bass"; // -10 to 10
61     public static final String CHANNEL_ZONETREBLE = "treble"; // -10 to 10
62     public static final String CHANNEL_ZONEBALANCE = "balance"; // -10 to 10
63     public static final String CHANNEL_ZONELOUDNESS = "loudness"; // OFF/ON
64     public static final String CHANNEL_ZONETURNONVOLUME = "turnonvolume"; // 0 to 50
65     public static final String CHANNEL_ZONEDONOTDISTURB = "donotdisturb"; // OFF/ON/SLAVE
66     public static final String CHANNEL_ZONEPARTYMODE = "partymode"; // OFF/ON/MASTER
67     public static final String CHANNEL_ZONESTATUS = "status"; // OFF/ON/MASTER
68     public static final String CHANNEL_ZONEVOLUME = "volume"; // OFF/ON/MASTER
69     public static final String CHANNEL_ZONEMUTE = "mute"; // OFF/ON/MASTER
70     public static final String CHANNEL_ZONEPAGE = "page"; // OFF/ON/MASTER
71     public static final String CHANNEL_ZONERATING = "rating"; // OFF=Dislike, On=Like
72     public static final String CHANNEL_ZONESHAREDSOURCE = "sharedsource"; // OFF/ON/MASTER
73     public static final String CHANNEL_ZONESLEEPTIMEREMAINING = "sleeptimeremaining"; // OFF/ON/MASTER
74     public static final String CHANNEL_ZONELASTERROR = "lasterror"; // OFF/ON/MASTER
75     public static final String CHANNEL_ZONEENABLED = "enabled"; // OFF/ON/MASTER
76     public static final String CHANNEL_ZONEREPEAT = "repeat"; // OFF/ON/MASTER
77     public static final String CHANNEL_ZONESHUFFLE = "shuffle"; // OFF/ON/MASTER
78
79     public static final String CHANNEL_ZONESYSFAVORITES = "systemfavorites"; // json array
80     public static final String CHANNEL_ZONEFAVORITES = "zonefavorites"; // json array
81     public static final String CHANNEL_ZONEPRESETS = "presets"; // json array
82
83     // ZONE EVENT BASED
84     public static final String CHANNEL_ZONEKEYPRESS = "keypress";
85     public static final String CHANNEL_ZONEKEYRELEASE = "keyrelease";
86     public static final String CHANNEL_ZONEKEYHOLD = "keyhold";
87     public static final String CHANNEL_ZONEKEYCODE = "keycode";
88     public static final String CHANNEL_ZONEEVENT = "event";
89
90     // ZONE MEDIA CHANNELS
91     public static final String CHANNEL_ZONEMMINIT = "mminit";
92     public static final String CHANNEL_ZONEMMCONTEXTMENU = "mmcontextmenu";
93
94     // FAVORITE CHANNELS
95     public static final String CHANNEL_FAVNAME = "name";
96     public static final String CHANNEL_FAVVALID = "valid";
97     public static final String CHANNEL_FAVCMD = "cmd";
98
99     // FAVORITE COMMANDS
100     public static final String CMD_FAVSAVESYS = "savesystem";
101     public static final String CMD_FAVRESTORESYS = "restoresystem";
102     public static final String CMD_FAVDELETESYS = "deletesystem";
103     public static final String CMD_FAVSAVEZONE = "savezone";
104     public static final String CMD_FAVRESTOREZONE = "restorezone";
105     public static final String CMD_FAVDELETEZONE = "deletezone";
106
107     // BANK CHANNELS
108     public static final String CHANNEL_BANKNAME = "name";
109
110     // PRESET CHANNELS
111     public static final String CHANNEL_PRESETNAME = "name";
112     public static final String CHANNEL_PRESETVALID = "valid";
113     public static final String CHANNEL_PRESETCMD = "cmd";
114
115     // PRESET COMMANDS
116     public static final String CMD_PRESETSAVE = "save";
117     public static final String CMD_PRESETRESTORE = "restore";
118     public static final String CMD_PRESETDELETE = "delete";
119
120     // SOURCE PROPERTIES
121     public static final String PROPERTY_SOURCEIPADDRESS = "IP Address";
122
123     // SOURCE CHANNELS
124     public static final String CHANNEL_SOURCETYPE = "type";
125     public static final String CHANNEL_SOURCENAME = "name";
126     public static final String CHANNEL_SOURCECOMPOSERNAME = "composername";
127     public static final String CHANNEL_SOURCECHANNEL = "channel";
128     public static final String CHANNEL_SOURCECHANNELNAME = "channelname";
129     public static final String CHANNEL_SOURCEGENRE = "genre";
130     public static final String CHANNEL_SOURCEARTISTNAME = "artistname";
131     public static final String CHANNEL_SOURCEALBUMNAME = "albumname";
132     public static final String CHANNEL_SOURCECOVERARTURL = "coverarturl";
133     public static final String CHANNEL_SOURCEPLAYLISTNAME = "playlistname";
134     public static final String CHANNEL_SOURCESONGNAME = "songname";
135     public static final String CHANNEL_SOURCEMODE = "mode";
136     public static final String CHANNEL_SOURCESHUFFLEMODE = "shufflemode";
137     public static final String CHANNEL_SOURCEREPEATMODE = "repeatmode";
138     public static final String CHANNEL_SOURCERATING = "rating";
139     public static final String CHANNEL_SOURCEPROGRAMSERVICENAME = "programservicename";
140     public static final String CHANNEL_SOURCERADIOTEXT = "radiotext";
141     public static final String CHANNEL_SOURCERADIOTEXT2 = "radiotext2";
142     public static final String CHANNEL_SOURCERADIOTEXT3 = "radiotext3";
143     public static final String CHANNEL_SOURCERADIOTEXT4 = "radiotext4";
144     public static final String CHANNEL_SOURCEVOLUME = "volume";
145
146     public static final String CHANNEL_SOURCEBANKS = "banks";
147
148     // SOURCE MEDIA Channels
149     public static final String CHANNEL_SOURCEMMSCREEN = "mmscreen";
150     public static final String CHANNEL_SOURCEMMTITLE = "mmtitle";
151     public static final String CHANNEL_SOURCEMMMENU = "mmmenu";
152     public static final String CHANNEL_SOURCEMMATTR = "mmattr";
153     public static final String CHANNEL_SOURCEMMBUTTONOKTEXT = "mmmenubuttonoktext";
154     public static final String CHANNEL_SOURCEMMBUTTONBACKTEXT = "mmmenubuttonbacktext";
155     public static final String CHANNEL_SOURCEMMINFOTEXT = "mminfotext";
156     public static final String CHANNEL_SOURCEMMHELPTEXT = "mmhelptext";
157     public static final String CHANNEL_SOURCEMMTEXTFIELD = "mmtextfield";
158 }