Skip to content

Commit

Permalink
Merge pull request #15 from AaronLionsheep/0.3.0
Browse files Browse the repository at this point in the history
0.3.0
  • Loading branch information
AaronLionsheep committed Oct 1, 2022
2 parents 1cbfc1e + fbebe74 commit 1246480
Show file tree
Hide file tree
Showing 17 changed files with 1,008 additions and 81 deletions.
320 changes: 303 additions & 17 deletions ShellyNGMQTT.indigoPlugin/Contents/Server Plugin/Devices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
<Label>Shelly Model:</Label>
<List>
<Option value="shelly-plus-1">Shelly Plus 1</Option>
<Option value="shelly-plus-1-pm">%%disabled:Shelly Plus 1 PM%%</Option>
<Option value="shelly-plus-2-pm">%%disabled:Shelly Plus 2 PM%%</Option>
<Option value="shelly-plus-1-pm">Shelly Plus 1 PM</Option>
<Option value="shelly-plus-2-pm">Shelly Plus 2 PM</Option>
<Option value="-1">%%separator%%</Option>
<Option value="shelly-plus-i-4">Shelly Plus I4</Option>
<Option value="-1">%%separator%%</Option>
<Option value="shelly-pro-1">%%disabled:Shelly Pro 1%%</Option>
<Option value="shelly-pro-1-pm">%%disabled:Shelly Pro 1 PM%%</Option>
<Option value="shelly-pro-2">%%disabled:Shelly Pro 2%%</Option>
<Option value="shelly-pro-2-pm">%%disabled:Shelly Pro 2 PM%%</Option>
<Option value="shelly-pro-1">Shelly Pro 1</Option>
<Option value="shelly-pro-1-pm">Shelly Pro 1 PM</Option>
<Option value="shelly-pro-2">Shelly Pro 2</Option>
<Option value="shelly-pro-2-pm">Shelly Pro 2 PM</Option>
<Option value="shelly-pro-4-pm">%%disabled:Shelly Pro 4 PM%%</Option>
</List>
</Field>
Expand Down Expand Up @@ -96,37 +96,103 @@
</States>
</Device>

<!--
<Device type="custom" id="shelly-plus-2-pm">
<Name>Shelly Plus 2 PM</Name>
<Device type="sensor" id="shelly-plus-1-pm">
<Name>Shelly Plus 1 PM</Name>
<ConfigUI>
<Field type="checkbox" id="SupportsStatusRequest" defaultValue="true" hidden="true" />
<Field type="checkbox" id="SupportsOnState" defaultValue="false" hidden="true" />
<Field type="checkbox" id="SupportsSensorValue" defaultValue="false" hidden="true" />

<Field id="broker-id" type="menu">
<Field id="settings-section" type="menu" defaultValue="indigo">
<Label>Configuration Section:</Label>
<List>
<Option value="indigo">Indigo</Option>
<Option value="-1">%%separator%%</Option>
<Option value="system">System</Option>
<Option value="wifi">WiFi</Option>
<Option value="ble">BLE</Option>
</List>
</Field>

<!-- Indigo -->

<Field id="indigo-sep" type="separator" visibleBindingId="settings-section" visibleBindingValue="indigo"/>

<Field id="broker-id" type="menu" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>MQTT Broker:</Label>
<List class="self" filter="" method="get_broker_devices" dynamicReload="true"/>
</Field>

<Field id="address" type="textfield">
<Field id="address" type="textfield" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>Base MQTT Topic:</Label>
</Field>

<Field id="message-type" type="textfield">
<Field id="message-type" type="textfield" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>Message Type:</Label>
</Field>

<Field id="profile" type="menu" defaultValue="switch">
<Label>Device Profile:</Label>
<!-- System -->
<Template file="ConfigTemplates/ConfigureSystem.xml"/>

<!-- WiFi -->
<Template file="ConfigTemplates/ConfigureWifi.xml"/>

<!-- BLE -->
<Template file="ConfigTemplates/ConfigureBLE.xml"/>

</ConfigUI>
<States>
</States>
</Device>

<Device type="sensor" id="shelly-plus-2-pm">
<Name>Shelly Plus 2 PM</Name>
<ConfigUI>
<Field type="checkbox" id="SupportsStatusRequest" defaultValue="true" hidden="true" />
<Field type="checkbox" id="SupportsOnState" defaultValue="false" hidden="true" />
<Field type="checkbox" id="SupportsSensorValue" defaultValue="false" hidden="true" />

