Skip to content

Commit

Permalink
Merge pull request openhab#1 from pinkfish/nest
Browse files Browse the repository at this point in the history
Nest
  • Loading branch information
pinkfish authored Feb 8, 2017
2 parents 5474a88 + 8ede5f1 commit c1c034f
Show file tree
Hide file tree
Showing 20 changed files with 675 additions and 194 deletions.
17 changes: 17 additions & 0 deletions addons/binding/org.openhab.binding.insteonplm/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.openhab.binding.insteonplm</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ Import-Package: org.openhab.binding.nest,
org.slf4j
Require-Bundle: org.junit;bundle-version="4.11.0",
com.google.gson
Export-Package: org.openhab.binding.nest.internal.data;x-internal:=true,
org.openhab.binding.nest;uses:="org.eclipse.smarthome.test"
Export-Package: org.openhab.binding.nest;uses:="org.eclipse.smarthome.test"
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,8 @@
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/binding/v1.0.0 http://eclipse.org/smarthome/schemas/binding-1.0.0.xsd">

<name>Nest Binding</name>
<description>This is the binding for Nest connects to the nest
cloud and allows control of the various nest devices.</description>
<description>This is the binding for Nest connects to the nest cloud and allows control of the various nest devices. Create a bridge thing
to setup the connection to nest.</description>
<author>David Bennett</author>

<config-description>
<parameter name="client_id" type="text">
<label>Client id</label>
<description>The client id from the nest product page</description>
<required>true</required>
</parameter>
<parameter name="client_secret" type="text">
<label>Client secret</label>
<description>The client secret from the nest product page</description>
<required>true</required>
</parameter>
<parameter name="pincode" type="text">
<label>Pincode</label>
<description>The pincode to use after clicking on the authorization url</description>
<required>true</required>
</parameter>
<parameter name="refresh_interval" type="text">
<label>Refresh Interval</label>
<description>How often to refresh the data from nest (in seconds). Don't make this too often or nest will throttle your account.</description>
<required>true</required>
<default>120</default>
</parameter>
</config-description>

</binding:binding>
34 changes: 34 additions & 0 deletions addons/binding/org.openhab.binding.nest/ESH-INF/thing/bridge.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="nest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0"
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd">

<bridge-type id="bridge">
<label>Nest API Source</label>
<description>Provides the layer to talk to the nest apis</description>
<config-description>
<parameter name="client_id" type="text">
<label>Client id</label>
<description>The client id from the nest product page</description>
<required>true</required>
</parameter>
<parameter name="client_secret" type="text">
<label>Client secret</label>
<description>The client secret from the nest product page</description>
<required>true</required>
</parameter>
<parameter name="pincode" type="text">
<label>Pincode</label>
<description>The pincode to use after clicking on the authorization url</description>
<required>true</required>
</parameter>
<parameter name="refresh_interval" type="text">
<label>Refresh Interval</label>
<description>How often to refresh the data from nest (in seconds). Don't make this too often or nest will throttle
your account.</description>
<required>true</required>
<default>120</default>
</parameter>
</config-description>
</bridge-type>
</thing:thing-descriptions>
38 changes: 24 additions & 14 deletions addons/binding/org.openhab.binding.nest/ESH-INF/thing/camera.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
<thing-type id="camera">
<label>Nest Cam</label>
<description>Provides the nestcam layer to talk to nest</description>
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="nest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0"
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd">

<thing-type id="camera">
<supported-bridge-type-refs>
<bridge-type-ref id="bridge" />
</supported-bridge-type-refs>

<channels>
<channel id="audio_input_enabled" typeId="switch" />
<channel id="video_history_enabled" typeId="switch" />
<channel id="streaming" typeId="switch" />
<channel id="web_url" typeId="string" />
<channel id="app_url" typeId="string" />
<channel id="public_share_enabled" typeId="switch" />
<channel id="public_share_url" typeId="string" />
<channel id="snapshot_url" typeId="string" />
</channels>
</thing-type>
<label>Nest Cam</label>
<description>Provides the nestcam layer to talk to nest</description>

