Monoprice amp uses root device as power for each zone.
Announcement
Collapse
No announcement yet.
New HomeSeer Mobile and plugins
Collapse
X
-
I have no plans to change anything existing.
It looks like it would be simple to add more enums to the device types, that would not break anything as I doubt anyone is adding their own types there since we provide the API.
I will take a stab at the change and post it here for review.
To address another comment, I think it does make sense to allow the user to edit the device types, then he could, for example, specify devices that are battery devices without updating plugins, etc.
The sub type is plugin specific (we do not document what goes there), so I will not be touching that.
Originally posted by rmasonjr View PostYes - definitely using the subtype for thermostats:
DT = New DeviceTypeInfo
DT.Device_API = DeviceTypeInfo.eDeviceAPI.Thermostat
DT.Device_Type = DeviceTypeInfo.eDeviceType_Thermostat.Setpoint
DT.Device_SubType = DeviceTypeInfo.eDeviceSubType_Setpoint.Heating_1
dv.DeviceType_Set(hs) = DT
Changing that would likely break HSTouch and Amazon's connected home api...
Comment
-
For My insteon plugin, here is a sample of devices. There is a battery device included as well in the motion sensor.
I don't create any generic 'root' devices that do nothing. The primary root device is the main insteon device (identified as :1 in the Address field) which does have controls. see the screen shots below.
i don't do anything unique with .device_api, or .device_type. see below
Dim DT As New DeviceTypeInfo
DT.Device_API = DeviceTypeInfo.eDeviceAPI.Plug_In
DT.Device_Type = HomeSeerAPI.DeviceTypeInfo.eDeviceAPI.Plug_In
dv.DeviceType_Set(hs) = DTMark
HS3 Pro 4.2.19.5
Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD
Comment
-
Originally posted by rjh View PostWe are trying to simplify the UI. So the root device will be used just a name for the device, and the child devices are status/control. If we know what the child is (like battery), we simply display a battery icon on the top of the view. Same goes for items like power, central scene (paddle taps), and z-wave notifications such as Door Open, or Motion. As you can imagine, this greatly condenses the UI and gives a more consistent look. See attached pic for what it looks like so far.
In the image below, the "Assa Abloy..." is the name of the Root device, children with controls are listed next, then children with just status are in a list under "more".
So I really don't want to support controls on the root device.
Comment
-
My different plugins do set Device_Type and for some devices Device_SubType including using custom types when non of the predefined are suitable.
Enabling users to change these will break my plugin functionality. If editable by users a new property would be best as mrhappy suggested.
PHP Code:DT.Device_API = eviceTypeInfo.eDeviceAPI.Thermostat, DeviceTypeInfo.eDeviceAPI.Media, or DeviceTypeInfo.eDeviceAPI.Plug_In
DT.Device_Type = Predefined if suitable or custom values especially for DeviceTypeInfo.eDeviceAPI.Plug_In
DT.Device_SubType = Used in some cases, using predefined if suitable or custom values especially especially for DeviceTypeInfo.eDeviceAPI.Plug_In
Comment
-
Originally posted by rjh View PostWe are working on a new mobile app and have a few issues to work out. The app displays common items in a special way, like battery status and notifications. However, currently we using the Z-Wave device type for this which obviously will not work for other technologies.
Is anyone populating the current device type property in the device class in their plugin?
Also, we would like to force root devices to not allow controls. Other than Sonos, is anyone adding controls to their root devices?
Yes the JowiHue plugin is having controls to the root device. Depending to the type of Zigbee device, the root device is allowing off/on or dim commands or showing the state of a sensor. Why should a root device have no controls? If it only represents a name, it looks like a device without much use? Why would you need this?
Wim-- Wim
Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData
1210 devices/features ---- 392 events ----- 40 scripts
Comment
-
Rich,
Also I should add I make extensive use ot the devicetypeinfo to determine the type of Zigbee device used. Would not be happy to change this.
Wim-- Wim
Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData
1210 devices/features ---- 392 events ----- 40 scripts
Comment
-
It is clear that many plugins are adding controls to the Root device, so we are going to expose those controls in HomeSeer Mobile. However, we are using the root device as the primary name for the device, and the children listed under that. This will not break anything, and it will make the UI cleaner. It may force some users to rename some of their devices do they easier to find.
In regards to the "Device_Type" property, it is clear that even if I add more enum values to eDeviceType, that is going to break many plugs since you cannot add more than one type to a device. Ideally, the existing values set to eDeviceAPI and Device_Type need to remain and another property needs to exist that all plugins can use. For example, some plugins have defined their own sub type for things like Luminance (something we never defined), but we need a defined property for this that all plugins can set.
I will see where I can add this that does not break the existing API.
Comment
-
Originally posted by rjh View PostWe are working on a new mobile app and have a few issues to work out. The app displays common items in a special way, like battery status and notifications. However, currently we using the Z-Wave device type for this which obviously will not work for other technologies.
Is anyone populating the current device type property in the device class in their plugin?
Also, we would like to force root devices to not allow controls. Other than Sonos, is anyone adding controls to their root devices?
2. I populate the "Device Type" string property.Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin
Comment
-
Maybe I don't fully understand the problem but couldn't you just create an object that contains any information that you need and serialize it into PED for a root device? Monoprice amp stores things like baud rate in a serialized object and that is then available to the plug-in and Homeseer remotely and locally and can even be exposed to the user for customization. Upon Homeseer start if the object or device doesn't exist it is created and loaded with default values. Unless a plug-in author is creating and destroying root devices on the fly the data should persist. Even then you could check for the object when a plug-in calls for a new dev_ref and populate it based on what homeseer already knows about that particular Interface name.
just spit balling.
Comment
-
Originally posted by rjh View PostWe are working on a new mobile app and have a few issues to work out. The app displays common items in a special way, like battery status and notifications. However, currently we using the Z-Wave device type for this which obviously will not work for other technologies.
Is anyone populating the current device type property in the device class in their plugin?
Also, we would like to force root devices to not allow controls. Other than Sonos, is anyone adding controls to their root devices?
Comment
-
I think this has been well covered by others but will chip in. Both my plugins do create controls on the root device. They also both use device type and subtype. One is a thermostat plugin using the Thermostat API and the other is a security panel plugin using the Security API.
Insteon Thermostat
Code:[FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] DT [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]As [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]DeviceTypeInfo[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] = [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]New [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]DeviceTypeInfo [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]DT.Device_API = [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]DeviceTypeInfo[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]eDeviceAPI[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].Thermostat DT.Device_Type = [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]DeviceTypeInfo[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]eDeviceType_Thermostat[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].Setpoint DT.Device_SubType = [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]DeviceTypeInfo[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]eDeviceSubType_Setpoint[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].Heating_1 dv.DeviceType_Set(hs) = DT[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] [FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]dv.Device_Type_String(hs) = [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515]"TSTAT"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] & TSTAT_HEAT_SUFFIX [/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT]
Code:[FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] DT [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]As [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]DeviceTypeInfo[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] = [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]New [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]DeviceTypeInfo [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]DT.Device_API = [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]DeviceTypeInfo[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]eDeviceAPI[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].Security DT.Device_Type = [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]DeviceTypeInfo[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]eDeviceType_Security[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].Arming [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]Select[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]Case[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] aNum [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]Case[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] 1 DT.Device_SubType = [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]DeviceTypeInfo[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]eDeviceSubType_SecurityArea[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].PRIMARY [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]Case[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] 2 DT.Device_SubType = [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]DeviceTypeInfo[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]eDeviceSubType_SecurityArea[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].Area_Partition_2 [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]Case[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2] 3 DT.Device_SubType = [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]DeviceTypeInfo[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].[/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]eDeviceSubType_SecurityArea[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2].Area_Partition_3 [/SIZE][/FONT][/SIZE][/FONT]...etc... [FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]dv.DeviceType_Set(hs) = DT[/SIZE][/FONT][/SIZE][/FONT] [FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]dv.Device_Type_String(hs) = [FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515]"Napco Area"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT] [/SIZE][/FONT][/SIZE][/FONT]
HS 3.0.0.435 (PRO)
Hardware: Napco GEM-P9600 | VenstarT1800 w/Insteon 2441V adapter | Insteon PLM
Plugins HS3: Napco Gemini (mine) | Insteon Thermostat (mine) | Insteon Plug-in (mnsandler) | HSTouch Server (HST)
Platform: Windows 10 Pro 64bit, core2 duo 2.0Ghz, 4GB memory
http://www.kazteel.com/
Comment
Comment