<Field id="settings-section" type="menu" defaultValue="indigo">
<Label>Configuration Section:</Label>
<List>
<Option value="switch">Switch</Option>
<Option value="cover">Cover</Option>
<Option value="indigo">Indigo</Option>
<Option value="-1">%%separator%%</Option>
<Option value="system">System</Option>
<Option value="wifi">WiFi</Option>
<Option value="ble">BLE</Option>
</List>
</Field>

<!-- Indigo -->

<Field id="indigo-sep" type="separator" visibleBindingId="settings-section" visibleBindingValue="indigo"/>

<Field id="broker-id" type="menu" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>MQTT Broker:</Label>
<List class="self" filter="" method="get_broker_devices" dynamicReload="true"/>
</Field>

<Field id="address" type="textfield" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>Base MQTT Topic:</Label>
</Field>

<Field id="message-type" type="textfield" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>Message Type:</Label>
</Field>

<!-- System -->
<Template file="ConfigTemplates/ConfigureSystem.xml"/>

<!-- WiFi -->
<Template file="ConfigTemplates/ConfigureWifi.xml"/>

<!-- BLE -->
<Template file="ConfigTemplates/ConfigureBLE.xml"/>

</ConfigUI>
<States>
</States>
</Device>
-->

<Device type="sensor" id="shelly-plus-i-4">
<Name>Shelly Plus I4</Name>
Expand Down Expand Up @@ -176,9 +242,225 @@
</States>
</Device>

<Device type="sensor" id="shelly-pro-1">
<Name>Shelly Pro 1</Name>
<ConfigUI>
<Field type="checkbox" id="SupportsStatusRequest" defaultValue="true" hidden="true" />
<Field type="checkbox" id="SupportsOnState" defaultValue="false" hidden="true" />
<Field type="checkbox" id="SupportsSensorValue" defaultValue="false" hidden="true" />

<Field id="settings-section" type="menu" defaultValue="indigo">
<Label>Configuration Section:</Label>
<List>
<Option value="indigo">Indigo</Option>
<Option value="-1">%%separator%%</Option>
<Option value="system">System</Option>
<Option value="ethernet">Ethernet</Option>
<Option value="wifi">WiFi</Option>
<Option value="ble">BLE</Option>
</List>
</Field>

<!-- Indigo -->

<Field id="indigo-sep" type="separator" visibleBindingId="settings-section" visibleBindingValue="indigo"/>

<Field id="broker-id" type="menu" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>MQTT Broker:</Label>
<List class="self" filter="" method="get_broker_devices" dynamicReload="true"/>
</Field>

<Field id="address" type="textfield" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>Base MQTT Topic:</Label>
</Field>

<Field id="message-type" type="textfield" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>Message Type:</Label>
</Field>

<!-- System -->
<Template file="ConfigTemplates/ConfigureSystem.xml"/>

<!-- WiFi -->
<Template file="ConfigTemplates/ConfigureWifi.xml"/>

<!-- Ethernet -->
<Template file="ConfigTemplates/ConfigureEthernet.xml"/>

<!-- BLE -->
<Template file="ConfigTemplates/ConfigureBLE.xml"/>

</ConfigUI>
<States>
</States>
</Device>

<Device type="sensor" id="shelly-pro-1-pm">
<Name>Shelly Pro 1 PM</Name>
<ConfigUI>
<Field type="checkbox" id="SupportsStatusRequest" defaultValue="true" hidden="true" />
<Field type="checkbox" id="SupportsOnState" defaultValue="false" hidden="true" />
<Field type="checkbox" id="SupportsSensorValue" defaultValue="false" hidden="true" />

<Field id="settings-section" type="menu" defaultValue="indigo">
<Label>Configuration Section:</Label>
<List>
<Option value="indigo">Indigo</Option>
<Option value="-1">%%separator%%</Option>
<Option value="system">System</Option>
<Option value="ethernet">Ethernet</Option>
<Option value="wifi">WiFi</Option>
<Option value="ble">BLE</Option>
</List>
</Field>

<!-- Indigo -->

<Field id="indigo-sep" type="separator" visibleBindingId="settings-section" visibleBindingValue="indigo"/>

<Field id="broker-id" type="menu" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>MQTT Broker:</Label>
<List class="self" filter="" method="get_broker_devices" dynamicReload="true"/>
</Field>

<Field id="address" type="textfield" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>Base MQTT Topic:</Label>
</Field>

<Field id="message-type" type="textfield" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>Message Type:</Label>
</Field>

<!-- System -->
<Template file="ConfigTemplates/ConfigureSystem.xml"/>

<!-- WiFi -->
<Template file="ConfigTemplates/ConfigureWifi.xml"/>

<!-- Ethernet -->
<Template file="ConfigTemplates/ConfigureEthernet.xml"/>

<!-- BLE -->
<Template file="ConfigTemplates/ConfigureBLE.xml"/>