<channels>
<channel id="audio_input_enabled" typeId="switch" />
<channel id="video_history_enabled" typeId="switch" />
<channel id="streaming" typeId="switch" />
<channel id="web_url" typeId="string" />
<channel id="app_url" typeId="string" />
<channel id="public_share_enabled" typeId="switch" />
<channel id="public_share_url" typeId="string" />
<channel id="snapshot_url" typeId="string" />
</channels>
</thing-type>
</thing:thing-descriptions>
Original file line number Diff line number Diff line change
@@ -1,51 +1,61 @@
<thing-type id="smoke_detector">
<label>Nest Protect</label>
<description>Provides the nest protect layer to talk to nest</description>
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="nest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0"
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd">

<channels>
<channel id="ui_color_state" typeId="uicolorstate" />
<channel id="battery" typeId="battery" />
<channel id="co_alarm_state" typeId="alarmstate" />
<channel id="smoke_alarm_state" typeId="alarmstate" />
<channel id="manual_test_active" typeId="switch" />
</channels>
</thing-type>
<thing-type id="smoke_detector">
<supported-bridge-type-refs>
<bridge-type-ref id="bridge" />
</supported-bridge-type-refs>

<channel-type id="uicolorstate">
<item-type>String</item-type>
<label>Mode</label>
<description>Current color state of the protect</description>
<state readOnly="true">
<options>
<option value="GRAY">gray</option>
<option value="GREEN">green</option>
<option value="YELLOW">yellow</option>
<option value="RED">red</option>
</options>
</state>
</channel-type>
<label>Nest Protect</label>
<description>Provides the nest protect layer to talk to nest</description>

<channel-type id="alarmstate">
<item-type>String</item-type>
<label>Alarm State</label>
<description>State of the alarm</description>
<state readOnly="false">
<options>
<option value="OK">ok</option>
<option value="EMERGENCY">emergency</option>
<option value="WARNING">warning</option>
</options>
</state>
</channel-type>
<channels>
<channel id="ui_color_state" typeId="uicolorstate" />
<channel id="battery" typeId="battery" />
<channel id="co_alarm_state" typeId="alarmstate" />
<channel id="smoke_alarm_state" typeId="alarmstate" />
<channel id="manual_test_active" typeId="switch" />
</channels>
</thing-type>

<channel-type id="battery">
<item-type>String</item-type>
<label>Battery</label>
<description>Battery state</description>
<state readOnly="false">
<options>
<option value="OK">ok</option>
<option value="REPLACE">replace</option>
</options>
</state>
</channel-type>
<channel-type id="uicolorstate">
<item-type>String</item-type>
<label>Mode</label>
<description>Current color state of the protect</description>
<state readOnly="true">
<options>
<option value="GRAY">gray</option>
<option value="GREEN">green</option>
<option value="YELLOW">yellow</option>
<option value="RED">red</option>
</options>
</state>
</channel-type>

<channel-type id="alarmstate">
<item-type>String</item-type>
<label>Alarm State</label>
<description>State of the alarm</description>
<state readOnly="false">
<options>
<option value="OK">ok</option>
<option value="EMERGENCY">emergency</option>
<option value="WARNING">warning</option>
</options>
</state>
</channel-type>

<channel-type id="battery">
<item-type>String</item-type>
<label>Battery</label>
<description>Battery state</description>
<state readOnly="false">
<options>
<option value="OK">ok</option>
<option value="REPLACE">replace</option>
</options>
</state>
</channel-type>
</thing:thing-descriptions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="nest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0"
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd">

<thing-type id="structure">
<supported-bridge-type-refs>
<bridge-type-ref id="bridge" />
</supported-bridge-type-refs>

<label>Nest Structure</label>
<description>The details about the nest structures</description>

<channels>
<channel id="home_away" typeId="text" />
<channel id="video_history_enabled" typeId="switch" />
<channel id="streaming" typeId="switch" />
<channel id="web_url" typeId="string" />
<channel id="app_url" typeId="string" />
<channel id="public_share_enabled" typeId="switch" />
<channel id="public_share_url" typeId="string" />
<channel id="snapshot_url" typeId="string" />
</channels>
</thing-type>
</thing:thing-descriptions>
Loading

0 comments on commit c1c034f

Please sign in to comment.