[generacmobilelink] Major rewrite of the Generac MobileLink Binding (#14638)

* [generacmobilelink] Major rewrite of the Generac MobileLink Binding

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
This commit is contained in:
Dan Cunningham
2023-04-09 02:48:12 -07:00
committed by GitHub
parent 09c394b928
commit 41701f518e
21 changed files with 900 additions and 419 deletions

View File

@@ -6,5 +6,6 @@
<type>binding</type>
<name>GeneracMobileLink Binding</name>
<description>This binding monitors Generac manufactured generators through the MobileLink cloud service.</description>
<connection>cloud</connection>
</addon:addon>

View File

@@ -23,17 +23,48 @@ thing-type.config.generacmobilelink.generator.generatorId.description = Generato
# channel types
channel-type.generacmobilelink.batteryVoltage.label = Battery Voltage Status
channel-type.generacmobilelink.blueLight.label = Blue Light Status
channel-type.generacmobilelink.connected.label = Connected
channel-type.generacmobilelink.currentAlarmDescription.label = Current Alarm Description
channel-type.generacmobilelink.exerciseHours.label = Number of Hours Exercised
channel-type.generacmobilelink.fuelLevel.label = Fuel Level
channel-type.generacmobilelink.fuelType.label = Fuel Type
channel-type.generacmobilelink.greenLight.label = Green Light Status
channel-type.generacmobilelink.redLight.label = Red Light Status
channel-type.generacmobilelink.runHours.label = Number of Hours Run
channel-type.generacmobilelink.serviceStatus.label = Service Status
channel-type.generacmobilelink.activationDate.label = Activation Date
channel-type.generacmobilelink.activationDate.description = The activation date of the generator.
channel-type.generacmobilelink.batteryVoltage.label = Battery Voltage
channel-type.generacmobilelink.batteryVoltage.description = The battery voltage.
channel-type.generacmobilelink.connectionTime.label = Connection Time
channel-type.generacmobilelink.connectionTime.description = The date that the unit has been connected from.
channel-type.generacmobilelink.deviceSsid.label = Device SSID
channel-type.generacmobilelink.deviceSsid.description = The SSID that the generator broadcasts for setup.
channel-type.generacmobilelink.hasMaintenanceAlert.label = Has Maintenance Alert
channel-type.generacmobilelink.hasMaintenanceAlert.description = Does the generator require maintenance.
channel-type.generacmobilelink.heroImageUrl.label = Hero Image URL
channel-type.generacmobilelink.heroImageUrl.description = URL to an image of the generator.
channel-type.generacmobilelink.hoursOfProtection.label = Hours of Protection
channel-type.generacmobilelink.hoursOfProtection.description = Number of hours of protection the generator has provided.
channel-type.generacmobilelink.isConnected.label = Is Connected
channel-type.generacmobilelink.isConnected.description = Is the unit connected to the cloud service.
channel-type.generacmobilelink.isConnecting.label = Is Connecting
channel-type.generacmobilelink.isConnecting.description = Is the unit connecting to the cloud service.
channel-type.generacmobilelink.lastSeen.label = Last Seen
channel-type.generacmobilelink.lastSeen.description = The date that the unit was last connected to the cloud service.
channel-type.generacmobilelink.runHours.label = Run Hours
channel-type.generacmobilelink.runHours.description = Number of hours run.
channel-type.generacmobilelink.showWarning.label = Show Warning
channel-type.generacmobilelink.showWarning.description = Should a user interface show a warning symbol due to the current status.
channel-type.generacmobilelink.signalStrength.label = Signal Strength
channel-type.generacmobilelink.signalStrength.description = The Wi-Fi signal strength of the generator
channel-type.generacmobilelink.status.label = Status
channel-type.generacmobilelink.statusDate.label = Last Status Date
channel-type.generacmobilelink.yellowLight.label = Yellow Light Status
channel-type.generacmobilelink.status.description = The current status of the generator.
channel-type.generacmobilelink.status.state.option.1 = Ready
channel-type.generacmobilelink.status.state.option.2 = Running
channel-type.generacmobilelink.status.state.option.3 = Exercising
channel-type.generacmobilelink.status.state.option.4 = Warning
channel-type.generacmobilelink.status.state.option.5 = Stopped
channel-type.generacmobilelink.status.state.option.6 = Communication Issue
channel-type.generacmobilelink.status.state.option.7 = Unknown
channel-type.generacmobilelink.statusLabel.label = Status Label
channel-type.generacmobilelink.statusLabel.description = The label used to identify the current status.
channel-type.generacmobilelink.statusText.label = Status Text
channel-type.generacmobilelink.statusText.description = The longer description of the current status.
# things
thing.generacmobilelink.account.offline.communication-error.session-expired = Session Expired
thing.generacmobilelink.account.offline.configuration-error.invalid-credentials = Invalid Credentials
thing.generacmobilelink.account.offline.communication-error.io-exception = Error Communicating with Service

View File

@@ -17,93 +17,131 @@
<label>MobileLink Generator</label>
<description>MobileLink Generator</description>
<channels>
<channel id="connected" typeId="connected"/>
<channel id="greenLight" typeId="greenLight"/>
<channel id="yellowLight" typeId="yellowLight"/>
<channel id="redLight" typeId="redLight"/>
<channel id="blueLight" typeId="blueLight"/>
<channel id="statusDate" typeId="statusDate"/>
<channel id="heroImageUrl" typeId="heroImageUrl"/>
<channel id="statusLabel" typeId="statusLabel"/>
<channel id="statusText" typeId="statusText"/>
<channel id="activationDate" typeId="activationDate"/>
<channel id="deviceSsid" typeId="deviceSsid"/>
<channel id="status" typeId="status"/>
<channel id="currentAlarmDescription" typeId="currentAlarmDescription"/>
<channel id="isConnected" typeId="isConnected"/>
<channel id="isConnecting" typeId="isConnecting"/>
<channel id="showWarning" typeId="showWarning"/>
<channel id="hasMaintenanceAlert" typeId="hasMaintenanceAlert"/>
<channel id="lastSeen" typeId="lastSeen"/>
<channel id="connectionTime" typeId="connectionTime"/>
<channel id="runHours" typeId="runHours"/>
<channel id="exerciseHours" typeId="exerciseHours"/>
<channel id="fuelType" typeId="fuelType"/>
<channel id="fuelLevel" typeId="fuelLevel"/>
<channel id="batteryVoltage" typeId="batteryVoltage"/>
<channel id="serviceStatus" typeId="serviceStatus"/>
<channel id="hoursOfProtection" typeId="hoursOfProtection"/>
<channel id="signalStrength" typeId="signalStrength"/>
</channels>
<representation-property>generatorId</representation-property>
<config-description-ref uri="thing-type:generacmobilelink:generator"/>
</thing-type>
<channel-type id="connected">
<item-type>Switch</item-type>
<label>Connected</label>
<state readOnly="true"/>
</channel-type>
<channel-type id="greenLight">
<item-type>Switch</item-type>
<label>Green Light Status</label>
<state readOnly="true"/>
</channel-type>
<channel-type id="yellowLight">
<item-type>Switch</item-type>
<label>Yellow Light Status</label>
<state readOnly="true"/>
</channel-type>
<channel-type id="redLight">
<item-type>Switch</item-type>
<label>Red Light Status</label>
<state readOnly="true"/>
</channel-type>
<channel-type id="blueLight">
<item-type>Switch</item-type>
<label>Blue Light Status</label>
<state readOnly="true"/>
</channel-type>
<channel-type id="statusDate">
<item-type>DateTime</item-type>
<label>Last Status Date</label>
<state readOnly="true"/>
</channel-type>
<channel-type id="status">
<item-type>String</item-type>
<item-type>Number</item-type>
<label>Status</label>
<description>The current status of the generator.</description>
<state readOnly="true">
<options>
<option value="1">Ready</option>
<option value="2">Running</option>
<option value="3">Exercising</option>
<option value="4">Warning</option>
<option value="5">Stopped</option>
<option value="6">Communication Issue</option>
<option value="7">Unknown</option>
</options>
</state>
</channel-type>
<channel-type id="statusLabel">
<item-type>String</item-type>
<label>Status Label</label>
<description>The label used to identify the current status.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="currentAlarmDescription">
<channel-type id="statusText">
<item-type>String</item-type>
<label>Current Alarm Description</label>
<label>Status Text</label>
<description>The longer description of the current status.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="heroImageUrl">
<item-type>String</item-type>
<label>Hero Image URL</label>
<description>URL to an image of the generator.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="activationDate">
<item-type>DateTime</item-type>
<label>Activation Date</label>
<description>The activation date of the generator.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="deviceSsid">
<item-type>String</item-type>
<label>Device SSID</label>
<description>The SSID that the generator broadcasts for setup.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="isConnected">
<item-type>Switch</item-type>
<label>Is Connected</label>
<description>Is the unit connected to the cloud service.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="isConnecting">
<item-type>Switch</item-type>
<label>Is Connecting</label>
<description>Is the unit connecting to the cloud service.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="showWarning">
<item-type>Switch</item-type>
<label>Show Warning</label>
<description>Should a user interface show a warning symbol due to the current status.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="hasMaintenanceAlert">
<item-type>Switch</item-type>
<label>Has Maintenance Alert</label>
<description>Does the generator require maintenance.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="lastSeen">
<item-type>DateTime</item-type>
<label>Last Seen</label>
<description>The date that the unit was last connected to the cloud service.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="connectionTime">
<item-type>DateTime</item-type>
<label>Connection Time</label>
<description>The date that the unit has been connected from.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="runHours">
<item-type>Number:Time</item-type>
<label>Number of Hours Run</label>
<label>Run Hours</label>
<description>Number of hours run.</description>
<state readOnly="true" pattern="%d %unit%"/>
</channel-type>
<channel-type id="exerciseHours">
<item-type>Number:Time</item-type>
<label>Number of Hours Exercised</label>
<state readOnly="true" pattern="%d %unit%"/>
</channel-type>
<channel-type id="fuelType">
<item-type>Number</item-type>
<label>Fuel Type</label>
<state readOnly="true"/>
</channel-type>
<channel-type id="fuelLevel">
<item-type>Number:Dimensionless</item-type>
<label>Fuel Level</label>
<state readOnly="true"/>
</channel-type>
<channel-type id="batteryVoltage">
<item-type>String</item-type>
<label>Battery Voltage Status</label>
<state readOnly="true"/>
<item-type>Number:ElectricPotential</item-type>
<label>Battery Voltage</label>
<description>The battery voltage.</description>
<state readOnly="true" pattern="%d %unit%"/>
</channel-type>
<channel-type id="serviceStatus">
<item-type>Switch</item-type>
<label>Service Status</label>
<state readOnly="true"/>
<channel-type id="hoursOfProtection">
<item-type>Number:Time</item-type>
<label>Hours of Protection</label>
<description>Number of hours of protection the generator has provided.</description>
<state readOnly="true" pattern="%d %unit%"/>
</channel-type>
<channel-type id="signalStrength">
<item-type>Number:Dimensionless</item-type>
<label>Signal Strength</label>
<description>The Wi-Fi signal strength of the generator</description>
<state readOnly="true" pattern="%d %unit%"/>
</channel-type>
</thing:thing-descriptions>