diff --git a/shelly/README.md b/shelly/README.md index 0880c767..4e97801d 100644 --- a/shelly/README.md +++ b/shelly/README.md @@ -15,7 +15,7 @@ The currently supported devices are: * Shelly 3EM * Shelly H+T * Shelly i3 - +* Shelly Motion ## Requirements Shelly devices communicate with via MQTT. This means, in order to add Shelly devices to nymea, the nymea instance is required @@ -42,7 +42,5 @@ perfectly fine in the low power mode. When adding a Shelly device that is meant to be installed in walls and has connectors to switches, a new Gateway type device representing the Shelly device itself will be added. The gateway device allow basic monitoring (such as the connected state) and interaction (e.g. reboot the Shelly device). In addition to that, a power switch device will appear which will reflect -presses on the Shelly's SW input. This power switch device also offers the possiblity to configure the used switch (e.g. -toggle, momentary, edge or detached from the Shelly's output). If a connected device has been selected during setup, an -additional device, e.g. the light will appear in the system and can be used to control the power output of the Shelly, -e.g. turning on or off the connected light. +presses on the Shelly's SW input. You can use generic things to connect them to those switches in order to represent your actual +devices connected to the Shelly devices. diff --git a/shelly/integrationpluginshelly.cpp b/shelly/integrationpluginshelly.cpp index 2b7aa913..1a7fea8e 100644 --- a/shelly/integrationpluginshelly.cpp +++ b/shelly/integrationpluginshelly.cpp @@ -55,257 +55,366 @@ static QHash updateStatusMap = { {"unknown", "idle"} }; +static QHash idParamTypeMap = { + {shelly1ThingClassId, shelly1ThingIdParamTypeId}, + {shelly1pmThingClassId, shelly1pmThingIdParamTypeId}, + {shelly1lThingClassId, shelly1lThingIdParamTypeId}, + {shellyPlugThingClassId, shellyPlugThingIdParamTypeId}, + {shellyRgbw2ThingClassId, shellyRgbw2ThingIdParamTypeId}, + {shellyDimmerThingClassId, shellyDimmerThingIdParamTypeId}, + {shelly2ThingClassId, shelly2ThingIdParamTypeId}, + {shelly25ThingClassId, shelly25ThingIdParamTypeId}, + {shellyButton1ThingClassId, shellyButton1ThingIdParamTypeId}, + {shellyEm3ThingClassId, shellyEm3ThingIdParamTypeId}, + {shellyHTThingClassId, shellyHTThingIdParamTypeId}, + {shellyI3ThingClassId, shellyI3ThingIdParamTypeId}, + {shellyMotionThingClassId, shellyMotionThingIdParamTypeId}, +}; + +static QHash usernameParamTypeMap = { + {shelly1ThingClassId, shelly1ThingUsernameParamTypeId}, + {shelly1pmThingClassId, shelly1pmThingUsernameParamTypeId}, + {shelly1lThingClassId, shelly1lThingUsernameParamTypeId}, + {shellyPlugThingClassId, shellyPlugThingUsernameParamTypeId}, + {shellyRgbw2ThingClassId, shellyRgbw2ThingUsernameParamTypeId}, + {shellyDimmerThingClassId, shellyDimmerThingUsernameParamTypeId}, + {shelly2ThingClassId, shelly2ThingUsernameParamTypeId}, + {shelly25ThingClassId, shelly25ThingUsernameParamTypeId}, + {shellyButton1ThingClassId, shellyButton1ThingUsernameParamTypeId}, + {shellyEm3ThingClassId, shellyEm3ThingUsernameParamTypeId}, + {shellyHTThingClassId, shellyHTThingUsernameParamTypeId}, + {shellyI3ThingClassId, shellyI3ThingUsernameParamTypeId}, + {shellyMotionThingClassId, shellyMotionThingUsernameParamTypeId} +}; + +static QHash passwordParamTypeMap = { + {shelly1ThingClassId, shelly1ThingPasswordParamTypeId}, + {shelly1pmThingClassId, shelly1pmThingPasswordParamTypeId}, + {shelly1lThingClassId, shelly1lThingPasswordParamTypeId}, + {shellyPlugThingClassId, shellyPlugThingPasswordParamTypeId}, + {shellyRgbw2ThingClassId, shellyRgbw2ThingPasswordParamTypeId}, + {shellyDimmerThingClassId, shellyDimmerThingPasswordParamTypeId}, + {shelly2ThingClassId, shelly2ThingPasswordParamTypeId}, + {shelly25ThingClassId, shelly25ThingPasswordParamTypeId}, + {shellyButton1ThingClassId, shellyButton1ThingPasswordParamTypeId}, + {shellyEm3ThingClassId, shellyEm3ThingPasswordParamTypeId}, + {shellyHTThingClassId, shellyHTThingPasswordParamTypeId}, + {shellyI3ThingClassId, shellyI3ThingPasswordParamTypeId}, + {shellyMotionThingClassId, shellyMotionThingPasswordParamTypeId} +}; + +static QHash connectedDeviceParamTypeMap = { + {shelly2ThingClassId, shelly2ThingConnectedDevice1ParamTypeId}, + {shelly25ThingClassId, shelly25ThingConnectedDevice1ParamTypeId} +}; + +static QHash connectedDevice2ParamTypeMap = { + {shelly2ThingClassId, shelly2ThingConnectedDevice2ParamTypeId}, + {shelly25ThingClassId, shelly25ThingConnectedDevice2ParamTypeId}, +}; + +static QHash channelParamTypeMap = { + {shellyGenericThingClassId, shellyGenericThingChannelParamTypeId}, + {shellyLightThingClassId, shellyLightThingChannelParamTypeId}, + {shellySocketThingClassId, shellySocketThingChannelParamTypeId}, + {shellyGenericPMThingClassId, shellyGenericPMThingChannelParamTypeId}, + {shellyLightPMThingClassId, shellyLightPMThingChannelParamTypeId}, + {shellySocketPMThingClassId, shellySocketPMThingChannelParamTypeId}, + {shellyRollerThingClassId, shellyRollerThingChannelParamTypeId}, +}; + +static QHash connectedStateTypesMap = { + {shelly1ThingClassId, shelly1ConnectedStateTypeId}, + {shelly1pmThingClassId, shelly1pmConnectedStateTypeId}, + {shelly1lThingClassId, shelly1lConnectedStateTypeId}, + {shelly2ThingClassId, shelly2ConnectedStateTypeId}, + {shelly25ThingClassId, shelly25ConnectedStateTypeId}, + {shellyPlugThingClassId, shellyPlugConnectedStateTypeId}, + {shellyRgbw2ThingClassId, shellyRgbw2ConnectedStateTypeId}, + {shellyDimmerThingClassId, shellyDimmerConnectedStateTypeId}, + {shellyButton1ThingClassId, shellyButton1ConnectedStateTypeId}, + {shellyEm3ThingClassId, shellyEm3ConnectedStateTypeId}, + {shellyHTThingClassId, shellyHTConnectedStateTypeId}, + {shellySwitchThingClassId, shellySwitchConnectedStateTypeId}, + {shellyGenericThingClassId, shellyGenericConnectedStateTypeId}, + {shellyLightThingClassId, shellyLightConnectedStateTypeId}, + {shellySocketThingClassId, shellySocketConnectedStateTypeId}, + {shellyGenericPMThingClassId, shellyGenericPMConnectedStateTypeId}, + {shellyLightPMThingClassId, shellyLightPMConnectedStateTypeId}, + {shellySocketPMThingClassId, shellySocketPMConnectedStateTypeId}, + {shellyRollerThingClassId, shellyRollerConnectedStateTypeId}, + {shellyI3ThingClassId, shellyI3ConnectedStateTypeId}, + {shellyMotionThingClassId, shellyMotionConnectedStateTypeId} +}; + +static QHash signalStrengthStateTypesMap = { + {shelly1ThingClassId, shelly1SignalStrengthStateTypeId}, + {shelly1pmThingClassId, shelly1pmSignalStrengthStateTypeId}, + {shelly1lThingClassId, shelly1lSignalStrengthStateTypeId}, + {shelly2ThingClassId, shelly2SignalStrengthStateTypeId}, + {shelly25ThingClassId, shelly25SignalStrengthStateTypeId}, + {shellyPlugThingClassId, shellyPlugSignalStrengthStateTypeId}, + {shellyRgbw2ThingClassId, shellyRgbw2SignalStrengthStateTypeId}, + {shellyDimmerThingClassId, shellyDimmerSignalStrengthStateTypeId}, + {shellyButton1ThingClassId, shellyButton1SignalStrengthStateTypeId}, + {shellyEm3ThingClassId, shellyEm3SignalStrengthStateTypeId}, + {shellyHTThingClassId, shellyHTSignalStrengthStateTypeId}, + {shellySwitchThingClassId, shellySwitchSignalStrengthStateTypeId}, + {shellyGenericThingClassId, shellyGenericSignalStrengthStateTypeId}, + {shellyLightThingClassId, shellyLightSignalStrengthStateTypeId}, + {shellySocketThingClassId, shellySocketSignalStrengthStateTypeId}, + {shellyGenericPMThingClassId, shellyGenericPMSignalStrengthStateTypeId}, + {shellyLightPMThingClassId, shellyLightPMSignalStrengthStateTypeId}, + {shellySocketPMThingClassId, shellySocketPMSignalStrengthStateTypeId}, + {shellyRollerThingClassId, shellyRollerSignalStrengthStateTypeId}, + {shellyI3ThingClassId, shellyI3SignalStrengthStateTypeId}, + {shellyMotionThingClassId, shellyMotionSignalStrengthStateTypeId} +}; + +static QHash powerStateTypeMap = { + {shelly1ThingClassId, shelly1PowerStateTypeId}, + {shelly1pmThingClassId, shelly1pmPowerStateTypeId}, + {shelly1lThingClassId, shelly1lPowerStateTypeId}, + {shellyPlugThingClassId, shellyPlugPowerStateTypeId}, + {shellyRgbw2ThingClassId, shellyRgbw2PowerStateTypeId}, + {shellyDimmerThingClassId, shellyDimmerPowerStateTypeId}, + {shellyGenericThingClassId, shellyGenericPowerStateTypeId}, + {shellyLightThingClassId, shellyLightPowerStateTypeId}, + {shellySocketThingClassId, shellySocketPowerStateTypeId}, + {shellyGenericPMThingClassId, shellyGenericPMPowerStateTypeId}, + {shellyLightPMThingClassId, shellyLightPMPowerStateTypeId}, + {shellySocketPMThingClassId, shellySocketPMPowerStateTypeId}, + {shellyEm3ThingClassId, shellyEm3PowerStateTypeId}, +}; + +static QHash currentPowerStateTypeMap = { + {shelly1pmThingClassId, shelly1pmCurrentPowerStateTypeId}, + {shelly1lThingClassId, shelly1lCurrentPowerStateTypeId}, + {shellyPlugThingClassId, shellyPlugCurrentPowerStateTypeId}, + {shellyRgbw2ThingClassId, shellyRgbw2CurrentPowerStateTypeId}, + {shellyDimmerThingClassId, shellyDimmerCurrentPowerStateTypeId}, + {shellyGenericPMThingClassId, shellyGenericPMCurrentPowerStateTypeId}, + {shellyLightPMThingClassId, shellyLightPMCurrentPowerStateTypeId}, + {shellySocketPMThingClassId, shellySocketPMCurrentPowerStateTypeId}, + {shellyRollerThingClassId, shellyRollerCurrentPowerStateTypeId}, + {shellyEm3ThingClassId, shellyEm3CurrentPowerStateTypeId}, +}; + + +static QHash totalEnergyConsumedStateTypeMap = { + {shellyPlugThingClassId, shellyPlugTotalEnergyConsumedStateTypeId}, + {shellyGenericPMThingClassId, shellyGenericPMTotalEnergyConsumedStateTypeId}, + {shellyLightPMThingClassId, shellyLightPMTotalEnergyConsumedStateTypeId}, + {shellySocketPMThingClassId, shellySocketPMTotalEnergyConsumedStateTypeId}, + {shellyRollerThingClassId, shellyRollerTotalEnergyConsumedStateTypeId}, + {shellyEm3ThingClassId, shellyEm3TotalEnergyConsumedStateTypeId}, +}; + +static QHash colorStateTypeMap = { + {shellyRgbw2ThingClassId, shellyRgbw2ColorStateTypeId}, +}; + +static QHash colorTemperatureStateTypeMap = { + {shellyRgbw2ThingClassId, shellyRgbw2ColorTemperatureStateTypeId}, +}; + +static QHash brightnessStateTypeMap = { + {shellyRgbw2ThingClassId, shellyRgbw2BrightnessStateTypeId}, + {shellyDimmerThingClassId, shellyDimmerBrightnessStateTypeId}, +}; + +static QHash updateStatusStateTypesMap = { + {shelly1ThingClassId, shelly1UpdateStatusStateTypeId}, + {shelly1pmThingClassId, shelly1pmUpdateStatusStateTypeId}, + {shelly1lThingClassId, shelly1lUpdateStatusStateTypeId}, + {shelly2ThingClassId, shelly2UpdateStatusStateTypeId}, + {shelly25ThingClassId, shelly25UpdateStatusStateTypeId}, + {shellyPlugThingClassId, shellyPlugUpdateStatusStateTypeId}, + {shellyRgbw2ThingClassId, shellyRgbw2UpdateStatusStateTypeId}, + {shellyDimmerThingClassId, shellyDimmerUpdateStatusStateTypeId}, + {shellyButton1ThingClassId, shellyButton1UpdateStatusStateTypeId}, + {shellyEm3ThingClassId, shellyEm3UpdateStatusStateTypeId}, + {shellyHTThingClassId, shellyHTUpdateStatusStateTypeId}, + {shellyI3ThingClassId, shellyI3UpdateStatusStateTypeId}, + {shellyMotionThingClassId, shellyMotionUpdateStatusStateTypeId} +}; + +static QHash currentVersionStateTypesMap = { + {shelly1ThingClassId, shelly1CurrentVersionStateTypeId}, + {shelly1pmThingClassId, shelly1pmCurrentVersionStateTypeId}, + {shelly1lThingClassId, shelly1lCurrentVersionStateTypeId}, + {shelly2ThingClassId, shelly2CurrentVersionStateTypeId}, + {shelly25ThingClassId, shelly25CurrentVersionStateTypeId}, + {shellyPlugThingClassId, shellyPlugCurrentVersionStateTypeId}, + {shellyRgbw2ThingClassId, shellyRgbw2CurrentVersionStateTypeId}, + {shellyDimmerThingClassId, shellyDimmerCurrentVersionStateTypeId}, + {shellyButton1ThingClassId, shellyButton1CurrentVersionStateTypeId}, + {shellyEm3ThingClassId, shellyEm3CurrentVersionStateTypeId}, + {shellyHTThingClassId, shellyHTCurrentVersionStateTypeId}, + {shellyI3ThingClassId, shellyI3CurrentVersionStateTypeId}, + {shellyMotionThingClassId, shellyMotionCurrentVersionStateTypeId} +}; + +static QHash availableVersionStateTypesMap = { + {shelly1ThingClassId, shelly1AvailableVersionStateTypeId}, + {shelly1pmThingClassId, shelly1pmAvailableVersionStateTypeId}, + {shelly1lThingClassId, shelly1lAvailableVersionStateTypeId}, + {shelly2ThingClassId, shelly2AvailableVersionStateTypeId}, + {shelly25ThingClassId, shelly25AvailableVersionStateTypeId}, + {shellyPlugThingClassId, shellyPlugAvailableVersionStateTypeId}, + {shellyRgbw2ThingClassId, shellyRgbw2AvailableVersionStateTypeId}, + {shellyDimmerThingClassId, shellyDimmerAvailableVersionStateTypeId}, + {shellyButton1ThingClassId, shellyButton1AvailableVersionStateTypeId}, + {shellyEm3ThingClassId, shellyEm3AvailableVersionStateTypeId}, + {shellyHTThingClassId, shellyHTAvailableVersionStateTypeId}, + {shellyI3ThingClassId, shellyI3AvailableVersionStateTypeId}, + {shellyMotionThingClassId, shellyMotionAvailableVersionStateTypeId} +}; + +static QHash batteryLevelStateTypesMap = { + {shellyButton1ThingClassId, shellyButton1BatteryLevelStateTypeId}, + {shellyHTThingClassId, shellyHTBatteryLevelStateTypeId}, + {shellyMotionThingClassId, shellyMotionBatteryLevelStateTypeId} +}; + +static QHash batteryCriticalStateTypesMap = { + {shellyButton1ThingClassId, shellyButton1BatteryCriticalStateTypeId}, + {shellyHTThingClassId, shellyHTBatteryCriticalStateTypeId}, + {shellyMotionThingClassId, shellyMotionBatteryCriticalStateTypeId} +}; + +static QHash presenceStateTypesMap = { + {shellyMotionThingClassId, shellyMotionIsPresentStateTypeId} +}; + +static QHash lightIntensityStateTypesMap = { + {shellyMotionThingClassId, shellyMotionLightIntensityStateTypeId} +}; + +static QHash vibrationStateTypesMap = { + {shellyMotionThingClassId, shellyMotionVibrationStateTypeId} +}; + +// Actions and their params +static QHash rebootActionTypeMap = { + {shelly1RebootActionTypeId, shelly1ThingClassId}, + {shelly1pmRebootActionTypeId, shelly1pmThingClassId}, + {shelly1lRebootActionTypeId, shelly1lThingClassId}, + {shellyPlugRebootActionTypeId, shellyPlugThingClassId}, + {shellyRgbw2RebootActionTypeId, shellyRgbw2ThingClassId}, + {shellyDimmerRebootActionTypeId, shellyDimmerThingClassId}, + {shelly2RebootActionTypeId, shelly2ThingClassId}, + {shelly25RebootActionTypeId, shelly25ThingClassId}, + {shellyI3RebootActionTypeId, shellyI3ThingClassId}, +}; + +static QHash powerActionTypesMap = { + {shelly1PowerActionTypeId, shelly1ThingClassId}, + {shelly1pmPowerActionTypeId, shelly1pmThingClassId}, + {shelly1lPowerActionTypeId, shelly1lThingClassId}, + {shellyPlugPowerActionTypeId, shellyPlugThingClassId}, + {shellyGenericPowerActionTypeId, shellyGenericThingClassId}, + {shellyLightPowerActionTypeId, shellyLightThingClassId}, + {shellySocketPowerActionTypeId, shellySocketThingClassId}, + {shellyGenericPMPowerActionTypeId, shellyGenericPMThingClassId}, + {shellyLightPMPowerActionTypeId, shellyLightPMThingClassId}, + {shellySocketPMPowerActionTypeId, shellySocketPMThingClassId}, + {shellyEm3PowerActionTypeId, shellyEm3ThingClassId}, +}; + +static QHash powerActionParamTypesMap = { + {shelly1PowerActionTypeId, shelly1PowerActionPowerParamTypeId}, + {shelly1pmPowerActionTypeId, shelly1pmPowerActionPowerParamTypeId}, + {shelly1lPowerActionTypeId, shelly1lPowerActionPowerParamTypeId}, + {shellyPlugPowerActionTypeId, shellyPlugPowerActionPowerParamTypeId}, + {shellyGenericPowerActionTypeId, shellyGenericPowerActionPowerParamTypeId}, + {shellyLightPowerActionTypeId, shellyLightPowerActionPowerParamTypeId}, + {shellySocketPowerActionTypeId, shellySocketPowerActionPowerParamTypeId}, + {shellyGenericPMPowerActionTypeId, shellyGenericPMPowerActionPowerParamTypeId}, + {shellyLightPMPowerActionTypeId, shellyLightPMPowerActionPowerParamTypeId}, + {shellySocketPMPowerActionTypeId, shellySocketPMPowerActionPowerParamTypeId}, + {shellyEm3PowerActionTypeId, shellyEm3PowerActionPowerParamTypeId}, +}; + +static QHash colorPowerActionTypesMap = { + {shellyRgbw2PowerActionTypeId, shellyRgbw2ThingClassId}, +}; + +static QHash colorPowerActionParamTypesMap = { + {shellyRgbw2PowerActionPowerParamTypeId, shellyRgbw2PowerActionTypeId}, +}; + +static QHash colorActionTypesMap = { + {shellyRgbw2ColorActionTypeId, shellyRgbw2ThingClassId}, +}; + +static QHash colorActionParamTypesMap = { + {shellyRgbw2ColorActionTypeId, shellyRgbw2ColorActionTypeId}, +}; + +static QHash colorBrightnessActionTypesMap = { + {shellyRgbw2BrightnessActionTypeId, shellyRgbw2ThingClassId}, +}; + +static QHash colorBrightnessActionParamTypesMap = { + {shellyRgbw2BrightnessActionBrightnessParamTypeId, shellyRgbw2BrightnessActionTypeId}, +}; + +static QHash colorTemperatureActionTypesMap = { + {shellyRgbw2ColorTemperatureActionTypeId, shellyRgbw2ThingClassId}, +}; + +static QHash colorTemperatureActionParamTypesMap = { + {shellyRgbw2ColorTemperatureActionTypeId, shellyRgbw2ColorTemperatureActionColorTemperatureParamTypeId}, +}; + +static QHash dimmablePowerActionTypesMap = { + {shellyDimmerPowerActionTypeId, shellyDimmerThingClassId}, +}; + +static QHash dimmablePowerActionParamTypesMap = { + {shellyDimmerPowerActionTypeId, shellyDimmerPowerActionPowerParamTypeId}, +}; + +static QHash dimmableBrightnessActionTypesMap = { + {shellyDimmerBrightnessActionTypeId, shellyDimmerThingClassId}, +}; + +static QHash dimmableBrightnessActionParamTypesMap = { + {shellyDimmerBrightnessActionTypeId, shellyDimmerBrightnessActionBrightnessParamTypeId}, +}; + +static QHash rollerOpenActionTypeMap = { + {shellyRollerOpenActionTypeId, shellyRollerThingClassId}, +}; + +static QHash rollerCloseActionTypeMap = { + {shellyRollerCloseActionTypeId, shellyRollerThingClassId}, +}; + +static QHash rollerStopActionTypeMap = { + {shellyRollerStopActionTypeId, shellyRollerThingClassId}, +}; + +static QHash updateActionTypesMap = { + {shelly1PerformUpdateActionTypeId, shelly1ThingClassId}, + {shelly1pmPerformUpdateActionTypeId, shelly1pmThingClassId}, + {shelly1lPerformUpdateActionTypeId, shelly1lThingClassId}, + {shelly2PerformUpdateActionTypeId, shelly2ThingClassId}, + {shelly25PerformUpdateActionTypeId, shelly25ThingClassId}, + {shellyPlugPerformUpdateActionTypeId, shellyPlugThingClassId}, + {shellyRgbw2PerformUpdateActionTypeId, shellyRgbw2ThingClassId}, + {shellyDimmerPerformUpdateActionTypeId, shellyDimmerThingClassId}, + {shellyButton1PerformUpdateActionTypeId, shellyButton1ThingClassId}, + {shellyEm3PerformUpdateActionTypeId, shellyEm3ThingClassId}, + {shellyHTPerformUpdateActionTypeId, shellyHTThingClassId}, + {shellyI3PerformUpdateActionTypeId, shellyI3ThingClassId}, + {shellyMotionPerformUpdateActionTypeId, shellyMotionThingClassId} +}; + + IntegrationPluginShelly::IntegrationPluginShelly() { - // Device param types - m_idParamTypeMap[shelly1ThingClassId] = shelly1ThingIdParamTypeId; - m_idParamTypeMap[shelly1pmThingClassId] = shelly1pmThingIdParamTypeId; - m_idParamTypeMap[shelly1lThingClassId] = shelly1lThingIdParamTypeId; - m_idParamTypeMap[shellyPlugThingClassId] = shellyPlugThingIdParamTypeId; - m_idParamTypeMap[shellyRgbw2ThingClassId] = shellyRgbw2ThingIdParamTypeId; - m_idParamTypeMap[shellyDimmerThingClassId] = shellyDimmerThingIdParamTypeId; - m_idParamTypeMap[shelly2ThingClassId] = shelly2ThingIdParamTypeId; - m_idParamTypeMap[shelly25ThingClassId] = shelly25ThingIdParamTypeId; - m_idParamTypeMap[shellyButton1ThingClassId] = shellyButton1ThingIdParamTypeId; - m_idParamTypeMap[shellyEm3ThingClassId] = shellyEm3ThingIdParamTypeId; - m_idParamTypeMap[shellyHTThingClassId] = shellyHTThingIdParamTypeId; - m_idParamTypeMap[shellyI3ThingClassId] = shellyI3ThingIdParamTypeId; - - m_usernameParamTypeMap[shelly1ThingClassId] = shelly1ThingUsernameParamTypeId; - m_usernameParamTypeMap[shelly1pmThingClassId] = shelly1pmThingUsernameParamTypeId; - m_usernameParamTypeMap[shelly1lThingClassId] = shelly1lThingUsernameParamTypeId; - m_usernameParamTypeMap[shellyPlugThingClassId] = shellyPlugThingUsernameParamTypeId; - m_usernameParamTypeMap[shellyRgbw2ThingClassId] = shellyRgbw2ThingUsernameParamTypeId; - m_usernameParamTypeMap[shellyDimmerThingClassId] = shellyDimmerThingUsernameParamTypeId; - m_usernameParamTypeMap[shelly2ThingClassId] = shelly2ThingUsernameParamTypeId; - m_usernameParamTypeMap[shelly25ThingClassId] = shelly25ThingUsernameParamTypeId; - m_usernameParamTypeMap[shellyButton1ThingClassId] = shellyButton1ThingUsernameParamTypeId; - m_usernameParamTypeMap[shellyEm3ThingClassId] = shellyEm3ThingUsernameParamTypeId; - m_usernameParamTypeMap[shellyHTThingClassId] = shellyHTThingUsernameParamTypeId; - m_usernameParamTypeMap[shellyI3ThingClassId] = shellyI3ThingUsernameParamTypeId; - - m_passwordParamTypeMap[shelly1ThingClassId] = shelly1ThingPasswordParamTypeId; - m_passwordParamTypeMap[shelly1pmThingClassId] = shelly1pmThingPasswordParamTypeId; - m_passwordParamTypeMap[shelly1lThingClassId] = shelly1lThingPasswordParamTypeId; - m_passwordParamTypeMap[shellyPlugThingClassId] = shellyPlugThingPasswordParamTypeId; - m_passwordParamTypeMap[shellyRgbw2ThingClassId] = shellyRgbw2ThingPasswordParamTypeId; - m_passwordParamTypeMap[shellyDimmerThingClassId] = shellyDimmerThingPasswordParamTypeId; - m_passwordParamTypeMap[shelly2ThingClassId] = shelly2ThingPasswordParamTypeId; - m_passwordParamTypeMap[shelly25ThingClassId] = shelly25ThingPasswordParamTypeId; - m_passwordParamTypeMap[shellyButton1ThingClassId] = shellyButton1ThingPasswordParamTypeId; - m_passwordParamTypeMap[shellyEm3ThingClassId] = shellyEm3ThingPasswordParamTypeId; - m_passwordParamTypeMap[shellyHTThingClassId] = shellyHTThingPasswordParamTypeId; - m_passwordParamTypeMap[shellyI3ThingClassId] = shellyI3ThingPasswordParamTypeId; - - m_connectedDeviceParamTypeMap[shelly2ThingClassId] = shelly2ThingConnectedDevice1ParamTypeId; - m_connectedDeviceParamTypeMap[shelly25ThingClassId] = shelly25ThingConnectedDevice1ParamTypeId; - - m_connectedDevice2ParamTypeMap[shelly2ThingClassId] = shelly2ThingConnectedDevice2ParamTypeId; - m_connectedDevice2ParamTypeMap[shelly25ThingClassId] = shelly25ThingConnectedDevice2ParamTypeId; - - m_channelParamTypeMap[shellyGenericThingClassId] = shellyGenericThingChannelParamTypeId; - m_channelParamTypeMap[shellyLightThingClassId] = shellyLightThingChannelParamTypeId; - m_channelParamTypeMap[shellySocketThingClassId] = shellySocketThingChannelParamTypeId; - m_channelParamTypeMap[shellyGenericPMThingClassId] = shellyGenericPMThingChannelParamTypeId; - m_channelParamTypeMap[shellyLightPMThingClassId] = shellyLightPMThingChannelParamTypeId; - m_channelParamTypeMap[shellySocketPMThingClassId] = shellySocketPMThingChannelParamTypeId; - m_channelParamTypeMap[shellyRollerThingClassId] = shellyRollerThingChannelParamTypeId; - - // States - m_connectedStateTypesMap[shelly1ThingClassId] = shelly1ConnectedStateTypeId; - m_connectedStateTypesMap[shelly1pmThingClassId] = shelly1pmConnectedStateTypeId; - m_connectedStateTypesMap[shelly1lThingClassId] = shelly1lConnectedStateTypeId; - m_connectedStateTypesMap[shelly2ThingClassId] = shelly2ConnectedStateTypeId; - m_connectedStateTypesMap[shelly25ThingClassId] = shelly25ConnectedStateTypeId; - m_connectedStateTypesMap[shellyPlugThingClassId] = shellyPlugConnectedStateTypeId; - m_connectedStateTypesMap[shellyRgbw2ThingClassId] = shellyRgbw2ConnectedStateTypeId; - m_connectedStateTypesMap[shellyDimmerThingClassId] = shellyDimmerConnectedStateTypeId; - m_connectedStateTypesMap[shellyButton1ThingClassId] = shellyButton1ConnectedStateTypeId; - m_connectedStateTypesMap[shellyEm3ThingClassId] = shellyEm3ConnectedStateTypeId; - m_connectedStateTypesMap[shellyHTThingClassId] = shellyHTConnectedStateTypeId; - m_connectedStateTypesMap[shellySwitchThingClassId] = shellySwitchConnectedStateTypeId; - m_connectedStateTypesMap[shellyGenericThingClassId] = shellyGenericConnectedStateTypeId; - m_connectedStateTypesMap[shellyLightThingClassId] = shellyLightConnectedStateTypeId; - m_connectedStateTypesMap[shellySocketThingClassId] = shellySocketConnectedStateTypeId; - m_connectedStateTypesMap[shellyGenericPMThingClassId] = shellyGenericPMConnectedStateTypeId; - m_connectedStateTypesMap[shellyLightPMThingClassId] = shellyLightPMConnectedStateTypeId; - m_connectedStateTypesMap[shellySocketPMThingClassId] = shellySocketPMConnectedStateTypeId; - m_connectedStateTypesMap[shellyRollerThingClassId] = shellyRollerConnectedStateTypeId; - m_connectedStateTypesMap[shellyI3ThingClassId] = shellyI3ConnectedStateTypeId; - - m_signalStrengthStateTypesMap[shelly1ThingClassId] = shelly1SignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shelly1pmThingClassId] = shelly1pmSignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shelly1lThingClassId] = shelly1lSignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shelly2ThingClassId] = shelly2SignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shelly25ThingClassId] = shelly25SignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellyPlugThingClassId] = shellyPlugSignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellyRgbw2ThingClassId] = shellyRgbw2SignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellyDimmerThingClassId] = shellyDimmerSignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellyButton1ThingClassId] = shellyButton1SignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellyEm3ThingClassId] = shellyEm3SignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellyHTThingClassId] = shellyHTSignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellySwitchThingClassId] = shellySwitchSignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellyGenericThingClassId] = shellyGenericSignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellyLightThingClassId] = shellyLightSignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellySocketThingClassId] = shellySocketSignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellyGenericPMThingClassId] = shellyGenericPMSignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellyLightPMThingClassId] = shellyLightPMSignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellySocketPMThingClassId] = shellySocketPMSignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellyRollerThingClassId] = shellyRollerSignalStrengthStateTypeId; - m_signalStrengthStateTypesMap[shellyI3ThingClassId] = shellyI3SignalStrengthStateTypeId; - - m_powerStateTypeMap[shelly1ThingClassId] = shelly1PowerStateTypeId; - m_powerStateTypeMap[shelly1pmThingClassId] = shelly1pmPowerStateTypeId; - m_powerStateTypeMap[shelly1lThingClassId] = shelly1lPowerStateTypeId; - m_powerStateTypeMap[shellyPlugThingClassId] = shellyPlugPowerStateTypeId; - m_powerStateTypeMap[shellyRgbw2ThingClassId] = shellyRgbw2PowerStateTypeId; - m_powerStateTypeMap[shellyDimmerThingClassId] = shellyDimmerPowerStateTypeId; - m_powerStateTypeMap[shellyGenericThingClassId] = shellyGenericPowerStateTypeId; - m_powerStateTypeMap[shellyLightThingClassId] = shellyLightPowerStateTypeId; - m_powerStateTypeMap[shellySocketThingClassId] = shellySocketPowerStateTypeId; - m_powerStateTypeMap[shellyGenericPMThingClassId] = shellyGenericPMPowerStateTypeId; - m_powerStateTypeMap[shellyLightPMThingClassId] = shellyLightPMPowerStateTypeId; - m_powerStateTypeMap[shellySocketPMThingClassId] = shellySocketPMPowerStateTypeId; - m_powerStateTypeMap[shellyEm3ThingClassId] = shellyEm3PowerStateTypeId; - - m_currentPowerStateTypeMap[shelly1pmThingClassId] = shelly1pmCurrentPowerStateTypeId; - m_currentPowerStateTypeMap[shelly1lThingClassId] = shelly1lCurrentPowerStateTypeId; - m_currentPowerStateTypeMap[shellyPlugThingClassId] = shellyPlugCurrentPowerStateTypeId; - m_currentPowerStateTypeMap[shellyRgbw2ThingClassId] = shellyRgbw2CurrentPowerStateTypeId; - m_currentPowerStateTypeMap[shellyDimmerThingClassId] = shellyDimmerCurrentPowerStateTypeId; - m_currentPowerStateTypeMap[shellyGenericPMThingClassId] = shellyGenericPMCurrentPowerStateTypeId; - m_currentPowerStateTypeMap[shellyLightPMThingClassId] = shellyLightPMCurrentPowerStateTypeId; - m_currentPowerStateTypeMap[shellySocketPMThingClassId] = shellySocketPMCurrentPowerStateTypeId; - m_currentPowerStateTypeMap[shellyRollerThingClassId] = shellyRollerCurrentPowerStateTypeId; - m_currentPowerStateTypeMap[shellyEm3ThingClassId] = shellyEm3CurrentPowerStateTypeId; - - m_totalEnergyConsumedStateTypeMap[shellyPlugThingClassId] = shellyPlugTotalEnergyConsumedStateTypeId; - m_totalEnergyConsumedStateTypeMap[shellyGenericPMThingClassId] = shellyGenericPMTotalEnergyConsumedStateTypeId; - m_totalEnergyConsumedStateTypeMap[shellyLightPMThingClassId] = shellyLightPMTotalEnergyConsumedStateTypeId; - m_totalEnergyConsumedStateTypeMap[shellySocketPMThingClassId] = shellySocketPMTotalEnergyConsumedStateTypeId; - m_totalEnergyConsumedStateTypeMap[shellyRollerThingClassId] = shellyRollerTotalEnergyConsumedStateTypeId; - m_totalEnergyConsumedStateTypeMap[shellyEm3ThingClassId] = shellyEm3TotalEnergyConsumedStateTypeId; - - m_colorStateTypeMap[shellyRgbw2ThingClassId] = shellyRgbw2ColorStateTypeId; - m_colorTemperatureStateTypeMap[shellyRgbw2ThingClassId] = shellyRgbw2ColorTemperatureStateTypeId; - - m_brightnessStateTypeMap[shellyRgbw2ThingClassId] = shellyRgbw2BrightnessStateTypeId; - m_brightnessStateTypeMap[shellyDimmerThingClassId] = shellyDimmerBrightnessStateTypeId; - - m_updateStatusStateTypesMap[shelly1ThingClassId] = shelly1UpdateStatusStateTypeId; - m_updateStatusStateTypesMap[shelly1pmThingClassId] = shelly1pmUpdateStatusStateTypeId; - m_updateStatusStateTypesMap[shelly1lThingClassId] = shelly1lUpdateStatusStateTypeId; - m_updateStatusStateTypesMap[shelly2ThingClassId] = shelly2UpdateStatusStateTypeId; - m_updateStatusStateTypesMap[shelly25ThingClassId] = shelly25UpdateStatusStateTypeId; - m_updateStatusStateTypesMap[shellyPlugThingClassId] = shellyPlugUpdateStatusStateTypeId; - m_updateStatusStateTypesMap[shellyRgbw2ThingClassId] = shellyRgbw2UpdateStatusStateTypeId; - m_updateStatusStateTypesMap[shellyDimmerThingClassId] = shellyDimmerUpdateStatusStateTypeId; - m_updateStatusStateTypesMap[shellyButton1ThingClassId] = shellyButton1UpdateStatusStateTypeId; - m_updateStatusStateTypesMap[shellyEm3ThingClassId] = shellyEm3UpdateStatusStateTypeId; - m_updateStatusStateTypesMap[shellyHTThingClassId] = shellyHTUpdateStatusStateTypeId; - m_updateStatusStateTypesMap[shellyI3ThingClassId] = shellyI3UpdateStatusStateTypeId; - - m_currentVersionStateTypesMap[shelly1ThingClassId] = shelly1CurrentVersionStateTypeId; - m_currentVersionStateTypesMap[shelly1pmThingClassId] = shelly1pmCurrentVersionStateTypeId; - m_currentVersionStateTypesMap[shelly1lThingClassId] = shelly1lCurrentVersionStateTypeId; - m_currentVersionStateTypesMap[shelly2ThingClassId] = shelly2CurrentVersionStateTypeId; - m_currentVersionStateTypesMap[shelly25ThingClassId] = shelly25CurrentVersionStateTypeId; - m_currentVersionStateTypesMap[shellyPlugThingClassId] = shellyPlugCurrentVersionStateTypeId; - m_currentVersionStateTypesMap[shellyRgbw2ThingClassId] = shellyRgbw2CurrentVersionStateTypeId; - m_currentVersionStateTypesMap[shellyDimmerThingClassId] = shellyDimmerCurrentVersionStateTypeId; - m_currentVersionStateTypesMap[shellyButton1ThingClassId] = shellyButton1CurrentVersionStateTypeId; - m_currentVersionStateTypesMap[shellyEm3ThingClassId] = shellyEm3CurrentVersionStateTypeId; - m_currentVersionStateTypesMap[shellyHTThingClassId] = shellyHTCurrentVersionStateTypeId; - m_currentVersionStateTypesMap[shellyI3ThingClassId] = shellyI3CurrentVersionStateTypeId; - - m_availableVersionStateTypesMap[shelly1ThingClassId] = shelly1AvailableVersionStateTypeId; - m_availableVersionStateTypesMap[shelly1pmThingClassId] = shelly1pmAvailableVersionStateTypeId; - m_availableVersionStateTypesMap[shelly1lThingClassId] = shelly1lAvailableVersionStateTypeId; - m_availableVersionStateTypesMap[shelly2ThingClassId] = shelly2AvailableVersionStateTypeId; - m_availableVersionStateTypesMap[shelly25ThingClassId] = shelly25AvailableVersionStateTypeId; - m_availableVersionStateTypesMap[shellyPlugThingClassId] = shellyPlugAvailableVersionStateTypeId; - m_availableVersionStateTypesMap[shellyRgbw2ThingClassId] = shellyRgbw2AvailableVersionStateTypeId; - m_availableVersionStateTypesMap[shellyDimmerThingClassId] = shellyDimmerAvailableVersionStateTypeId; - m_availableVersionStateTypesMap[shellyButton1ThingClassId] = shellyButton1AvailableVersionStateTypeId; - m_availableVersionStateTypesMap[shellyEm3ThingClassId] = shellyEm3AvailableVersionStateTypeId; - m_availableVersionStateTypesMap[shellyHTThingClassId] = shellyHTAvailableVersionStateTypeId; - m_availableVersionStateTypesMap[shellyI3ThingClassId] = shellyI3AvailableVersionStateTypeId; - - m_batteryLevelStateTypeMap[shellyButton1ThingClassId] = shellyButton1BatteryLevelStateTypeId; - m_batteryLevelStateTypeMap[shellyHTThingClassId] = shellyHTBatteryLevelStateTypeId; - - m_batteryCriticalStateTypeMap[shellyButton1ThingClassId] = shellyButton1BatteryCriticalStateTypeId; - m_batteryCriticalStateTypeMap[shellyHTThingClassId] = shellyHTBatteryCriticalStateTypeId; - - // Actions and their params - m_rebootActionTypeMap[shelly1RebootActionTypeId] = shelly1ThingClassId; - m_rebootActionTypeMap[shelly1pmRebootActionTypeId] = shelly1pmThingClassId; - m_rebootActionTypeMap[shelly1lRebootActionTypeId] = shelly1lThingClassId; - m_rebootActionTypeMap[shellyPlugRebootActionTypeId] = shellyPlugThingClassId; - m_rebootActionTypeMap[shellyRgbw2RebootActionTypeId] = shellyRgbw2ThingClassId; - m_rebootActionTypeMap[shellyDimmerRebootActionTypeId] = shellyDimmerThingClassId; - m_rebootActionTypeMap[shelly2RebootActionTypeId] = shelly2ThingClassId; - m_rebootActionTypeMap[shelly25RebootActionTypeId] = shelly25ThingClassId; - m_rebootActionTypeMap[shellyI3RebootActionTypeId] = shellyI3ThingClassId; - - m_powerActionTypesMap[shelly1PowerActionTypeId] = shelly1ThingClassId; - m_powerActionTypesMap[shelly1pmPowerActionTypeId] = shelly1pmThingClassId; - m_powerActionTypesMap[shelly1lPowerActionTypeId] = shelly1lThingClassId; - m_powerActionTypesMap[shellyPlugPowerActionTypeId] = shellyPlugThingClassId; - m_powerActionTypesMap[shellyGenericPowerActionTypeId] = shellyGenericThingClassId; - m_powerActionTypesMap[shellyLightPowerActionTypeId] = shellyLightThingClassId; - m_powerActionTypesMap[shellySocketPowerActionTypeId] = shellySocketThingClassId; - m_powerActionTypesMap[shellyGenericPMPowerActionTypeId] = shellyGenericPMThingClassId; - m_powerActionTypesMap[shellyLightPMPowerActionTypeId] = shellyLightPMThingClassId; - m_powerActionTypesMap[shellySocketPMPowerActionTypeId] = shellySocketPMThingClassId; - m_powerActionTypesMap[shellyEm3PowerActionTypeId] = shellyEm3ThingClassId; - - m_powerActionParamTypesMap[shelly1PowerActionTypeId] = shelly1PowerActionPowerParamTypeId; - m_powerActionParamTypesMap[shelly1pmPowerActionTypeId] = shelly1pmPowerActionPowerParamTypeId; - m_powerActionParamTypesMap[shelly1lPowerActionTypeId] = shelly1lPowerActionPowerParamTypeId; - m_powerActionParamTypesMap[shellyPlugPowerActionTypeId] = shellyPlugPowerActionPowerParamTypeId; - m_powerActionParamTypesMap[shellyGenericPowerActionTypeId] = shellyGenericPowerActionPowerParamTypeId; - m_powerActionParamTypesMap[shellyLightPowerActionTypeId] = shellyLightPowerActionPowerParamTypeId; - m_powerActionParamTypesMap[shellySocketPowerActionTypeId] = shellySocketPowerActionPowerParamTypeId; - m_powerActionParamTypesMap[shellyGenericPMPowerActionTypeId] = shellyGenericPMPowerActionPowerParamTypeId; - m_powerActionParamTypesMap[shellyLightPMPowerActionTypeId] = shellyLightPMPowerActionPowerParamTypeId; - m_powerActionParamTypesMap[shellySocketPMPowerActionTypeId] = shellySocketPMPowerActionPowerParamTypeId; - m_powerActionParamTypesMap[shellyEm3PowerActionTypeId] = shellyEm3PowerActionPowerParamTypeId; - - m_colorPowerActionTypesMap[shellyRgbw2PowerActionTypeId] = shellyRgbw2ThingClassId; - m_colorPowerActionParamTypesMap[shellyRgbw2PowerActionPowerParamTypeId] = shellyRgbw2PowerActionTypeId; - - m_colorActionTypesMap[shellyRgbw2ColorActionTypeId] = shellyRgbw2ThingClassId; - m_colorActionParamTypesMap[shellyRgbw2ColorActionTypeId] = shellyRgbw2ColorActionTypeId; - - m_colorBrightnessActionTypesMap[shellyRgbw2BrightnessActionTypeId] = shellyRgbw2ThingClassId; - m_colorBrightnessActionParamTypesMap[shellyRgbw2BrightnessActionBrightnessParamTypeId] = shellyRgbw2BrightnessActionTypeId; - - m_colorTemperatureActionTypesMap[shellyRgbw2ColorTemperatureActionTypeId] = shellyRgbw2ThingClassId; - m_colorTemperatureActionParamTypesMap[shellyRgbw2ColorTemperatureActionTypeId] = shellyRgbw2ColorTemperatureActionColorTemperatureParamTypeId; - - m_dimmablePowerActionTypesMap[shellyDimmerPowerActionTypeId] = shellyDimmerThingClassId; - m_dimmablePowerActionParamTypesMap[shellyDimmerPowerActionTypeId] = shellyDimmerPowerActionPowerParamTypeId; - - m_dimmableBrightnessActionTypesMap[shellyDimmerBrightnessActionTypeId] = shellyDimmerThingClassId; - m_dimmableBrightnessActionParamTypesMap[shellyDimmerBrightnessActionTypeId] = shellyDimmerBrightnessActionBrightnessParamTypeId; - - m_rollerOpenActionTypeMap[shellyRollerOpenActionTypeId] = shellyRollerThingClassId; - m_rollerCloseActionTypeMap[shellyRollerCloseActionTypeId] = shellyRollerThingClassId; - m_rollerStopActionTypeMap[shellyRollerStopActionTypeId] = shellyRollerThingClassId; - - m_updateActionTypesMap[shelly1PerformUpdateActionTypeId] = shelly1ThingClassId; - m_updateActionTypesMap[shelly1pmPerformUpdateActionTypeId] = shelly1pmThingClassId; - m_updateActionTypesMap[shelly1lPerformUpdateActionTypeId] = shelly1lThingClassId; - m_updateActionTypesMap[shelly2PerformUpdateActionTypeId] = shelly2ThingClassId; - m_updateActionTypesMap[shelly25PerformUpdateActionTypeId] = shelly25ThingClassId; - m_updateActionTypesMap[shellyPlugPerformUpdateActionTypeId] = shellyPlugThingClassId; - m_updateActionTypesMap[shellyRgbw2PerformUpdateActionTypeId] = shellyRgbw2ThingClassId; - m_updateActionTypesMap[shellyDimmerPerformUpdateActionTypeId] = shellyDimmerThingClassId; - m_updateActionTypesMap[shellyButton1PerformUpdateActionTypeId] = shellyButton1ThingClassId; - m_updateActionTypesMap[shellyEm3PerformUpdateActionTypeId] = shellyEm3ThingClassId; - m_updateActionTypesMap[shellyHTPerformUpdateActionTypeId] = shellyHTThingClassId; - m_updateActionTypesMap[shellyI3PerformUpdateActionTypeId] = shellyI3ThingClassId; } IntegrationPluginShelly::~IntegrationPluginShelly() @@ -320,7 +429,7 @@ void IntegrationPluginShelly::init() void IntegrationPluginShelly::discoverThings(ThingDiscoveryInfo *info) { foreach (const ZeroConfServiceEntry &entry, m_zeroconfBrowser->serviceEntries()) { -// qCDebug(dcShelly()) << "Have entry" << entry; + // qCDebug(dcShelly()) << "Have entry" << entry; QRegExp namePattern; if (info->thingClassId() == shelly1ThingClassId) { namePattern = QRegExp("^shelly1-[0-9A-Z]+$"); @@ -346,6 +455,8 @@ void IntegrationPluginShelly::discoverThings(ThingDiscoveryInfo *info) namePattern = QRegExp("shellyht-[0-9A-Z]+$"); } else if (info->thingClassId() == shellyI3ThingClassId) { namePattern = QRegExp("shellyix3-[0-9A-Z]+$"); + } else if (info->thingClassId() == shellyMotionThingClassId) { + namePattern = QRegExp("shellymotionsensor-[0-9A-Z]+$"); } if (!entry.name().contains(namePattern)) { continue; @@ -355,18 +466,18 @@ void IntegrationPluginShelly::discoverThings(ThingDiscoveryInfo *info) ThingDescriptor descriptor(info->thingClassId(), entry.name(), entry.hostAddress().toString()); ParamList params; - params << Param(m_idParamTypeMap.value(info->thingClassId()), entry.name()); - params << Param(m_usernameParamTypeMap.value(info->thingClassId()), ""); - params << Param(m_passwordParamTypeMap.value(info->thingClassId()), ""); - if (m_connectedDeviceParamTypeMap.contains(info->thingClassId())) { - params << Param(m_connectedDeviceParamTypeMap.value(info->thingClassId()), "None"); + params << Param(idParamTypeMap.value(info->thingClassId()), entry.name()); + params << Param(usernameParamTypeMap.value(info->thingClassId()), ""); + params << Param(passwordParamTypeMap.value(info->thingClassId()), ""); + if (connectedDeviceParamTypeMap.contains(info->thingClassId())) { + params << Param(connectedDeviceParamTypeMap.value(info->thingClassId()), "None"); } - if (m_connectedDevice2ParamTypeMap.contains(info->thingClassId())) { - params << Param(m_connectedDevice2ParamTypeMap.value(info->thingClassId()), "None"); + if (connectedDevice2ParamTypeMap.contains(info->thingClassId())) { + params << Param(connectedDevice2ParamTypeMap.value(info->thingClassId()), "None"); } descriptor.setParams(params); - Things existingThings = myThings().filterByParam(m_idParamTypeMap.value(info->thingClassId()), entry.name()); + Things existingThings = myThings().filterByParam(idParamTypeMap.value(info->thingClassId()), entry.name()); if (existingThings.count() == 1) { qCDebug(dcShelly()) << "This shelly already exists in the system!"; descriptor.setThingId(existingThings.first()->id()); @@ -382,7 +493,7 @@ void IntegrationPluginShelly::setupThing(ThingSetupInfo *info) { Thing *thing = info->thing(); - if (m_idParamTypeMap.contains(thing->thingClassId())) { + if (idParamTypeMap.contains(thing->thingClassId())) { setupShellyGateway(info); return; } @@ -408,13 +519,13 @@ void IntegrationPluginShelly::executeAction(ThingActionInfo *info) Thing *thing = info->thing(); Action action = info->action(); - if (m_rebootActionTypeMap.contains(action.actionTypeId())) { + if (rebootActionTypeMap.contains(action.actionTypeId())) { QUrl url; url.setScheme("http"); url.setHost(getIP(info->thing())); url.setPath("/reboot"); - url.setUserName(thing->paramValue(m_usernameParamTypeMap.value(thing->thingClassId())).toString()); - url.setPassword(thing->paramValue(m_passwordParamTypeMap.value(thing->thingClassId())).toString()); + url.setUserName(thing->paramValue(usernameParamTypeMap.value(thing->thingClassId())).toString()); + url.setPassword(thing->paramValue(passwordParamTypeMap.value(thing->thingClassId())).toString()); QNetworkReply *reply = hardwareManager()->networkManager()->get(QNetworkRequest(url)); connect(reply, &QNetworkReply::finished, &QNetworkReply::deleteLater); connect(reply, &QNetworkReply::finished, info, [info, reply](){ @@ -423,44 +534,44 @@ void IntegrationPluginShelly::executeAction(ThingActionInfo *info) return; } - if (m_updateActionTypesMap.contains(action.actionTypeId())) { + if (updateActionTypesMap.contains(action.actionTypeId())) { MqttChannel *channel = m_mqttChannels.value(thing); - QString shellyId = thing->paramValue(m_idParamTypeMap.value(thing->thingClassId())).toString(); + QString shellyId = thing->paramValue(idParamTypeMap.value(thing->thingClassId())).toString(); channel->publish(QString("shellies/%1/command").arg(shellyId), "update_fw"); info->finish(Thing::ThingErrorNoError); return; } - if (m_powerActionTypesMap.contains(action.actionTypeId())) { + if (powerActionTypesMap.contains(action.actionTypeId())) { // If the main shelly has a power action (e.g. Shelly Plug, there is no parentId) Thing *parentDevice = thing->parentId().isNull() ? thing : myThings().findById(thing->parentId()); MqttChannel *channel = m_mqttChannels.value(parentDevice); - QString shellyId = parentDevice->paramValue(m_idParamTypeMap.value(parentDevice->thingClassId())).toString(); + QString shellyId = parentDevice->paramValue(idParamTypeMap.value(parentDevice->thingClassId())).toString(); int relay = 1; - if (m_channelParamTypeMap.contains(thing->thingClassId())) { - relay = thing->paramValue(m_channelParamTypeMap.value(thing->thingClassId())).toInt(); + if (channelParamTypeMap.contains(thing->thingClassId())) { + relay = thing->paramValue(channelParamTypeMap.value(thing->thingClassId())).toInt(); } - ParamTypeId powerParamTypeId = m_powerActionParamTypesMap.value(action.actionTypeId()); + ParamTypeId powerParamTypeId = powerActionParamTypesMap.value(action.actionTypeId()); bool on = action.param(powerParamTypeId).value().toBool(); channel->publish(QString("shellies/%1/relay/%2/command").arg(shellyId).arg(relay - 1), on ? "on" : "off"); info->finish(Thing::ThingErrorNoError); return; } - if (m_colorPowerActionTypesMap.contains(action.actionTypeId())) { + if (colorPowerActionTypesMap.contains(action.actionTypeId())) { MqttChannel *channel = m_mqttChannels.value(thing); - QString shellyId = info->thing()->paramValue(m_idParamTypeMap.value(info->thing()->thingClassId())).toString(); - ParamTypeId colorPowerParamTypeId = m_colorPowerActionParamTypesMap.value(action.actionTypeId()); + QString shellyId = info->thing()->paramValue(idParamTypeMap.value(info->thing()->thingClassId())).toString(); + ParamTypeId colorPowerParamTypeId = colorPowerActionParamTypesMap.value(action.actionTypeId()); bool on = action.param(colorPowerParamTypeId).value().toBool(); channel->publish("shellies/" + shellyId + "/color/0/command", on ? "on" : "off"); info->finish(Thing::ThingErrorNoError); return; } - if (m_colorActionTypesMap.contains(action.actionTypeId())) { + if (colorActionTypesMap.contains(action.actionTypeId())) { MqttChannel *channel = m_mqttChannels.value(thing); - QString shellyId = info->thing()->paramValue(m_idParamTypeMap.value(info->thing()->thingClassId())).toString(); - ParamTypeId colorParamTypeId = m_colorActionParamTypesMap.value(action.actionTypeId()); + QString shellyId = info->thing()->paramValue(idParamTypeMap.value(info->thing()->thingClassId())).toString(); + ParamTypeId colorParamTypeId = colorActionParamTypesMap.value(action.actionTypeId()); QColor color = action.param(colorParamTypeId).value().value(); QVariantMap data; data.insert("turn", "on"); // Should we really? @@ -474,10 +585,10 @@ void IntegrationPluginShelly::executeAction(ThingActionInfo *info) return; } - if (m_colorTemperatureStateTypeMap.contains(action.actionTypeId())) { + if (colorTemperatureStateTypeMap.contains(action.actionTypeId())) { MqttChannel *channel = m_mqttChannels.value(thing); - QString shellyId = info->thing()->paramValue(m_idParamTypeMap.value(info->thing()->thingClassId())).toString(); - ParamTypeId colorTemperatureParamTypeId = m_colorTemperatureActionParamTypesMap.value(action.actionTypeId()); + QString shellyId = info->thing()->paramValue(idParamTypeMap.value(info->thing()->thingClassId())).toString(); + ParamTypeId colorTemperatureParamTypeId = colorTemperatureActionParamTypesMap.value(action.actionTypeId()); int ct = action.param(colorTemperatureParamTypeId).value().toInt(); QVariantMap data; data.insert("turn", "on"); // Should we really? @@ -491,10 +602,10 @@ void IntegrationPluginShelly::executeAction(ThingActionInfo *info) return; } - if (m_colorBrightnessActionTypesMap.contains(action.actionTypeId())) { + if (colorBrightnessActionTypesMap.contains(action.actionTypeId())) { MqttChannel *channel = m_mqttChannels.value(thing); - QString shellyId = info->thing()->paramValue(m_idParamTypeMap.value(info->thing()->thingClassId())).toString(); - ParamTypeId brightnessParamTypeId = m_colorBrightnessActionParamTypesMap.value(action.actionTypeId()); + QString shellyId = info->thing()->paramValue(idParamTypeMap.value(info->thing()->thingClassId())).toString(); + ParamTypeId brightnessParamTypeId = colorBrightnessActionParamTypesMap.value(action.actionTypeId()); int brightness = action.param(brightnessParamTypeId).value().toInt(); QVariantMap data; data.insert("turn", "on"); // Should we really? @@ -505,20 +616,20 @@ void IntegrationPluginShelly::executeAction(ThingActionInfo *info) return; } - if (m_dimmablePowerActionTypesMap.contains(action.actionTypeId())) { + if (dimmablePowerActionTypesMap.contains(action.actionTypeId())) { MqttChannel *channel = m_mqttChannels.value(thing); - QString shellyId = info->thing()->paramValue(m_idParamTypeMap.value(info->thing()->thingClassId())).toString(); - ParamTypeId powerParamTypeId = m_dimmablePowerActionParamTypesMap.value(action.actionTypeId()); + QString shellyId = info->thing()->paramValue(idParamTypeMap.value(info->thing()->thingClassId())).toString(); + ParamTypeId powerParamTypeId = dimmablePowerActionParamTypesMap.value(action.actionTypeId()); bool on = action.param(powerParamTypeId).value().toBool(); channel->publish("shellies/" + shellyId + "/light/0/command", on ? "on" : "off"); info->finish(Thing::ThingErrorNoError); return; } - if (m_dimmableBrightnessActionTypesMap.contains(action.actionTypeId())) { + if (dimmableBrightnessActionTypesMap.contains(action.actionTypeId())) { MqttChannel *channel = m_mqttChannels.value(thing); - QString shellyId = info->thing()->paramValue(m_idParamTypeMap.value(info->thing()->thingClassId())).toString(); - ParamTypeId brightnessParamTypeId = m_dimmableBrightnessActionParamTypesMap.value(action.actionTypeId()); + QString shellyId = info->thing()->paramValue(idParamTypeMap.value(info->thing()->thingClassId())).toString(); + ParamTypeId brightnessParamTypeId = dimmableBrightnessActionParamTypesMap.value(action.actionTypeId()); int brightness = action.param(brightnessParamTypeId).value().toInt(); QVariantMap data; data.insert("turn", "on"); // Should we really? @@ -529,28 +640,28 @@ void IntegrationPluginShelly::executeAction(ThingActionInfo *info) return; } - if (m_rollerOpenActionTypeMap.contains(action.actionTypeId())) { + if (rollerOpenActionTypeMap.contains(action.actionTypeId())) { Thing *parentDevice = myThings().findById(thing->parentId()); MqttChannel *channel = m_mqttChannels.value(parentDevice); - QString shellyId = parentDevice->paramValue(m_idParamTypeMap.value(parentDevice->thingClassId())).toString(); + QString shellyId = parentDevice->paramValue(idParamTypeMap.value(parentDevice->thingClassId())).toString(); channel->publish("shellies/" + shellyId + "/roller/0/command", "open"); info->finish(Thing::ThingErrorNoError); return; } - if (m_rollerCloseActionTypeMap.contains(action.actionTypeId())) { + if (rollerCloseActionTypeMap.contains(action.actionTypeId())) { Thing *parentDevice = myThings().findById(thing->parentId()); MqttChannel *channel = m_mqttChannels.value(parentDevice); - QString shellyId = parentDevice->paramValue(m_idParamTypeMap.value(parentDevice->thingClassId())).toString(); + QString shellyId = parentDevice->paramValue(idParamTypeMap.value(parentDevice->thingClassId())).toString(); channel->publish("shellies/" + shellyId + "/roller/0/command", "close"); info->finish(Thing::ThingErrorNoError); return; } - if (m_rollerStopActionTypeMap.contains(action.actionTypeId())) { + if (rollerStopActionTypeMap.contains(action.actionTypeId())) { Thing *parentDevice = myThings().findById(thing->parentId()); MqttChannel *channel = m_mqttChannels.value(parentDevice); - QString shellyId = parentDevice->paramValue(m_idParamTypeMap.value(parentDevice->thingClassId())).toString(); + QString shellyId = parentDevice->paramValue(idParamTypeMap.value(parentDevice->thingClassId())).toString(); channel->publish("shellies/" + shellyId + "/roller/0/command", "stop"); info->finish(Thing::ThingErrorNoError); return; @@ -567,7 +678,7 @@ void IntegrationPluginShelly::executeAction(ThingActionInfo *info) if (action.actionTypeId() == shellyRollerCalibrateActionTypeId) { Thing *parentDevice = myThings().findById(thing->parentId()); MqttChannel *channel = m_mqttChannels.value(parentDevice); - QString shellyId = parentDevice->paramValue(m_idParamTypeMap.value(parentDevice->thingClassId())).toString(); + QString shellyId = parentDevice->paramValue(idParamTypeMap.value(parentDevice->thingClassId())).toString(); channel->publish("shellies/" + shellyId + "/roller/0/command", "rc"); info->finish(Thing::ThingErrorNoError); return; @@ -576,7 +687,7 @@ void IntegrationPluginShelly::executeAction(ThingActionInfo *info) if (action.actionTypeId() == shellyRollerPercentageActionTypeId) { Thing *parentDevice = myThings().findById(thing->parentId()); MqttChannel *channel = m_mqttChannels.value(parentDevice); - QString shellyId = parentDevice->paramValue(m_idParamTypeMap.value(parentDevice->thingClassId())).toString(); + QString shellyId = parentDevice->paramValue(idParamTypeMap.value(parentDevice->thingClassId())).toString(); channel->publish("shellies/" + shellyId + "/roller/0/command/pos", QByteArray::number(action.param(shellyRollerPercentageActionPercentageParamTypeId).value().toInt())); info->finish(Thing::ThingErrorNoError); return; @@ -592,10 +703,10 @@ void IntegrationPluginShelly::onClientConnected(MqttChannel *channel) qCWarning(dcShelly()) << "Received a client connect for a thing we don't know!"; return; } - thing->setStateValue(m_connectedStateTypesMap.value(thing->thingClassId()), true); + thing->setStateValue(connectedStateTypesMap.value(thing->thingClassId()), true); foreach (Thing *child, myThings().filterByParentId(thing->id())) { - child->setStateValue(m_connectedStateTypesMap[child->thingClassId()], true); + child->setStateValue(connectedStateTypesMap[child->thingClassId()], true); } } @@ -606,10 +717,10 @@ void IntegrationPluginShelly::onClientDisconnected(MqttChannel *channel) qCWarning(dcShelly()) << "Received a client disconnect for a thing we don't know!"; return; } - thing->setStateValue(m_connectedStateTypesMap.value(thing->thingClassId()), false); + thing->setStateValue(connectedStateTypesMap.value(thing->thingClassId()), false); foreach (Thing *child, myThings().filterByParentId(thing->id())) { - child->setStateValue(m_connectedStateTypesMap[child->thingClassId()], false); + child->setStateValue(connectedStateTypesMap[child->thingClassId()], false); } } @@ -623,7 +734,7 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr qCDebug(dcShelly()) << "Publish received from" << thing->name() << topic; - QString shellyId = thing->paramValue(m_idParamTypeMap.value(thing->thingClassId())).toString(); + QString shellyId = thing->paramValue(idParamTypeMap.value(thing->thingClassId())).toString(); if (topic == "shellies/" + shellyId + "/info") { QJsonParseError error; QJsonDocument jsonDoc = QJsonDocument::fromJson(payload, &error); @@ -632,7 +743,7 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr qCWarning(dcShelly()) << qUtf8Printable(payload); return; } -// qCDebug(dcShelly()) << "Payload:" << qUtf8Printable(jsonDoc.toJson()); + // qCDebug(dcShelly()) << "Payload:" << qUtf8Printable(jsonDoc.toJson()); QVariantMap data = jsonDoc.toVariant().toMap(); // Wifi signal strength @@ -641,16 +752,16 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr int rssi = data.value("wifi_sta").toMap().value("rssi").toInt(); signalStrength = qMin(100, qMax(0, (rssi + 100) * 2)); } - thing->setStateValue(m_signalStrengthStateTypesMap.value(thing->thingClassId()), signalStrength); + thing->setStateValue(signalStrengthStateTypesMap.value(thing->thingClassId()), signalStrength); foreach (Thing *child, myThings().filterByParentId(thing->id())) { - child->setStateValue(m_signalStrengthStateTypesMap.value(child->thingClassId()), signalStrength); + child->setStateValue(signalStrengthStateTypesMap.value(child->thingClassId()), signalStrength); } // Firmware update QString updateStatus = updateStatusMap.value(data.value("update").toMap().value("status").toString()); - thing->setStateValue(m_updateStatusStateTypesMap.value(thing->thingClassId()), updateStatus); - thing->setStateValue(m_currentVersionStateTypesMap.value(thing->thingClassId()), data.value("update").toMap().value("old_version").toString()); - thing->setStateValue(m_availableVersionStateTypesMap.value(thing->thingClassId()), data.value("update").toMap().value("new_version").toString()); + thing->setStateValue(updateStatusStateTypesMap.value(thing->thingClassId()), updateStatus); + thing->setStateValue(currentVersionStateTypesMap.value(thing->thingClassId()), data.value("update").toMap().value("old_version").toString()); + thing->setStateValue(availableVersionStateTypesMap.value(thing->thingClassId()), data.value("update").toMap().value("new_version").toString()); // While we normally use the specific topics instead of the "info" object, the Shell H&T posts it very rarely // and in combination with its power safe mode let's use this one to get temp/humidity @@ -666,29 +777,29 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr if (topic.startsWith("shellies/" + shellyId + "/input/")) { -// qCDebug(dcShelly()) << "Payload:" << payload; + // qCDebug(dcShelly()) << "Payload:" << payload; int channel = topic.split("/").last().toInt(); // "1" or "0" // Emit event button pressed bool on = payload == "1"; if (thing->thingClassId() == shellyI3ThingClassId) { - if (channel == 0) { - if (thing->stateValue(shellyI3Input1StateTypeId).toBool() != on) { - thing->setStateValue(shellyI3Input1StateTypeId, on); - emit emitEvent(Event(shellyI3Input1EventTypeId, thing->id())); - } - } else if (channel == 1) { - if (thing->stateValue(shellyI3Input2StateTypeId).toBool() != on) { - thing->setStateValue(shellyI3Input2StateTypeId, on); - emit emitEvent(Event(shellyI3Input2EventTypeId, thing->id())); - } - } else { - if (thing->stateValue(shellyI3Input3StateTypeId).toBool() != on) { - thing->setStateValue(shellyI3Input3StateTypeId, on); - emit emitEvent(Event(shellyI3Input3EventTypeId, thing->id())); - } - } - return; + if (channel == 0) { + if (thing->stateValue(shellyI3Input1StateTypeId).toBool() != on) { + thing->setStateValue(shellyI3Input1StateTypeId, on); + emit emitEvent(Event(shellyI3Input1EventTypeId, thing->id())); + } + } else if (channel == 1) { + if (thing->stateValue(shellyI3Input2StateTypeId).toBool() != on) { + thing->setStateValue(shellyI3Input2StateTypeId, on); + emit emitEvent(Event(shellyI3Input2EventTypeId, thing->id())); + } + } else { + if (thing->stateValue(shellyI3Input3StateTypeId).toBool() != on) { + thing->setStateValue(shellyI3Input3StateTypeId, on); + emit emitEvent(Event(shellyI3Input3EventTypeId, thing->id())); + } + } + return; } foreach (Thing *child, myThings().filterByParentId(thing->id())) { if (child->thingClassId() == shellySwitchThingClassId && child->paramValue(shellySwitchThingChannelParamTypeId).toInt() == channel + 1) { @@ -702,21 +813,21 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr QRegExp topicMatcher = QRegExp("shellies/" + shellyId + "/relay/[0-1]"); if (topicMatcher.exactMatch(topic)) { -// qCDebug(dcShelly()) << "Payload:" << payload; + // qCDebug(dcShelly()) << "Payload:" << payload; QStringList parts = topic.split("/"); int channel = parts.at(3).toInt(); bool on = payload == "on"; // If the shelly main thing has a power state (e.g. Shelly Plug) - if (m_powerStateTypeMap.contains(thing->thingClassId())) { - thing->setStateValue(m_powerStateTypeMap.value(thing->thingClassId()), on); + if (powerStateTypeMap.contains(thing->thingClassId())) { + thing->setStateValue(powerStateTypeMap.value(thing->thingClassId()), on); } // And switch all childs of this shelly too foreach (Thing *child, myThings().filterByParentId(thing->id())) { - if (m_powerStateTypeMap.contains(child->thingClassId())) { - ParamTypeId channelParamTypeId = m_channelParamTypeMap.value(child->thingClassId()); + if (powerStateTypeMap.contains(child->thingClassId())) { + ParamTypeId channelParamTypeId = channelParamTypeMap.value(child->thingClassId()); if (child->paramValue(channelParamTypeId).toInt() == channel + 1) { - child->setStateValue(m_powerStateTypeMap.value(child->thingClassId()), on); + child->setStateValue(powerStateTypeMap.value(child->thingClassId()), on); } } } @@ -724,53 +835,53 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr topicMatcher = QRegExp("shellies/" + shellyId + "/(relay|roller)/[0-1]/power"); if (topicMatcher.exactMatch(topic)) { -// qCDebug(dcShelly()) << "Payload:" << payload; + // qCDebug(dcShelly()) << "Payload:" << payload; QStringList parts = topic.split("/"); int channel = parts.at(3).toInt(); double power = payload.toDouble(); // If this gateway thing supports power measuring (e.g. Shelly Plug S) set it directly here - if (m_currentPowerStateTypeMap.contains(thing->thingClassId())) { - thing->setStateValue(m_currentPowerStateTypeMap.value(thing->thingClassId()), power); + if (currentPowerStateTypeMap.contains(thing->thingClassId())) { + thing->setStateValue(currentPowerStateTypeMap.value(thing->thingClassId()), power); } // For multi-channel devices, power measurements are per-channel, so, find the child thing foreach (Thing *child, myThings().filterByParentId(thing->id()).filterByInterface("extendedsmartmeterconsumer")) { - ParamTypeId channelParamTypeId = m_channelParamTypeMap.value(child->thingClassId()); + ParamTypeId channelParamTypeId = channelParamTypeMap.value(child->thingClassId()); if (child->paramValue(channelParamTypeId).toInt() == channel + 1) { - child->setStateValue(m_currentPowerStateTypeMap.value(child->thingClassId()), power); + child->setStateValue(currentPowerStateTypeMap.value(child->thingClassId()), power); } } } topicMatcher = QRegExp("shellies/" + shellyId + "/(relay|roller)/[0-1]/energy"); if (topicMatcher.exactMatch(topic)) { -// qCDebug(dcShelly()) << "Payload:" << payload; + // qCDebug(dcShelly()) << "Payload:" << payload; QStringList parts = topic.split("/"); int channel = parts.at(3).toInt(); // W/min => kW/h double energy = payload.toDouble() / 1000 / 60; // If this gateway thing supports energy measuring (e.g. Shelly Plug S) set it directly here - if (m_totalEnergyConsumedStateTypeMap.contains(thing->thingClassId())) { - thing->setStateValue(m_totalEnergyConsumedStateTypeMap.value(thing->thingClassId()), energy); + if (totalEnergyConsumedStateTypeMap.contains(thing->thingClassId())) { + thing->setStateValue(totalEnergyConsumedStateTypeMap.value(thing->thingClassId()), energy); } // For multi-channel devices, power measurements are per-channel, so, find the child thing foreach (Thing *child, myThings().filterByParentId(thing->id()).filterByInterface("extendedsmartmeterconsumer")) { - ParamTypeId channelParamTypeId = m_channelParamTypeMap.value(child->thingClassId()); + ParamTypeId channelParamTypeId = channelParamTypeMap.value(child->thingClassId()); if (child->paramValue(channelParamTypeId).toInt() == channel + 1) { - child->setStateValue(m_totalEnergyConsumedStateTypeMap.value(child->thingClassId()), energy); + child->setStateValue(totalEnergyConsumedStateTypeMap.value(child->thingClassId()), energy); } } } if (topic == "shellies/" + shellyId + "/color/0") { -// qCDebug(dcShelly()) << "Payload:" << payload; + // qCDebug(dcShelly()) << "Payload:" << payload; bool on = payload == "on"; - if (m_powerStateTypeMap.contains(thing->thingClassId())) { - thing->setStateValue(m_powerStateTypeMap.value(thing->thingClassId()), on); + if (powerStateTypeMap.contains(thing->thingClassId())) { + thing->setStateValue(powerStateTypeMap.value(thing->thingClassId()), on); } } if (topic == "shellies/" + shellyId + "/color/0/status") { -// qCDebug(dcShelly()) << "Payload:" << payload; + // qCDebug(dcShelly()) << "Payload:" << payload; QJsonParseError error; QJsonDocument jsonDoc = QJsonDocument::fromJson(payload, &error); if (error.error != QJsonParseError::NoError) { @@ -778,25 +889,25 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr return; } QVariantMap statusMap = jsonDoc.toVariant().toMap(); - if (m_colorStateTypeMap.contains(thing->thingClassId())) { + if (colorStateTypeMap.contains(thing->thingClassId())) { QColor color = QColor(statusMap.value("red").toInt(), statusMap.value("green").toInt(), statusMap.value("blue").toInt()); - thing->setStateValue(m_colorStateTypeMap.value(thing->thingClassId()), color); + thing->setStateValue(colorStateTypeMap.value(thing->thingClassId()), color); } - if (m_brightnessStateTypeMap.contains(thing->thingClassId())) { + if (brightnessStateTypeMap.contains(thing->thingClassId())) { int brightness = statusMap.value("gain").toInt(); - thing->setStateValue(m_brightnessStateTypeMap.value(thing->thingClassId()), brightness); + thing->setStateValue(brightnessStateTypeMap.value(thing->thingClassId()), brightness); } - if (m_currentPowerStateTypeMap.contains(thing->thingClassId())) { + if (currentPowerStateTypeMap.contains(thing->thingClassId())) { double power = statusMap.value("power").toDouble(); - thing->setStateValue(m_currentPowerStateTypeMap.value(thing->thingClassId()), power); + thing->setStateValue(currentPowerStateTypeMap.value(thing->thingClassId()), power); } } if (topic == "shellies/" + shellyId + "/light/0") { -// qCDebug(dcShelly()) << "Payload:" << payload; + // qCDebug(dcShelly()) << "Payload:" << payload; bool on = payload == "on"; - if (m_powerStateTypeMap.contains(thing->thingClassId())) { - thing->setStateValue(m_powerStateTypeMap.value(thing->thingClassId()), on); + if (powerStateTypeMap.contains(thing->thingClassId())) { + thing->setStateValue(powerStateTypeMap.value(thing->thingClassId()), on); } } @@ -807,31 +918,31 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr qCWarning(dcShelly()) << "Error parsing JSON from Shelly:" << error.error << error.errorString() << payload; return; } -// qCDebug(dcShelly()) << "Payload:" << qUtf8Printable(jsonDoc.toJson()); + // qCDebug(dcShelly()) << "Payload:" << qUtf8Printable(jsonDoc.toJson()); QVariantMap statusMap = jsonDoc.toVariant().toMap(); - if (m_brightnessStateTypeMap.contains(thing->thingClassId())) { + if (brightnessStateTypeMap.contains(thing->thingClassId())) { int brightness = statusMap.value("brightness").toInt(); - thing->setStateValue(m_brightnessStateTypeMap.value(thing->thingClassId()), brightness); + thing->setStateValue(brightnessStateTypeMap.value(thing->thingClassId()), brightness); } } if (topic == "shellies/" + shellyId + "/light/0/power") { -// qCDebug(dcShelly()) << "Payload:" << payload; - if (m_currentPowerStateTypeMap.contains(thing->thingClassId())) { + // qCDebug(dcShelly()) << "Payload:" << payload; + if (currentPowerStateTypeMap.contains(thing->thingClassId())) { double power = payload.toDouble(); - thing->setStateValue(m_currentPowerStateTypeMap.value(thing->thingClassId()), power); + thing->setStateValue(currentPowerStateTypeMap.value(thing->thingClassId()), power); } } if (topic == "shellies/" + shellyId + "/roller/0") { -// qCDebug(dcShelly()) << "Payload:" << payload; + // qCDebug(dcShelly()) << "Payload:" << payload; // Roller shutters are always child devices... foreach (Thing *child, myThings().filterByParentId(thing->id()).filterByInterface("extendedshutter")) { child->setStateValue(shellyRollerMovingStateTypeId, payload != "stop"); } } if (topic == "shellies/" + shellyId + "/roller/0/pos") { -// qCDebug(dcShelly()) << "Payload:" << payload; + // qCDebug(dcShelly()) << "Payload:" << payload; // Roller shutters are always child devices... int pos = payload.toInt(); foreach (Thing *child, myThings().filterByParentId(thing->id()).filterByInterface("extendedshutter")) { @@ -840,10 +951,10 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr } if (topic == "shellies/" + shellyId + "/sensor/battery") { - if (m_batteryLevelStateTypeMap.contains(thing->thingClassId())) { + if (batteryLevelStateTypesMap.contains(thing->thingClassId())) { int batteryLevel = payload.toInt(); - thing->setStateValue(m_batteryLevelStateTypeMap.value(thing->thingClassId()), batteryLevel); - thing->setStateValue(m_batteryCriticalStateTypeMap.value(thing->thingClassId()), batteryLevel < 10); + thing->setStateValue(batteryLevelStateTypesMap.value(thing->thingClassId()), batteryLevel); + thing->setStateValue(batteryCriticalStateTypesMap.value(thing->thingClassId()), batteryLevel < 10); } } @@ -877,7 +988,7 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr return; } QString param = ""; - EventTypeId eventTypeId = shellyI3LongPressedEventTypeId;; + EventTypeId eventTypeId = shellyI3LongPressedEventTypeId; ParamTypeId paramTypeId = shellyI3LongPressedEventButtonNameParamTypeId; ParamTypeId param2TypeId = shellyI3LongPressedEventOriginParamTypeId; if (event == "L") { @@ -955,13 +1066,38 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr thing->setStateValue(shellyEm3CurrentPowerStateTypeId, totalPower); } } + + if (topic == "shellies/" + shellyId + "/status") { + QJsonParseError error; + QJsonDocument jsonDoc = QJsonDocument::fromJson(payload, &error); + if (error.error != QJsonParseError::NoError) { + qCWarning(dcShelly()) << "Error parsing JSON from Shelly:" << error.error << error.errorString() << payload; + return; + } + // qCDebug(dcShelly()) << "Payload:" << qUtf8Printable(jsonDoc.toJson()); + QVariantMap statusMap = jsonDoc.toVariant().toMap(); + + if (presenceStateTypesMap.contains(thing->thingClassId())) { + thing->setStateValue(presenceStateTypesMap.value(thing->thingClassId()), statusMap.value("motion").toBool()); + } + if (lightIntensityStateTypesMap.contains(thing->thingClassId())) { + thing->setStateValue(lightIntensityStateTypesMap.value(thing->thingClassId()), statusMap.value("lux").toDouble()); + } + if (vibrationStateTypesMap.contains(thing->thingClassId())) { + thing->setStateValue(vibrationStateTypesMap.value(thing->thingClassId()), statusMap.value("vibration").toBool()); + } + if (batteryLevelStateTypesMap.contains(thing->thingClassId()) && statusMap.contains("bat")) { + thing->setStateValue(batteryLevelStateTypesMap.value(thing->thingClassId()), statusMap.value("bat").toMap().value("value").toInt()); + thing->setStateValue(batteryCriticalStateTypesMap.value(thing->thingClassId()), statusMap.value("bat").toMap().value("value").toInt() < 10); + } + } } void IntegrationPluginShelly::updateStatus() { foreach (Thing *thing, m_mqttChannels.keys()) { MqttChannel *channel = m_mqttChannels.value(thing); - QString shellyId = thing->paramValue(m_idParamTypeMap.value(thing->thingClassId())).toString(); + QString shellyId = thing->paramValue(idParamTypeMap.value(thing->thingClassId())).toString(); qCDebug(dcShelly()) << "Requesting announcement" << QString("shellies/%1/info").arg(shellyId); channel->publish(QString("shellies/%1/command").arg(shellyId), "announce"); } @@ -970,7 +1106,7 @@ void IntegrationPluginShelly::updateStatus() void IntegrationPluginShelly::setupShellyGateway(ThingSetupInfo *info) { Thing *thing = info->thing(); - QString shellyId = info->thing()->paramValue(m_idParamTypeMap.value(info->thing()->thingClassId())).toString(); + QString shellyId = info->thing()->paramValue(idParamTypeMap.value(info->thing()->thingClassId())).toString(); ZeroConfServiceEntry zeroConfEntry; foreach (const ZeroConfServiceEntry &entry, m_zeroconfBrowser->serviceEntries()) { if (entry.name() == shellyId) { @@ -997,8 +1133,8 @@ void IntegrationPluginShelly::setupShellyGateway(ThingSetupInfo *info) // Validate params bool rollerMode = false; if (info->thing()->thingClassId() == shelly2ThingClassId || info->thing()->thingClassId() == shelly25ThingClassId) { - QString connectedDevice1 = info->thing()->paramValue(m_connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString(); - QString connectedDevice2 = info->thing()->paramValue(m_connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString(); + QString connectedDevice1 = info->thing()->paramValue(connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString(); + QString connectedDevice2 = info->thing()->paramValue(connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString(); if (connectedDevice1.startsWith("Roller Shutter") && !connectedDevice2.startsWith("Roller Shutter")) { qCWarning(dcShelly()) << "Cannot mix roller and relay mode. This won't work.."; info->finish(Thing::ThingErrorInvalidParameter, QT_TR_NOOP("Roller shutter mode can't be mixed with relay mode. Please configure both connected devices to control a shutter or relays.")); @@ -1035,8 +1171,8 @@ void IntegrationPluginShelly::setupShellyGateway(ThingSetupInfo *info) url.setHost(address.toString()); url.setPort(80); url.setPath("/settings"); - url.setUserName(info->thing()->paramValue(m_usernameParamTypeMap.value(info->thing()->thingClassId())).toString()); - url.setPassword(info->thing()->paramValue(m_passwordParamTypeMap.value(info->thing()->thingClassId())).toString()); + url.setUserName(info->thing()->paramValue(usernameParamTypeMap.value(info->thing()->thingClassId())).toString()); + url.setPassword(info->thing()->paramValue(passwordParamTypeMap.value(info->thing()->thingClassId())).toString()); QUrlQuery query; query.addQueryItem("mqtt_server", channel->serverAddress().toString() + ":" + QString::number(channel->serverPort())); @@ -1131,35 +1267,35 @@ void IntegrationPluginShelly::setupShellyGateway(ThingSetupInfo *info) // No PM devices for shelly 1 and 2 if (info->thing()->thingClassId() == shelly1ThingClassId || info->thing()->thingClassId() == shelly2ThingClassId) { - if (info->thing()->paramValue(m_connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString() == "Generic") { + if (info->thing()->paramValue(connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString() == "Generic") { ThingDescriptor genericChild(shellyGenericThingClassId, info->thing()->name() + " connected device", QString(), info->thing()->id()); genericChild.setParams(ParamList() << Param(shellyGenericThingChannelParamTypeId, 1)); autoChilds.append(genericChild); } - if (info->thing()->paramValue(m_connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString() == "Light") { + if (info->thing()->paramValue(connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString() == "Light") { ThingDescriptor lightChild(shellyLightThingClassId, info->thing()->name() + " connected light", QString(), info->thing()->id()); lightChild.setParams(ParamList() << Param(shellyLightThingChannelParamTypeId, 1)); autoChilds.append(lightChild); } - if (info->thing()->paramValue(m_connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString() == "Socket") { + if (info->thing()->paramValue(connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString() == "Socket") { ThingDescriptor socketChild(shellySocketThingClassId, info->thing()->name() + " connected socket", QString(), info->thing()->id()); socketChild.setParams(ParamList() << Param(shellySocketThingChannelParamTypeId, 1)); autoChilds.append(socketChild); } - // PM devices for shelly 1 pm and 2.5 + // PM devices for shelly 1 pm and 2.5 } else if (info->thing()->thingClassId() == shelly1pmThingClassId || info->thing()->thingClassId() == shelly25ThingClassId) { - if (info->thing()->paramValue(m_connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString() == "Generic") { + if (info->thing()->paramValue(connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString() == "Generic") { ThingDescriptor genericChild(shellyGenericPMThingClassId, info->thing()->name() + " connected device", QString(), info->thing()->id()); genericChild.setParams(ParamList() << Param(shellyGenericPMThingChannelParamTypeId, 1)); autoChilds.append(genericChild); } - if (info->thing()->paramValue(m_connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString() == "Light") { + if (info->thing()->paramValue(connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString() == "Light") { ThingDescriptor lightChild(shellyLightPMThingClassId, info->thing()->name() + " connected light", QString(), info->thing()->id()); lightChild.setParams(ParamList() << Param(shellyLightPMThingChannelParamTypeId, 1)); autoChilds.append(lightChild); } - if (info->thing()->paramValue(m_connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString() == "Socket") { + if (info->thing()->paramValue(connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString() == "Socket") { ThingDescriptor socketChild(shellySocketPMThingClassId, info->thing()->name() + " connected socket", QString(), info->thing()->id()); socketChild.setParams(ParamList() << Param(shellySocketPMThingChannelParamTypeId, 1)); autoChilds.append(socketChild); @@ -1167,17 +1303,17 @@ void IntegrationPluginShelly::setupShellyGateway(ThingSetupInfo *info) // Second channel for shelly 2 (no power metering) if (info->thing()->thingClassId() == shelly2ThingClassId) { - if (info->thing()->paramValue(m_connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString() == "Generic") { + if (info->thing()->paramValue(connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString() == "Generic") { ThingDescriptor genericChild(shellyGenericThingClassId, info->thing()->name() + " connected thing 2", QString(), info->thing()->id()); genericChild.setParams(ParamList() << Param(shellyGenericThingChannelParamTypeId, 2)); autoChilds.append(genericChild); } - if (info->thing()->paramValue(m_connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString() == "Light") { + if (info->thing()->paramValue(connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString() == "Light") { ThingDescriptor lightChild(shellyLightThingClassId, info->thing()->name() + " connected light 2", QString(), info->thing()->id()); lightChild.setParams(ParamList() << Param(shellyLightThingChannelParamTypeId, 2)); autoChilds.append(lightChild); } - if (info->thing()->paramValue(m_connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString() == "Socket") { + if (info->thing()->paramValue(connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString() == "Socket") { ThingDescriptor socketChild(shellySocketThingClassId, info->thing()->name() + " connected socket 2", QString(), info->thing()->id()); socketChild.setParams(ParamList() << Param(shellySocketThingChannelParamTypeId, 2)); autoChilds.append(socketChild); @@ -1186,17 +1322,17 @@ void IntegrationPluginShelly::setupShellyGateway(ThingSetupInfo *info) // Second channel for shelly 2.5 (with power metering) if (info->thing()->thingClassId() == shelly25ThingClassId) { - if (info->thing()->paramValue(m_connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString() == "Generic") { + if (info->thing()->paramValue(connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString() == "Generic") { ThingDescriptor genericChild(shellyGenericPMThingClassId, info->thing()->name() + " connected thing 2", QString(), info->thing()->id()); genericChild.setParams(ParamList() << Param(shellyGenericPMThingChannelParamTypeId, 2)); autoChilds.append(genericChild); } - if (info->thing()->paramValue(m_connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString() == "Light") { + if (info->thing()->paramValue(connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString() == "Light") { ThingDescriptor lightChild(shellyLightPMThingClassId, info->thing()->name() + " connected light 2", QString(), info->thing()->id()); lightChild.setParams(ParamList() << Param(shellyLightPMThingChannelParamTypeId, 2)); autoChilds.append(lightChild); } - if (info->thing()->paramValue(m_connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString() == "Socket") { + if (info->thing()->paramValue(connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString() == "Socket") { ThingDescriptor socketChild(shellySocketPMThingClassId, info->thing()->name() + " connected socket 2", QString(), info->thing()->id()); socketChild.setParams(ParamList() << Param(shellySocketPMThingChannelParamTypeId, 2)); autoChilds.append(socketChild); @@ -1206,8 +1342,8 @@ void IntegrationPluginShelly::setupShellyGateway(ThingSetupInfo *info) // And finally the special roller shutter mode if (info->thing()->thingClassId() == shelly2ThingClassId || info->thing()->thingClassId() == shelly25ThingClassId) { - if (info->thing()->paramValue(m_connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString() == "Roller Shutter Up" - && info->thing()->paramValue(m_connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString() == "Roller Shutter Down") { + if (info->thing()->paramValue(connectedDeviceParamTypeMap.value(info->thing()->thingClassId())).toString() == "Roller Shutter Up" + && info->thing()->paramValue(connectedDevice2ParamTypeMap.value(info->thing()->thingClassId())).toString() == "Roller Shutter Down") { ThingDescriptor rollerShutterChild(shellyRollerThingClassId, info->thing()->name() + " connected shutter", QString(), info->thing()->id()); rollerShutterChild.setParams(ParamList() << Param(shellyRollerThingChannelParamTypeId, 1)); autoChilds.append(rollerShutterChild); @@ -1226,8 +1362,8 @@ void IntegrationPluginShelly::setupShellyGateway(ThingSetupInfo *info) } // Make sure authentication is enalbed if the user wants it - QString username = info->thing()->paramValue(m_usernameParamTypeMap.value(info->thing()->thingClassId())).toString(); - QString password = info->thing()->paramValue(m_passwordParamTypeMap.value(info->thing()->thingClassId())).toString(); + QString username = info->thing()->paramValue(usernameParamTypeMap.value(info->thing()->thingClassId())).toString(); + QString password = info->thing()->paramValue(passwordParamTypeMap.value(info->thing()->thingClassId())).toString(); if (!username.isEmpty()) { QUrl url; url.setScheme("http"); @@ -1264,8 +1400,8 @@ void IntegrationPluginShelly::setupShellyGateway(ThingSetupInfo *info) url.setScheme("http"); url.setHost(address); url.setPort(80); - url.setUserName(thing->paramValue(m_usernameParamTypeMap.value(thing->thingClassId())).toString()); - url.setPassword(thing->paramValue(m_passwordParamTypeMap.value(thing->thingClassId())).toString()); + url.setUserName(thing->paramValue(usernameParamTypeMap.value(thing->thingClassId())).toString()); + url.setPassword(thing->paramValue(passwordParamTypeMap.value(thing->thingClassId())).toString()); QUrlQuery query; if (settingTypeId == shellyPlugSettingsDefaultStateParamTypeId) { @@ -1325,8 +1461,8 @@ void IntegrationPluginShelly::setupShellyChild(ThingSetupInfo *info) url.setHost(address); url.setPort(80); url.setPath("/settings/relay/0"); - url.setUserName(parentDevice->paramValue(m_usernameParamTypeMap.value(parentDevice->thingClassId())).toString()); - url.setPassword(parentDevice->paramValue(m_passwordParamTypeMap.value(parentDevice->thingClassId())).toString()); + url.setUserName(parentDevice->paramValue(usernameParamTypeMap.value(parentDevice->thingClassId())).toString()); + url.setPassword(parentDevice->paramValue(passwordParamTypeMap.value(parentDevice->thingClassId())).toString()); QUrlQuery query; if (paramTypeId == shellySwitchSettingsButtonTypeParamTypeId) { diff --git a/shelly/integrationpluginshelly.h b/shelly/integrationpluginshelly.h index 6490b9ab..a43a9b35 100644 --- a/shelly/integrationpluginshelly.h +++ b/shelly/integrationpluginshelly.h @@ -33,6 +33,8 @@ #include "integrations/integrationplugin.h" +#include "extern-plugininfo.h" + class ZeroConfServiceBrowser; class PluginTimer; @@ -74,60 +76,6 @@ private: PluginTimer *m_timer = nullptr; QHash m_mqttChannels; - - QHash m_idParamTypeMap; - QHash m_usernameParamTypeMap; - QHash m_passwordParamTypeMap; - QHash m_connectedDeviceParamTypeMap; - QHash m_connectedDevice2ParamTypeMap; - QHash m_channelParamTypeMap; - - QHash m_connectedStateTypesMap; - QHash m_signalStrengthStateTypesMap; - QHash m_powerStateTypeMap; - QHash m_currentPowerStateTypeMap; - QHash m_totalEnergyConsumedStateTypeMap; - QHash m_colorStateTypeMap; - QHash m_colorTemperatureStateTypeMap; - QHash m_brightnessStateTypeMap; - QHash m_updateStatusStateTypesMap; - QHash m_currentVersionStateTypesMap; - QHash m_availableVersionStateTypesMap; - QHash m_batteryLevelStateTypeMap; - QHash m_batteryCriticalStateTypeMap; - - QHash m_rebootActionTypeMap; - // Relay based power actions - QHash m_powerActionTypesMap; - QHash m_powerActionParamTypesMap; - - // Color JSON based power actions - QHash m_colorPowerActionTypesMap; - QHash m_colorPowerActionParamTypesMap; - // Color actions - QHash m_colorActionTypesMap; - QHash m_colorActionParamTypesMap; - // Color JSON brightness actions - QHash m_colorBrightnessActionTypesMap; - QHash m_colorBrightnessActionParamTypesMap; - // Color temp - QHash m_colorTemperatureActionTypesMap; - QHash m_colorTemperatureActionParamTypesMap; - - // Dimmable based power actions - QHash m_dimmablePowerActionTypesMap; - QHash m_dimmablePowerActionParamTypesMap; - // Dimmable based brightness actions - QHash m_dimmableBrightnessActionTypesMap; - QHash m_dimmableBrightnessActionParamTypesMap; - - // Roller shutter actions - QHash m_rollerOpenActionTypeMap; - QHash m_rollerCloseActionTypeMap; - QHash m_rollerStopActionTypeMap; - - // Firmware update actions - QHash m_updateActionTypesMap; }; #endif // INTEGRATIONPLUGINSHELLY_H diff --git a/shelly/integrationpluginshelly.json b/shelly/integrationpluginshelly.json index 9ab7616a..30191874 100644 --- a/shelly/integrationpluginshelly.json +++ b/shelly/integrationpluginshelly.json @@ -1741,6 +1741,131 @@ } ] }, + { + "id": "a82737bb-f2d6-442e-a468-5acc0a2e4cd7", + "name": "shellyMotion", + "displayName": "Shelly Motion", + "createMethods": ["discovery"], + "interfaces": ["presencesensor", "lightsensor", "wirelessconnectable", "update", "battery"], + "paramTypes": [ + { + "id": "b92fe8ba-8bfb-4d9a-9fb9-8d55ace8cfb4", + "name":"id", + "displayName": "Shelly ID", + "type": "QString", + "readOnly": true + }, + { + "id": "ea210ec8-37ed-4479-9454-48cc06a1df88", + "name": "username", + "displayName": "Username (optional)", + "type": "QString" + }, + { + "id": "b6a48fc4-5016-47d9-8454-c64686120ee1", + "name": "password", + "displayName": "Password (optional)", + "type": "QString" + } + ], + "stateTypes": [ + { + "id": "45c0cc07-0e13-449c-86a7-ab65d5cdf637", + "name": "isPresent", + "displayName": "Person is present", + "displayNameEvent": "Presence detected", + "type": "bool", + "defaultValue": false + }, + { + "id": "a1e12487-ebab-4993-a075-78275aac7b0d", + "name": "lightIntensity", + "displayName": "Light intensity", + "displayNameEvent": "Light intensity changed", + "type": "double", + "unit": "Lux", + "defaultValue": 0 + }, + { + "id": "76438c2d-9742-4680-9139-d4b4e988cfd2", + "name": "vibration", + "displayName": "Vibration", + "displayNameEvent": "Vibration detected", + "type": "bool", + "defaultValue": false + }, + { + "id": "9ed997fa-1ec8-44d2-ac44-c99d4e259dae", + "name": "connected", + "displayName": "Connected", + "displayNameEvent": "Connected or disconnected", + "type": "bool", + "defaultValue": false, + "cached": false + }, + { + "id": "ecc61ce2-cb66-47ce-a65c-3b9e43ce6fdc", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { + "id": "a604a66c-3143-45ce-a6e3-17a339f428ab", + "name": "updateStatus", + "displayName": "Update status", + "displayNameEvent": "Update status changed", + "type": "QString", + "possibleValues": ["idle", "available", "updating"], + "defaultValue": "idle" + }, + { + "id": "e2d98172-5833-454b-9b4b-04693c6b9232", + "name": "currentVersion", + "displayName": "Current firmware version", + "displayNameEvent": "Current firmware version changed", + "type": "QString", + "defaultValue": "" + }, + { + "id": "0c9e8da4-1b1c-4047-8e9d-c5c580bcf43f", + "name": "availableVersion", + "displayName": "Available firmware version", + "displayNameEvent": "Available firmware version changed", + "type": "QString", + "defaultValue": "" + }, + { + "id": "1d03941e-9c41-446b-b698-f8dff335bf11", + "name": "batteryCritical", + "displayName": "Battery level critical", + "displayNameEvent": "Battery entered critical state", + "type": "bool", + "defaultValue": false + }, + { + "id": "f6d89aa6-7dba-4bb0-89cf-36d85208933f", + "name": "batteryLevel", + "displayName": "Battery level", + "displayNameEvent": "Battery level changed", + "type": "int", + "minValue": 0, + "maxValue": 100, + "defaultValue": 0, + "unit": "Percentage" + } + ], + "actionTypes": [ + { + "id": "17327674-f160-44e1-8a3d-fc2b6e1ee319", + "name": "performUpdate", + "displayName": "Start firmware update" + } + ] + }, { "id": "512c3c7d-d6a6-4d2a-bccd-83147e5f9a25", "name": "shellyGeneric", diff --git a/shelly/translations/6162773b-0435-408c-a4f8-7860d38031a9-en_US.ts b/shelly/translations/6162773b-0435-408c-a4f8-7860d38031a9-en_US.ts index 8b62875f..23dd4fd7 100644 --- a/shelly/translations/6162773b-0435-408c-a4f8-7860d38031a9-en_US.ts +++ b/shelly/translations/6162773b-0435-408c-a4f8-7860d38031a9-en_US.ts @@ -4,38 +4,38 @@ IntegrationPluginShelly - + Unable to find the thing in the network. - + Roller shutter mode can't be mixed with relay mode. Please configure both connected devices to control a shutter or relays. - - + + For using a roller shutter, one channel must be set to up, the other to down. - + Error creating MQTT channel. Please check MQTT server settings. - + Username and password not set correctly. - + Error connecting to Shelly device. - + Unexpected data received from Shelly device. @@ -43,32 +43,38 @@ shelly - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + Available firmware version - The name of the ParamType (ThingClass: shellyEm3, EventType: availableVersion, ID: {27f1e394-642f-4a90-88bf-1ef9ba88b10b}) + The name of the ParamType (ThingClass: shellyMotion, EventType: availableVersion, ID: {0c9e8da4-1b1c-4047-8e9d-c5c580bcf43f}) +---------- +The name of the StateType ({0c9e8da4-1b1c-4047-8e9d-c5c580bcf43f}) of ThingClass shellyMotion +---------- +The name of the ParamType (ThingClass: shellyEm3, EventType: availableVersion, ID: {27f1e394-642f-4a90-88bf-1ef9ba88b10b}) ---------- The name of the StateType ({27f1e394-642f-4a90-88bf-1ef9ba88b10b}) of ThingClass shellyEm3 ---------- @@ -118,20 +124,23 @@ The name of the StateType ({6e794011-d184-4ab2-9c3a-3b2205880cbc}) of ThingClass - - - - - - - - - - - - + + + + + + + + + + + + + Available firmware version changed - The name of the EventType ({27f1e394-642f-4a90-88bf-1ef9ba88b10b}) of ThingClass shellyEm3 + The name of the EventType ({0c9e8da4-1b1c-4047-8e9d-c5c580bcf43f}) of ThingClass shellyMotion +---------- +The name of the EventType ({27f1e394-642f-4a90-88bf-1ef9ba88b10b}) of ThingClass shellyEm3 ---------- The name of the EventType ({770b6b3a-3815-4ba3-8a2d-3fb949c914de}) of ThingClass shellyHT ---------- @@ -157,8 +166,8 @@ The name of the EventType ({6e794011-d184-4ab2-9c3a-3b2205880cbc}) of ThingClass - - + + Battery critical changed The name of the EventType ({56053726-92dc-4a80-b05e-a9a857c02bc1}) of ThingClass shellyHT ---------- @@ -166,12 +175,24 @@ The name of the EventType ({18edddee-1b30-48e4-b233-1e3b68bd6ff1}) of ThingClass - - - - + + Battery entered critical state + The name of the EventType ({1d03941e-9c41-446b-b698-f8dff335bf11}) of ThingClass shellyMotion + + + + + + + + + Battery level - The name of the ParamType (ThingClass: shellyHT, EventType: batteryLevel, ID: {15914ad5-816b-471c-996b-00160100f2bc}) + The name of the ParamType (ThingClass: shellyMotion, EventType: batteryLevel, ID: {f6d89aa6-7dba-4bb0-89cf-36d85208933f}) +---------- +The name of the StateType ({f6d89aa6-7dba-4bb0-89cf-36d85208933f}) of ThingClass shellyMotion +---------- +The name of the ParamType (ThingClass: shellyHT, EventType: batteryLevel, ID: {15914ad5-816b-471c-996b-00160100f2bc}) ---------- The name of the StateType ({15914ad5-816b-471c-996b-00160100f2bc}) of ThingClass shellyHT ---------- @@ -181,21 +202,30 @@ The name of the StateType ({338355e5-9506-48b1-be86-757d69b34755}) of ThingClass - - + + + Battery level changed - The name of the EventType ({15914ad5-816b-471c-996b-00160100f2bc}) of ThingClass shellyHT + The name of the EventType ({f6d89aa6-7dba-4bb0-89cf-36d85208933f}) of ThingClass shellyMotion +---------- +The name of the EventType ({15914ad5-816b-471c-996b-00160100f2bc}) of ThingClass shellyHT ---------- The name of the EventType ({338355e5-9506-48b1-be86-757d69b34755}) of ThingClass shellyButton1 - - - - + + + + + + Battery level critical - The name of the ParamType (ThingClass: shellyHT, EventType: batteryCritical, ID: {56053726-92dc-4a80-b05e-a9a857c02bc1}) + The name of the ParamType (ThingClass: shellyMotion, EventType: batteryCritical, ID: {1d03941e-9c41-446b-b698-f8dff335bf11}) +---------- +The name of the StateType ({1d03941e-9c41-446b-b698-f8dff335bf11}) of ThingClass shellyMotion +---------- +The name of the ParamType (ThingClass: shellyHT, EventType: batteryCritical, ID: {56053726-92dc-4a80-b05e-a9a857c02bc1}) ---------- The name of the StateType ({56053726-92dc-4a80-b05e-a9a857c02bc1}) of ThingClass shellyHT ---------- @@ -205,12 +235,12 @@ The name of the StateType ({18edddee-1b30-48e4-b233-1e3b68bd6ff1}) of ThingClass - - - - - - + + + + + + Brightness The name of the ParamType (ThingClass: shellyDimmer, ActionType: brightness, ID: {f41c93ac-6911-45fc-9221-7dd26bf65fd0}) ---------- @@ -226,8 +256,8 @@ The name of the StateType ({3f74eb92-d95b-48c2-8ac6-29bea9f65ce3}) of ThingClass - - + + Brightness changed The name of the EventType ({f41c93ac-6911-45fc-9221-7dd26bf65fd0}) of ThingClass shellyDimmer ---------- @@ -235,26 +265,26 @@ The name of the EventType ({3f74eb92-d95b-48c2-8ac6-29bea9f65ce3}) of ThingClass - + Button type The name of the ParamType (ThingClass: shellySwitch, Type: settings, ID: {ce9f1650-5e12-40f4-97de-27af86afa40b}) - + Calibrate The name of the ActionType ({4e2d8a7b-821e-4ee8-9f9b-f774d631845f}) of ThingClass shellyRoller - - - - - - - - + + + + + + + + Channel The name of the ParamType (ThingClass: shellyRoller, Type: thing, ID: {281385a5-5084-4ded-80a4-66c0dc1096a8}) ---------- @@ -274,15 +304,15 @@ The name of the ParamType (ThingClass: shellySwitch, Type: thing, ID: {be6bdd43- - + Close The name of the ActionType ({87eb0290-615e-4c98-9ec8-a21104fcf05d}) of ThingClass shellyRoller - - - + + + Color The name of the ParamType (ThingClass: shellyRgbw2, ActionType: color, ID: {6ef7c686-350d-4069-9c41-9b90b3906748}) ---------- @@ -292,15 +322,15 @@ The name of the StateType ({6ef7c686-350d-4069-9c41-9b90b3906748}) of ThingClass - + Color changed The name of the EventType ({6ef7c686-350d-4069-9c41-9b90b3906748}) of ThingClass shellyRgbw2 - - - + + + Color temperature The name of the ParamType (ThingClass: shellyRgbw2, ActionType: colorTemperature, ID: {a32a457f-fdc0-46ce-9106-6f9d4f4a6b16}) ---------- @@ -310,52 +340,54 @@ The name of the StateType ({a32a457f-fdc0-46ce-9106-6f9d4f4a6b16}) of ThingClass - + Color temperature changed The name of the EventType ({a32a457f-fdc0-46ce-9106-6f9d4f4a6b16}) of ThingClass shellyRgbw2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Connected The name of the ParamType (ThingClass: shellyRoller, EventType: connected, ID: {d446719d-628e-477d-882c-a84210c85869}) ---------- @@ -385,6 +417,10 @@ The name of the ParamType (ThingClass: shellyGeneric, EventType: connected, ID: ---------- The name of the StateType ({4a141674-faa6-4953-8272-5b4a4da84d31}) of ThingClass shellyGeneric ---------- +The name of the ParamType (ThingClass: shellyMotion, EventType: connected, ID: {9ed997fa-1ec8-44d2-ac44-c99d4e259dae}) +---------- +The name of the StateType ({9ed997fa-1ec8-44d2-ac44-c99d4e259dae}) of ThingClass shellyMotion +---------- The name of the ParamType (ThingClass: shellyEm3, EventType: connected, ID: {08bd7743-af98-4328-bbca-64280afc5a87}) ---------- The name of the StateType ({08bd7743-af98-4328-bbca-64280afc5a87}) of ThingClass shellyEm3 @@ -439,13 +475,13 @@ The name of the StateType ({e5d41e05-2296-457e-97d8-98a5ac0de615}) of ThingClass - - - - - - - + + + + + + + Connected changed The name of the EventType ({9b17b10d-07ee-4a3d-813f-ef37e79e7241}) of ThingClass shellyI3 ---------- @@ -463,8 +499,8 @@ The name of the EventType ({e5d41e05-2296-457e-97d8-98a5ac0de615}) of ThingClass - - + + Connected device 1 The name of the ParamType (ThingClass: shelly25, Type: thing, ID: {dc8a02fb-baa4-40bf-9e00-684b17794287}) ---------- @@ -472,8 +508,8 @@ The name of the ParamType (ThingClass: shelly2, Type: thing, ID: {84e60831-0a2c- - - + + Connected device 2 The name of the ParamType (ThingClass: shelly25, Type: thing, ID: {1e6925f8-1613-4fe4-8234-e4a4e973ef83}) ---------- @@ -481,16 +517,17 @@ The name of the ParamType (ThingClass: shelly2, Type: thing, ID: {0becaa77-b927- - - - - - - - - - - + + + + + + + + + + + Connected or disconnected The name of the EventType ({d446719d-628e-477d-882c-a84210c85869}) of ThingClass shellyRoller ---------- @@ -506,6 +543,8 @@ The name of the EventType ({5ec936f8-694d-43f4-b3a2-fdc77d38feab}) of ThingClass ---------- The name of the EventType ({4a141674-faa6-4953-8272-5b4a4da84d31}) of ThingClass shellyGeneric ---------- +The name of the EventType ({9ed997fa-1ec8-44d2-ac44-c99d4e259dae}) of ThingClass shellyMotion +---------- The name of the EventType ({08bd7743-af98-4328-bbca-64280afc5a87}) of ThingClass shellyEm3 ---------- The name of the EventType ({0c233312-7b8f-4ca3-880d-523cab9b3ccb}) of ThingClass shellySwitch @@ -514,9 +553,9 @@ The name of the EventType ({b35ace90-8afb-49f1-924d-899bf1c03c3a}) of ThingClass - - - + + + Connected/disconnected The name of the EventType ({d23e25a1-f723-4de1-806a-83fb073f01f4}) of ThingClass shellyButton1 ---------- @@ -526,16 +565,16 @@ The name of the EventType ({98b6e1ba-8d5c-4cb1-82a0-2d06c71cdba6}) of ThingClass - + Consumed energy changed The name of the EventType ({962fec29-6be0-452e-87c5-5ff71435c40f}) of ThingClass shellyPlug - - - - + + + + Count The name of the ParamType (ThingClass: shellyI3, EventType: longPressed, ID: {99683cf9-930e-4f10-94f2-73bb32092639}) ---------- @@ -547,8 +586,8 @@ The name of the ParamType (ThingClass: shellyButton1, EventType: pressed, ID: {a - - + + Current (Phase A) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseACurrent, ID: {5fa79319-756b-4b2c-87b1-59ff996b8435}) ---------- @@ -556,14 +595,14 @@ The name of the StateType ({5fa79319-756b-4b2c-87b1-59ff996b8435}) of ThingClass - + Current (Phase A) changed The name of the EventType ({5fa79319-756b-4b2c-87b1-59ff996b8435}) of ThingClass shellyEm3 - - + + Current (Phase B) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseBCurrent, ID: {a4151601-fe77-418a-a2c1-6376e32da3bd}) ---------- @@ -571,14 +610,14 @@ The name of the StateType ({a4151601-fe77-418a-a2c1-6376e32da3bd}) of ThingClass - + Current (Phase B) changed The name of the EventType ({a4151601-fe77-418a-a2c1-6376e32da3bd}) of ThingClass shellyEm3 - - + + Current (Phase C) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseCCurrent, ID: {ab78aa9c-aa73-4f5d-8d21-38c83c5e9e7c}) ---------- @@ -586,20 +625,26 @@ The name of the StateType ({ab78aa9c-aa73-4f5d-8d21-38c83c5e9e7c}) of ThingClass - + Current (Phase C) changed The name of the EventType ({ab78aa9c-aa73-4f5d-8d21-38c83c5e9e7c}) of ThingClass shellyEm3 - - - - - - + + + + + + + + Current firmware version - The name of the ParamType (ThingClass: shellyEm3, EventType: currentVersion, ID: {f9ddb9f1-1251-484e-bdce-531d584d8f6a}) + The name of the ParamType (ThingClass: shellyMotion, EventType: currentVersion, ID: {e2d98172-5833-454b-9b4b-04693c6b9232}) +---------- +The name of the StateType ({e2d98172-5833-454b-9b4b-04693c6b9232}) of ThingClass shellyMotion +---------- +The name of the ParamType (ThingClass: shellyEm3, EventType: currentVersion, ID: {f9ddb9f1-1251-484e-bdce-531d584d8f6a}) ---------- The name of the StateType ({f9ddb9f1-1251-484e-bdce-531d584d8f6a}) of ThingClass shellyEm3 ---------- @@ -613,11 +658,14 @@ The name of the StateType ({b17a7df2-952b-4cdd-8d28-a8e8582b49d4}) of ThingClass - - - + + + + Current firmware version changed - The name of the EventType ({f9ddb9f1-1251-484e-bdce-531d584d8f6a}) of ThingClass shellyEm3 + The name of the EventType ({e2d98172-5833-454b-9b4b-04693c6b9232}) of ThingClass shellyMotion +---------- +The name of the EventType ({f9ddb9f1-1251-484e-bdce-531d584d8f6a}) of ThingClass shellyEm3 ---------- The name of the EventType ({5655b88c-f852-4efe-955f-cf5f88e8ba6b}) of ThingClass shellyHT ---------- @@ -625,8 +673,8 @@ The name of the EventType ({b17a7df2-952b-4cdd-8d28-a8e8582b49d4}) of ThingClass - - + + Current power The name of the ParamType (ThingClass: shellyEm3, EventType: currentPower, ID: {3fc2a87f-cd33-4d1f-b7a6-75ffcb4e7cc4}) ---------- @@ -634,28 +682,28 @@ The name of the StateType ({3fc2a87f-cd33-4d1f-b7a6-75ffcb4e7cc4}) of ThingClass - + Current power changed The name of the EventType ({3fc2a87f-cd33-4d1f-b7a6-75ffcb4e7cc4}) of ThingClass shellyEm3 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Current power consumption The name of the ParamType (ThingClass: shellyRoller, EventType: currentPower, ID: {0d7cb1cf-3fff-4d0b-96c2-c02e9a92af57}) ---------- @@ -691,10 +739,10 @@ The name of the StateType ({3ec03053-7cf5-44fb-ad92-041eed9edd9a}) of ThingClass - - - - + + + + Current power consumption changed The name of the EventType ({b3336ca6-1577-4230-8708-98875148606e}) of ThingClass shellyDimmer ---------- @@ -706,13 +754,13 @@ The name of the EventType ({3ec03053-7cf5-44fb-ad92-041eed9edd9a}) of ThingClass - - - - - - - + + + + + + + Default state The name of the ParamType (ThingClass: shellySocketPM, Type: settings, ID: {9880a51b-57da-4b65-a0ec-23eb0fdcb8ac}) ---------- @@ -730,8 +778,8 @@ The name of the ParamType (ThingClass: shellyPlug, Type: settings, ID: {40f251db - - + + Firmware update status The name of the ParamType (ThingClass: shellyDimmer, EventType: updateStatus, ID: {8d3b3d63-86f1-46cb-92ef-d27c0d9d0a4e}) ---------- @@ -739,30 +787,30 @@ The name of the StateType ({8d3b3d63-86f1-46cb-92ef-d27c0d9d0a4e}) of ThingClass - + Firmware update status changed The name of the EventType ({8d3b3d63-86f1-46cb-92ef-d27c0d9d0a4e}) of ThingClass shellyDimmer - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Firmware version The name of the ParamType (ThingClass: shellyI3, EventType: currentVersion, ID: {33e7d186-7c6b-4c4e-89c3-80362ef76615}) ---------- @@ -802,15 +850,15 @@ The name of the StateType ({e033cca0-03fa-4b2e-9d7b-d4a2c8ffbb8c}) of ThingClass - - - - - - - - - + + + + + + + + + Firmware version changed The name of the EventType ({33e7d186-7c6b-4c4e-89c3-80362ef76615}) of ThingClass shellyI3 ---------- @@ -832,8 +880,8 @@ The name of the EventType ({e033cca0-03fa-4b2e-9d7b-d4a2c8ffbb8c}) of ThingClass - - + + Humidity The name of the ParamType (ThingClass: shellyHT, EventType: humidity, ID: {18a3c71b-f4ef-45d8-a5db-58f533fb6e19}) ---------- @@ -841,14 +889,14 @@ The name of the StateType ({18a3c71b-f4ef-45d8-a5db-58f533fb6e19}) of ThingClass - + Humidity changed The name of the EventType ({18a3c71b-f4ef-45d8-a5db-58f533fb6e19}) of ThingClass shellyHT - - + + Input 1 The name of the ParamType (ThingClass: shellyI3, EventType: input1, ID: {61e98cc9-4449-4fb2-818e-692303244ce2}) ---------- @@ -856,14 +904,14 @@ The name of the StateType ({61e98cc9-4449-4fb2-818e-692303244ce2}) of ThingClass - + Input 1 changed The name of the EventType ({61e98cc9-4449-4fb2-818e-692303244ce2}) of ThingClass shellyI3 - - + + Input 2 The name of the ParamType (ThingClass: shellyI3, EventType: input2, ID: {04497ff2-a231-4d3d-adeb-66275a3b128b}) ---------- @@ -871,14 +919,14 @@ The name of the StateType ({04497ff2-a231-4d3d-adeb-66275a3b128b}) of ThingClass - + Input 2 changed The name of the EventType ({04497ff2-a231-4d3d-adeb-66275a3b128b}) of ThingClass shellyI3 - - + + Input 3 The name of the ParamType (ThingClass: shellyI3, EventType: input3, ID: {5895fc2d-19a4-40c2-8522-7c4462e55a3e}) ---------- @@ -886,44 +934,59 @@ The name of the StateType ({5895fc2d-19a4-40c2-8522-7c4462e55a3e}) of ThingClass - + Input 3 changed The name of the EventType ({5895fc2d-19a4-40c2-8522-7c4462e55a3e}) of ThingClass shellyI3 - + Invert button The name of the ParamType (ThingClass: shellySwitch, Type: settings, ID: {f31eb52b-9aaf-409d-8bba-badda7c1a249}) - + + + Light intensity + The name of the ParamType (ThingClass: shellyMotion, EventType: lightIntensity, ID: {a1e12487-ebab-4993-a075-78275aac7b0d}) +---------- +The name of the StateType ({a1e12487-ebab-4993-a075-78275aac7b0d}) of ThingClass shellyMotion + + + + + Light intensity changed + The name of the EventType ({a1e12487-ebab-4993-a075-78275aac7b0d}) of ThingClass shellyMotion + + + + Long Pressed The name of the EventType ({bb966833-a7a6-4ad7-b5f5-057b38ebb036}) of ThingClass shellyI3 - + Longpress duration The name of the ParamType (ThingClass: shellyButton1, Type: settings, ID: {b98423a8-c758-4dae-b979-e22446d06b22}) - + Longpressed The name of the EventType ({47cab6b6-eed3-4628-b3ad-2ceda26d6f84}) of ThingClass shellyButton1 - + Max time between multiple presses The name of the ParamType (ThingClass: shellyButton1, Type: settings, ID: {b1f5a911-76ec-42e5-ac64-17f85d82b875}) - - + + Moving The name of the ParamType (ThingClass: shellyRoller, EventType: moving, ID: {2729d4e0-c38c-47b8-a0e8-26959090fe74}) ---------- @@ -931,18 +994,18 @@ The name of the StateType ({2729d4e0-c38c-47b8-a0e8-26959090fe74}) of ThingClass - + Moving changed The name of the EventType ({2729d4e0-c38c-47b8-a0e8-26959090fe74}) of ThingClass shellyRoller - - - - - - + + + + + + On The name of the ParamType (ThingClass: shellyDimmer, ActionType: power, ID: {e4a6ac87-31fb-4516-9cf3-f135621e902c}) ---------- @@ -958,8 +1021,8 @@ The name of the StateType ({14abcd30-9db2-4065-ae81-501a55fbb145}) of ThingClass - - + + On/Off The name of the ParamType (ThingClass: shellySwitch, EventType: power, ID: {20f74d88-0683-4d3a-9513-6b29b5112b7b}) ---------- @@ -967,32 +1030,35 @@ The name of the StateType ({20f74d88-0683-4d3a-9513-6b29b5112b7b}) of ThingClass - + On/Off toggled The name of the EventType ({20f74d88-0683-4d3a-9513-6b29b5112b7b}) of ThingClass shellySwitch - + Open The name of the ActionType ({b96a8f85-c39e-499b-abbd-40b18788e907}) of ThingClass shellyRoller - - - - - - - - - - - - + + + + + + + + + + + + + Password (optional) - The name of the ParamType (ThingClass: shellyEm3, Type: thing, ID: {29aee8f6-ed40-41c5-83c9-32c8aa89c7ea}) + The name of the ParamType (ThingClass: shellyMotion, Type: thing, ID: {b6a48fc4-5016-47d9-8454-c64686120ee1}) +---------- +The name of the ParamType (ThingClass: shellyEm3, Type: thing, ID: {29aee8f6-ed40-41c5-83c9-32c8aa89c7ea}) ---------- The name of the ParamType (ThingClass: shellyHT, Type: thing, ID: {a0e1670d-3df2-49c2-b080-577f2d10af68}) ---------- @@ -1018,9 +1084,18 @@ The name of the ParamType (ThingClass: shelly1, Type: thing, ID: {d29b8399-bfa6- - - - + + + Person is present + The name of the ParamType (ThingClass: shellyMotion, EventType: isPresent, ID: {45c0cc07-0e13-449c-86a7-ab65d5cdf637}) +---------- +The name of the StateType ({45c0cc07-0e13-449c-86a7-ab65d5cdf637}) of ThingClass shellyMotion + + + + + + Position The name of the ParamType (ThingClass: shellyRoller, ActionType: percentage, ID: {86270b8b-bce4-4d8a-9bc9-d72af36b991c}) ---------- @@ -1030,30 +1105,30 @@ The name of the StateType ({86270b8b-bce4-4d8a-9bc9-d72af36b991c}) of ThingClass - + Position changed The name of the EventType ({86270b8b-bce4-4d8a-9bc9-d72af36b991c}) of ThingClass shellyRoller - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Power The name of the ParamType (ThingClass: shellySocketPM, ActionType: power, ID: {d6adeab6-c91d-44ba-8d01-9b5b9b7368be}) ---------- @@ -1093,8 +1168,8 @@ The name of the StateType ({72d7dbba-757c-4b03-a092-1d3f374fa961}) of ThingClass - - + + Power (Phase A) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseAPower, ID: {432ba180-936d-4700-907e-766264bfdd35}) ---------- @@ -1102,14 +1177,14 @@ The name of the StateType ({432ba180-936d-4700-907e-766264bfdd35}) of ThingClass - + Power (Phase A) changed The name of the EventType ({432ba180-936d-4700-907e-766264bfdd35}) of ThingClass shellyEm3 - - + + Power (Phase B) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseBPower, ID: {02edeedb-8a93-41f8-8bc5-09031b7d2d4d}) ---------- @@ -1117,14 +1192,14 @@ The name of the StateType ({02edeedb-8a93-41f8-8bc5-09031b7d2d4d}) of ThingClass - + Power (Phase B) changed The name of the EventType ({02edeedb-8a93-41f8-8bc5-09031b7d2d4d}) of ThingClass shellyEm3 - - + + Power (Phase C) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseCPower, ID: {82277a4e-49cc-45f4-8b29-470ce99333b6}) ---------- @@ -1132,14 +1207,14 @@ The name of the StateType ({82277a4e-49cc-45f4-8b29-470ce99333b6}) of ThingClass - + Power (Phase C) changed The name of the EventType ({82277a4e-49cc-45f4-8b29-470ce99333b6}) of ThingClass shellyEm3 - - + + Power consumption The name of the ParamType (ThingClass: shellyPlug, EventType: currentPower, ID: {202ea409-650e-48b2-9aae-d4ebe9d505fd}) ---------- @@ -1147,11 +1222,11 @@ The name of the StateType ({202ea409-650e-48b2-9aae-d4ebe9d505fd}) of ThingClass - - - - - + + + + + Power consumption changed The name of the EventType ({0d7cb1cf-3fff-4d0b-96c2-c02e9a92af57}) of ThingClass shellyRoller ---------- @@ -1165,8 +1240,8 @@ The name of the EventType ({202ea409-650e-48b2-9aae-d4ebe9d505fd}) of ThingClass - - + + Power factor (Phase A) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseAPowerFactor, ID: {50be490b-ba5d-4b1f-806c-9e15b915c1eb}) ---------- @@ -1174,14 +1249,14 @@ The name of the StateType ({50be490b-ba5d-4b1f-806c-9e15b915c1eb}) of ThingClass - + Power factor (Phase A) changed The name of the EventType ({50be490b-ba5d-4b1f-806c-9e15b915c1eb}) of ThingClass shellyEm3 - - + + Power factor (Phase B) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseBPowerFactor, ID: {f56504bb-0c6c-4425-831c-771b23aadf19}) ---------- @@ -1189,14 +1264,14 @@ The name of the StateType ({f56504bb-0c6c-4425-831c-771b23aadf19}) of ThingClass - + Power factor (Phase B) changed The name of the EventType ({f56504bb-0c6c-4425-831c-771b23aadf19}) of ThingClass shellyEm3 - - + + Power factor (Phase C) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseCPowerFactor, ID: {2e2c622f-1575-4d0b-a0c0-78bc03748c1e}) ---------- @@ -1204,27 +1279,27 @@ The name of the StateType ({2e2c622f-1575-4d0b-a0c0-78bc03748c1e}) of ThingClass - + Power factor (Phase C) changed The name of the EventType ({2e2c622f-1575-4d0b-a0c0-78bc03748c1e}) of ThingClass shellyEm3 - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + Powered The name of the ParamType (ThingClass: shellyEm3, ActionType: power, ID: {639dda4c-e354-43ca-a785-fbe6806986e2}) ---------- @@ -1258,8 +1333,14 @@ The name of the StateType ({5b7eeb6c-6113-41f3-a61b-3076d087c9fe}) of ThingClass - - + + Presence detected + The name of the EventType ({45c0cc07-0e13-449c-86a7-ab65d5cdf637}) of ThingClass shellyMotion + + + + + Pressed The name of the EventType ({41498655-1943-4b46-ac36-adea7bafab87}) of ThingClass shellySwitch ---------- @@ -1267,15 +1348,15 @@ The name of the EventType ({25955cb9-dc0e-48dc-91b1-ba27e30a3a3f}) of ThingClass - - - - - - - - - + + + + + + + + + Reboot The name of the ActionType ({162e7791-6890-4075-8e57-a4c15b9359bb}) of ThingClass shellyI3 ---------- @@ -1297,20 +1378,20 @@ The name of the ActionType ({b4067d54-36c5-4d30-bbc3-c8c712d6fd32}) of ThingClas - + Remain awake The name of the ParamType (ThingClass: shellyButton1, Type: settings, ID: {45d4628d-7d8c-43b6-ac86-6232caa5816f}) - + Reset data The name of the ActionType ({87772e43-1bf7-496b-b8be-46db39f71700}) of ThingClass shellyEm3 - - + + Set brightness The name of the ActionType ({f41c93ac-6911-45fc-9221-7dd26bf65fd0}) of ThingClass shellyDimmer ---------- @@ -1318,26 +1399,26 @@ The name of the ActionType ({3f74eb92-d95b-48c2-8ac6-29bea9f65ce3}) of ThingClas - + Set color The name of the ActionType ({6ef7c686-350d-4069-9c41-9b90b3906748}) of ThingClass shellyRgbw2 - + Set color temperature The name of the ActionType ({a32a457f-fdc0-46ce-9106-6f9d4f4a6b16}) of ThingClass shellyRgbw2 - + Set position The name of the ActionType ({86270b8b-bce4-4d8a-9bc9-d72af36b991c}) of ThingClass shellyRoller - - + + Shelly The name of the vendor ({d8e45fc2-90af-492e-8305-50baa1ec4c18}) ---------- @@ -1345,74 +1426,77 @@ The name of the plugin shelly ({6162773b-0435-408c-a4f8-7860d38031a9}) - + Shelly 1 The name of the ThingClass ({f810b66a-7177-4397-9771-4229abaabbb6}) - + Shelly 1L The name of the ThingClass ({20754114-1591-48b5-af2f-8c9966adb7c4}) - + Shelly 1PM The name of the ThingClass ({30e74e9f-57f4-4bbc-b0df-f2c4f28b2f06}) - + Shelly 2 The name of the ThingClass ({f277d3a3-62e0-49c1-90b2-4108578e80bf}) - + Shelly 2.5 The name of the ThingClass ({465efb0d-da68-4177-a040-940c7f451e29}) - + Shelly 3EM The name of the ThingClass ({ba293550-d2af-4463-b973-e1812ab67b96}) - + Shelly Dimmer / Dimmer 2 The name of the ThingClass ({3a1d6fc1-c623-4b45-9c81-1573fcc15f99}) - + Shelly H&T The name of the ThingClass ({cc75be5c-8e34-4f72-a55d-c96e4c85d4be}) - + Shelly I3 The name of the ThingClass ({a4557bcc-bdae-4178-b774-5881a8ae490a}) - - - - - - - - - - - - + + + + + + + + + + + + + Shelly ID - The name of the ParamType (ThingClass: shellyEm3, Type: thing, ID: {a80894d2-dfba-4699-892d-081702b0f1f5}) + The name of the ParamType (ThingClass: shellyMotion, Type: thing, ID: {b92fe8ba-8bfb-4d9a-9fb9-8d55ace8cfb4}) +---------- +The name of the ParamType (ThingClass: shellyEm3, Type: thing, ID: {a80894d2-dfba-4699-892d-081702b0f1f5}) ---------- The name of the ParamType (ThingClass: shellyHT, Type: thing, ID: {b6882bd5-7b1f-447b-9aa7-34aeeb538697}) ---------- @@ -1438,32 +1522,38 @@ The name of the ParamType (ThingClass: shelly1, Type: thing, ID: {1d301dc0-5e48- - + + Shelly Motion + The name of the ThingClass ({a82737bb-f2d6-442e-a468-5acc0a2e4cd7}) + + + + Shelly Plug/PlugS The name of the ThingClass ({22229a6d-2af8-44e0-bea9-310a0f2769ef}) - + Shelly RGBW2 The name of the ThingClass ({17f24cec-e6ed-4abd-9d42-60999f391dba}) - + Shelly button 1 The name of the ThingClass ({3eba6b29-f634-4ade-80a3-2159803373cc}) - + Shelly connected Roller Shutter The name of the ThingClass ({d681a4cb-481a-4469-a49a-e6bbb11eb9c9}) - - + + Shelly connected device The name of the ThingClass ({3bd614e0-72c4-4fbe-8c70-ce6c48d04bce}) ---------- @@ -1471,8 +1561,8 @@ The name of the ThingClass ({512c3c7d-d6a6-4d2a-bccd-83147e5f9a25}) - - + + Shelly connected light The name of the ThingClass ({5ab05c19-71aa-4a85-a02f-a108f039a69a}) ---------- @@ -1480,8 +1570,8 @@ The name of the ThingClass ({62a2d6b8-d70d-45fc-ba8c-1c680282a399}) - - + + Shelly connected power socket The name of the ThingClass ({ae6e55fe-1a0b-43bc-bdfb-605661b96905}) ---------- @@ -1489,58 +1579,60 @@ The name of the ThingClass ({3e13206c-a6cd-49a0-b653-2ccb5bb4bbc1}) - + Shelly switch The name of the ThingClass ({6de35a17-0f54-4397-894d-4321b64c53d1}) - + Short Pressed The name of the EventType ({79648810-b2f4-4aa5-902f-2875242e7bf8}) of ThingClass shellyI3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Signal strength The name of the ParamType (ThingClass: shellyRoller, EventType: signalStrength, ID: {f46c52ce-58dd-4d07-bb69-e8b8719c41bc}) ---------- @@ -1570,6 +1662,10 @@ The name of the ParamType (ThingClass: shellyGeneric, EventType: signalStrength, ---------- The name of the StateType ({e48d19f1-e04b-4c5d-b515-15bb22060607}) of ThingClass shellyGeneric ---------- +The name of the ParamType (ThingClass: shellyMotion, EventType: signalStrength, ID: {ecc61ce2-cb66-47ce-a65c-3b9e43ce6fdc}) +---------- +The name of the StateType ({ecc61ce2-cb66-47ce-a65c-3b9e43ce6fdc}) of ThingClass shellyMotion +---------- The name of the ParamType (ThingClass: shellyEm3, EventType: signalStrength, ID: {0f147c29-aefd-4926-a979-35dfeaec12c0}) ---------- The name of the StateType ({0f147c29-aefd-4926-a979-35dfeaec12c0}) of ThingClass shellyEm3 @@ -1624,26 +1720,27 @@ The name of the StateType ({74c631ed-fc3d-49e8-9dec-99cafa70c559}) of ThingClass - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Signal strength changed The name of the EventType ({f46c52ce-58dd-4d07-bb69-e8b8719c41bc}) of ThingClass shellyRoller ---------- @@ -1659,6 +1756,8 @@ The name of the EventType ({46cd6c28-b59a-4e20-b706-f202c0848b93}) of ThingClass ---------- The name of the EventType ({e48d19f1-e04b-4c5d-b515-15bb22060607}) of ThingClass shellyGeneric ---------- +The name of the EventType ({ecc61ce2-cb66-47ce-a65c-3b9e43ce6fdc}) of ThingClass shellyMotion +---------- The name of the EventType ({0f147c29-aefd-4926-a979-35dfeaec12c0}) of ThingClass shellyEm3 ---------- The name of the EventType ({5088cd2d-8f71-4cfb-a120-4a2d4a84355d}) of ThingClass shellySwitch @@ -1687,11 +1786,14 @@ The name of the EventType ({74c631ed-fc3d-49e8-9dec-99cafa70c559}) of ThingClass - - - + + + + Start firmware update - The name of the ActionType ({f230d689-53f8-4542-9b20-9993b1c2eb27}) of ThingClass shellyEm3 + The name of the ActionType ({17327674-f160-44e1-8a3d-fc2b6e1ee319}) of ThingClass shellyMotion +---------- +The name of the ActionType ({f230d689-53f8-4542-9b20-9993b1c2eb27}) of ThingClass shellyEm3 ---------- The name of the ActionType ({e32aaff9-b2f8-437e-b7b4-5b519d9e5e21}) of ThingClass shellyHT ---------- @@ -1699,14 +1801,14 @@ The name of the ActionType ({87b24064-5db7-4590-a9d8-f6d8fd02ed6e}) of ThingClas - + Status LED enabled The name of the ParamType (ThingClass: shellyButton1, Type: settings, ID: {420298a7-bcf8-4970-951e-f6ee5efa1013}) - - + + Switch The name of the ParamType (ThingClass: shellyI3, EventType: longPressed, ID: {866d6db6-e989-4b19-93c3-cc4aa7453c9e}) ---------- @@ -1714,8 +1816,8 @@ The name of the ParamType (ThingClass: shellyI3, EventType: pressed, ID: {0ed313 - - + + Temperature The name of the ParamType (ThingClass: shellyHT, EventType: temperature, ID: {507e7ca7-e1ab-4e7c-8097-4aedf924f797}) ---------- @@ -1723,14 +1825,14 @@ The name of the StateType ({507e7ca7-e1ab-4e7c-8097-4aedf924f797}) of ThingClass - + Temperature changed The name of the EventType ({507e7ca7-e1ab-4e7c-8097-4aedf924f797}) of ThingClass shellyHT - - + + Total consumed energy The name of the ParamType (ThingClass: shellyEm3, EventType: totalEnergyConsumed, ID: {67050a5a-cc78-4d11-a7d9-a9db528029ff}) ---------- @@ -1738,8 +1840,8 @@ The name of the StateType ({67050a5a-cc78-4d11-a7d9-a9db528029ff}) of ThingClass - - + + Total consumed energy (Phase A) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseATotalEnergyConsumed, ID: {ba25ef68-bb52-4e96-a8fb-137aae966104}) ---------- @@ -1747,14 +1849,14 @@ The name of the StateType ({ba25ef68-bb52-4e96-a8fb-137aae966104}) of ThingClass - + Total consumed energy (Phase A) changed The name of the EventType ({ba25ef68-bb52-4e96-a8fb-137aae966104}) of ThingClass shellyEm3 - - + + Total consumed energy (Phase B) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseBTotalEnergyConsumed, ID: {6636e6a0-e3ca-4654-9506-4302c4e8eed7}) ---------- @@ -1762,14 +1864,14 @@ The name of the StateType ({6636e6a0-e3ca-4654-9506-4302c4e8eed7}) of ThingClass - + Total consumed energy (Phase B) changed The name of the EventType ({6636e6a0-e3ca-4654-9506-4302c4e8eed7}) of ThingClass shellyEm3 - - + + Total consumed energy (Phase C) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseCTotalEnergyConsumed, ID: {452c2159-aa2f-4217-80e5-4b492b69671e}) ---------- @@ -1777,15 +1879,15 @@ The name of the StateType ({452c2159-aa2f-4217-80e5-4b492b69671e}) of ThingClass - + Total consumed energy (Phase C) changed The name of the EventType ({452c2159-aa2f-4217-80e5-4b492b69671e}) of ThingClass shellyEm3 - - - + + + Total consumed energy changed The name of the EventType ({67050a5a-cc78-4d11-a7d9-a9db528029ff}) of ThingClass shellyEm3 ---------- @@ -1795,10 +1897,10 @@ The name of the EventType ({23594959-1cd4-4e23-a7ae-b0b7fbd29daa}) of ThingClass - - - - + + + + Total energy changed The name of the EventType ({a7d88654-7503-474d-9a7c-02150d61a6dc}) of ThingClass shellyRoller ---------- @@ -1810,20 +1912,20 @@ The name of the EventType ({54b0b02e-1dfe-4172-bdfd-8129709e5d9f}) of ThingClass - - - - - - - - - - - - - - + + + + + + + + + + + + + + Total energy consumed The name of the ParamType (ThingClass: shellyRoller, EventType: totalEnergyConsumed, ID: {a7d88654-7503-474d-9a7c-02150d61a6dc}) ---------- @@ -1855,8 +1957,8 @@ The name of the StateType ({23594959-1cd4-4e23-a7ae-b0b7fbd29daa}) of ThingClass - - + + Total returned energy The name of the ParamType (ThingClass: shellyEm3, EventType: totalEnergyProduced, ID: {088cb7df-9187-4206-ae5b-18a00e4f1969}) ---------- @@ -1864,8 +1966,8 @@ The name of the StateType ({088cb7df-9187-4206-ae5b-18a00e4f1969}) of ThingClass - - + + Total returned energy (Phase A) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseATotalEnergyReturned, ID: {34562cd3-b178-4f68-903d-a01e20d0ad76}) ---------- @@ -1873,14 +1975,14 @@ The name of the StateType ({34562cd3-b178-4f68-903d-a01e20d0ad76}) of ThingClass - + Total returned energy (Phase A) changed The name of the EventType ({34562cd3-b178-4f68-903d-a01e20d0ad76}) of ThingClass shellyEm3 - - + + Total returned energy (Phase B) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseBTotalEnergyReturned, ID: {d70a0d1a-cac1-4250-85fa-4859ad2dc947}) ---------- @@ -1888,14 +1990,14 @@ The name of the StateType ({d70a0d1a-cac1-4250-85fa-4859ad2dc947}) of ThingClass - + Total returned energy (Phase B) changed The name of the EventType ({d70a0d1a-cac1-4250-85fa-4859ad2dc947}) of ThingClass shellyEm3 - - + + Total returned energy (Phase C) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseCTotalEnergyReturned, ID: {de248e26-b617-4d22-9175-752e2d695274}) ---------- @@ -1903,28 +2005,28 @@ The name of the StateType ({de248e26-b617-4d22-9175-752e2d695274}) of ThingClass - + Total returned energy (Phase C) changed The name of the EventType ({de248e26-b617-4d22-9175-752e2d695274}) of ThingClass shellyEm3 - + Total returned energy changed The name of the EventType ({088cb7df-9187-4206-ae5b-18a00e4f1969}) of ThingClass shellyEm3 - - - - - - - - - - + + + + + + + + + + Turn on or off The name of the ActionType ({d6adeab6-c91d-44ba-8d01-9b5b9b7368be}) of ThingClass shellySocketPM ---------- @@ -1948,9 +2050,9 @@ The name of the ActionType ({d813b35f-e11e-4783-b3b3-dbecb956ffb5}) of ThingClas - - - + + + Turn on/off The name of the ActionType ({94276bb9-ef68-47ab-8e74-34ebe54b411f}) of ThingClass shelly1l ---------- @@ -1960,16 +2062,16 @@ The name of the ActionType ({5b7eeb6c-6113-41f3-a61b-3076d087c9fe}) of ThingClas - - - - - - - - - - + + + + + + + + + + Turned on or off The name of the EventType ({d6adeab6-c91d-44ba-8d01-9b5b9b7368be}) of ThingClass shellySocketPM ---------- @@ -1993,9 +2095,9 @@ The name of the EventType ({d813b35f-e11e-4783-b3b3-dbecb956ffb5}) of ThingClass - - - + + + Turned on/off The name of the EventType ({94276bb9-ef68-47ab-8e74-34ebe54b411f}) of ThingClass shelly1l ---------- @@ -2005,15 +2107,15 @@ The name of the EventType ({5b7eeb6c-6113-41f3-a61b-3076d087c9fe}) of ThingClass - - - - - - - - - + + + + + + + + + Update firmware The name of the ActionType ({1c677ecb-c54e-4c95-a3f7-e68fabeeda08}) of ThingClass shellyI3 ---------- @@ -2035,30 +2137,36 @@ The name of the ActionType ({6f814339-9a48-4027-a3f8-760742ff22ba}) of ThingClas - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + Update status - The name of the ParamType (ThingClass: shellyEm3, EventType: updateStatus, ID: {8e25bbc2-54d8-4aa1-8ca5-f61b5f17a03b}) + The name of the ParamType (ThingClass: shellyMotion, EventType: updateStatus, ID: {a604a66c-3143-45ce-a6e3-17a339f428ab}) +---------- +The name of the StateType ({a604a66c-3143-45ce-a6e3-17a339f428ab}) of ThingClass shellyMotion +---------- +The name of the ParamType (ThingClass: shellyEm3, EventType: updateStatus, ID: {8e25bbc2-54d8-4aa1-8ca5-f61b5f17a03b}) ---------- The name of the StateType ({8e25bbc2-54d8-4aa1-8ca5-f61b5f17a03b}) of ThingClass shellyEm3 ---------- @@ -2104,19 +2212,22 @@ The name of the StateType ({68bf3780-8f7f-4ecb-8498-830e257c192c}) of ThingClass - - - - - - - - - - - + + + + + + + + + + + + Update status changed - The name of the EventType ({8e25bbc2-54d8-4aa1-8ca5-f61b5f17a03b}) of ThingClass shellyEm3 + The name of the EventType ({a604a66c-3143-45ce-a6e3-17a339f428ab}) of ThingClass shellyMotion +---------- +The name of the EventType ({8e25bbc2-54d8-4aa1-8ca5-f61b5f17a03b}) of ThingClass shellyEm3 ---------- The name of the EventType ({fdda809d-0807-4495-9d50-f9e2a12894ac}) of ThingClass shellyHT ---------- @@ -2140,20 +2251,23 @@ The name of the EventType ({68bf3780-8f7f-4ecb-8498-830e257c192c}) of ThingClass - - - - - - - - - - - - + + + + + + + + + + + + + Username (optional) - The name of the ParamType (ThingClass: shellyEm3, Type: thing, ID: {21e11417-b862-44e6-828f-d65207328630}) + The name of the ParamType (ThingClass: shellyMotion, Type: thing, ID: {ea210ec8-37ed-4479-9454-48cc06a1df88}) +---------- +The name of the ParamType (ThingClass: shellyEm3, Type: thing, ID: {21e11417-b862-44e6-828f-d65207328630}) ---------- The name of the ParamType (ThingClass: shellyHT, Type: thing, ID: {1ea30a6f-5139-4452-8e23-0c525494c9c8}) ---------- @@ -2179,8 +2293,23 @@ The name of the ParamType (ThingClass: shelly1, Type: thing, ID: {fa1aa0f6-93b2- - - + + + Vibration + The name of the ParamType (ThingClass: shellyMotion, EventType: vibration, ID: {76438c2d-9742-4680-9139-d4b4e988cfd2}) +---------- +The name of the StateType ({76438c2d-9742-4680-9139-d4b4e988cfd2}) of ThingClass shellyMotion + + + + + Vibration detected + The name of the EventType ({76438c2d-9742-4680-9139-d4b4e988cfd2}) of ThingClass shellyMotion + + + + + Voltage (Phase A) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseAVoltage, ID: {5977ffab-cdcf-409c-940b-aa0a59de84a5}) ---------- @@ -2188,14 +2317,14 @@ The name of the StateType ({5977ffab-cdcf-409c-940b-aa0a59de84a5}) of ThingClass - + Voltage (Phase A) changed The name of the EventType ({5977ffab-cdcf-409c-940b-aa0a59de84a5}) of ThingClass shellyEm3 - - + + Voltage (Phase B) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseBVoltage, ID: {7c846993-fb06-48ef-987c-7b35d9671070}) ---------- @@ -2203,14 +2332,14 @@ The name of the StateType ({7c846993-fb06-48ef-987c-7b35d9671070}) of ThingClass - + Voltage (Phase B) changed The name of the EventType ({7c846993-fb06-48ef-987c-7b35d9671070}) of ThingClass shellyEm3 - - + + Voltage (Phase C) The name of the ParamType (ThingClass: shellyEm3, EventType: phaseCVoltage, ID: {cd7af1b2-d5f0-4c2e-b85c-84f23ae1fbb9}) ---------- @@ -2218,13 +2347,13 @@ The name of the StateType ({cd7af1b2-d5f0-4c2e-b85c-84f23ae1fbb9}) of ThingClass - + Voltage (Phase C) changed The name of the EventType ({cd7af1b2-d5f0-4c2e-b85c-84f23ae1fbb9}) of ThingClass shellyEm3 - + stop The name of the ActionType ({2266303c-df0c-4eae-b15e-6a86e73c9699}) of ThingClass shellyRoller