</ConfigUI>
<States>
</States>
</Device>

<Device type="sensor" id="shelly-pro-2">
<Name>Shelly Pro 1</Name>
<ConfigUI>
<Field type="checkbox" id="SupportsStatusRequest" defaultValue="true" hidden="true" />
<Field type="checkbox" id="SupportsOnState" defaultValue="false" hidden="true" />
<Field type="checkbox" id="SupportsSensorValue" defaultValue="false" hidden="true" />

<Field id="settings-section" type="menu" defaultValue="indigo">
<Label>Configuration Section:</Label>
<List>
<Option value="indigo">Indigo</Option>
<Option value="-1">%%separator%%</Option>
<Option value="system">System</Option>
<Option value="ethernet">Ethernet</Option>
<Option value="wifi">WiFi</Option>
<Option value="ble">BLE</Option>
</List>
</Field>

<!-- Indigo -->

<Field id="indigo-sep" type="separator" visibleBindingId="settings-section" visibleBindingValue="indigo"/>

<Field id="broker-id" type="menu" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>MQTT Broker:</Label>
<List class="self" filter="" method="get_broker_devices" dynamicReload="true"/>
</Field>

<Field id="address" type="textfield" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>Base MQTT Topic:</Label>
</Field>

<Field id="message-type" type="textfield" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>Message Type:</Label>
</Field>

<!-- System -->
<Template file="ConfigTemplates/ConfigureSystem.xml"/>

<!-- WiFi -->
<Template file="ConfigTemplates/ConfigureWifi.xml"/>

<!-- Ethernet -->
<Template file="ConfigTemplates/ConfigureEthernet.xml"/>

<!-- BLE -->
<Template file="ConfigTemplates/ConfigureBLE.xml"/>

</ConfigUI>
<States>
</States>
</Device>

<Device type="sensor" id="shelly-pro-2-pm">
<Name>Shelly Pro 2 PM</Name>
<ConfigUI>
<Field type="checkbox" id="SupportsStatusRequest" defaultValue="true" hidden="true" />
<Field type="checkbox" id="SupportsOnState" defaultValue="false" hidden="true" />
<Field type="checkbox" id="SupportsSensorValue" defaultValue="false" hidden="true" />

<Field id="settings-section" type="menu" defaultValue="indigo">
<Label>Configuration Section:</Label>
<List>
<Option value="indigo">Indigo</Option>
<Option value="-1">%%separator%%</Option>
<Option value="system">System</Option>
<Option value="ethernet">Ethernet</Option>
<Option value="wifi">WiFi</Option>
<Option value="ble">BLE</Option>
</List>
</Field>

<!-- Indigo -->

<Field id="indigo-sep" type="separator" visibleBindingId="settings-section" visibleBindingValue="indigo"/>

<Field id="broker-id" type="menu" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>MQTT Broker:</Label>
<List class="self" filter="" method="get_broker_devices" dynamicReload="true"/>
</Field>

<Field id="address" type="textfield" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>Base MQTT Topic:</Label>
</Field>

<Field id="message-type" type="textfield" visibleBindingId="settings-section" visibleBindingValue="indigo">
<Label>Message Type:</Label>
</Field>

<!-- System -->
<Template file="ConfigTemplates/ConfigureSystem.xml"/>

<!-- WiFi -->
<Template file="ConfigTemplates/ConfigureWifi.xml"/>

<!-- Ethernet -->
<Template file="ConfigTemplates/ConfigureEthernet.xml"/>

<!-- BLE -->
<Template file="ConfigTemplates/ConfigureBLE.xml"/>

</ConfigUI>
<States>
</States>
</Device>

<Device type="relay" id="component-switch">
<Name>Switch Component</Name>
<ConfigUI>
<Field type="checkbox" id="SupportsEnergyMeter" defaultValue="false" hidden="true" />
<Field type="checkbox" id="SupportsPowerMeter" defaultValue="false" hidden="true" />
<Field type="checkbox" id="SupportsEnergyMeterCurPower" defaultValue="false" hidden="true" />

<Field id="name" type="textfield">
<Label>Name:</Label>
</Field>
Expand Down Expand Up @@ -287,6 +569,8 @@
<CallbackMethod>_write_switch_configuration</CallbackMethod>
</Field>
</ConfigUI>
<States>
</States>
</Device>

<Device type="sensor" id="component-input">
Expand Down Expand Up @@ -327,6 +611,8 @@
<CallbackMethod>_write_input_configuration</CallbackMethod>
</Field>
</ConfigUI>
<States>
</States>
</Device>

<Device type="dimmer" id="component-cover">
Expand Down

0 comments on commit 1246480

Please sign in to comment.