Announcement
Collapse
No announcement yet.
HomeAssistant Discovery
Collapse
X
-
In the last two months, I’ve moved away from HS3 to Home Assistant for everything - except for ZWave management, and don’t plan on doing anything with HS4.
-
Device Type (String) has been depreciated in HS4. It is also a field that is user editable in HS3 so could be problematic for users that have their own purposes for Device Type (String). Have you done anything with HS4?
Leave a comment:
-
I don't have any of these devices on HS3 yet...but will soon and will get you the info when I do. They are valid ZWave command classes and I've seen them on an Ecolink Tilt Sensor for example. The Command Class would show under "Device Type (String)" in the Advanced tab of the device.
Leave a comment:
-
Where do you see Zwave battery or Zwave binary sensor in HS?
Leave a comment:
-
I believe these are the ways HA characterizes some of my devices from zwave2mqtt, but I'm not 100% sure. I got the list below from the HS3 Custom Component page referenced in my earlier post. Also in HA, I see the same type of match up between zwave2mqtt and HA.- Z-Wave Battery (as Home Assistant sensor)
- Z-Wave Sensor Binary (as Home Assistant binary sensor)
- Z-Wave Switch (as Home Assistant switch)
- Z-Wave Switch Binary (as Home Assistant switch)
- Z-Wave Switch Multilevel (as Home Assistant light)
- Z-Wave Temperature (as Home Assistant sensor)
- Z-Wave Relative Humidity (as Home Assistant sensor)
- Z-Wave Luminance (as Home Assistant sensor)
Leave a comment:
-
A simple question. How do you know from HS a Zwave device is a light or motion sensor or anything in particular?
Leave a comment:
-
I'm sorry Michael, I am not familiar enough with the details of Home Assistant and OpenZwave/Zwave2MQTT to answer your questions. I hope others more aware of HA internals can help here.
For now, I'm planning on using the HS3 Custom Component for Home Assistant which uses the pyhs3 library to support HS3 ZWave devices in HA.
Thanks for your continued support and responsiveness.
Leave a comment:
-
Let us work with this example of family room dimmer light and assess what information HS has about it.
First thing in the protocol is topic "homeassistant/X/Y/Z/config where in this case
X = light, Y = family-room-lights, Z =dimmer
I assume family-room-lights is a room and/or floor in the HS context. dimmer is HS device name. The problem element is X or light in this case. The X is the most important part of discovery as it identifies then nature of the device. What mcsMQTT now has implemented for HS3 is the DeviceType property for X. The available choices in HS for DeviceType are shown below. I'm guessing your dimmer device has DeviceType of Plug-In or No_API. How should mcsMQTT identify this device as being a "light"?
Code:Public Enum eDeviceAPI No_API = 0 ' All other devices. Plug_In = 4 ' Device is owned/managed by a plug-in. Thermostat = 16 ' Device is owned/managed by a plug-in and is a thermostat device. Media = 32 ' Device is owned/managed by a plug-in and is a media player device. Security = 8 ' Device is owned/managed by a plug-in and is a security device. SourceSwitch = 64 ' Device is owned/managed by a plug-in and is a matrix switch device. Script = 128 ' Device launches a script when the value and/or string changes. End Enum
Code:Public Property Can_Dim(ByVal hs As IHSApplication) As Boolean This property is largely unused in HS3. When set to True and no other device value/status pairs have been assigned to the device, the default value/status pairs assigned will allow for levels/values from 1 to 99 in addition to 0 (Off) and 100 (On).
Code:ePairControlUse is an Enum used in value/status pairs and has the following values: Public Enum ePairControlUse Not_Specified = 0 _On = 1 _Off = 2 _Dim = 3 _On_Alternate = 4 End Enun
Unique ID from the HS perspective is the Device Reference number. I suspect some variant of this number could be used for the discovery.
Name looks to be a combination of location and name. For HS this would be floor_room_name.
Leave a comment:
-
Originally posted by Michael McSharry View PostI am assuming that you want mcsMQTT to use Homeassistant Discovery protocol to send the definition of HS Zwave devices so HA is able to create devices and integrate with HS.
Originally posted by Michael McSharry View PostWhat specific information is used by HA for what you want to do with it. Standard info is the topic to report status, topic to be used to send commands, type of device (e.g. switch, binary sensor, light) device name and device states. For specific types there is other information such as fan speeds, lights color space, etc.
Current Level of Dimmer
ZWave Central Scene:
Originally posted by Michael McSharry View PostI can focus on Zwave, but still need to know what information is useful to help with the HA integration.
Leave a comment:
-
I am assuming that you want mcsMQTT to use Homeassistant Discovery protocol to send the definition of HS Zwave devices so HA is able to create devices and integrate with HS. What specific information is used by HA for what you want to do with it. Standard info is the topic to report status, topic to be used to send commands, type of device (e.g. switch, binary sensor, light) device name and device states. For specific types there is other information such as fan speeds, lights color space, etc.
mcsMQTT already has HomeAssistant discovery implemented to announce discovery information for devices in HS that have been associated in mcsMQTT. The problem is that it is lame because HS does a very poor job of characterizing devices. There are some provision in HS3 and some in HS4, but they are not the same and seem to be created adHoc based upon what is used by HST plugins.
I can focus on Zwave, but still need to know what information is useful to help with the HA integration.
Leave a comment:
-
I'm not sure of the internals of how zwave2mqtt does the HA Discovery but the result is that MQTT topics (and resultant Home Assistant entities) are created automatically for every ZWave root device and child devices for status and control. I suppose I'm asking for an automated way of doing this integration - but would also like to know how it could be done manually.
Leave a comment:
-
I understand your request at a high level, but I do not know specifically what else mcsMQTT should be doing to support it. Are you asking for mcsMQTT to provide a discovery service for specifically zwave devices in HS? Is there something you cannot do now or is is just a more automated way to setup the integration?
Leave a comment:
-
Hi Michael,
Is it possible with mcsMQTT to do for HS3 ZWave devices what zwave2MQTT does for OpenZwave and Home Assistant Discovery using MQTT.
I'm currently running zwave2mqtt with Home Assistant Discovery and the discovery part works very well, but OpenZwave is not as stable as HS3 is for ZWave. Therefore I would like to use HS3 for ZWave management only but Home Assistant for all automations etc.. mcsMQTT would act as the bridge/gateway between HS3 ZWave devices and Home Assistant.
Leave a comment:
-
Thank you Michael.
Tried it. Not a big issue as I have it configured in HS3 and it is working fine.
SetOption19 1 is what you do at the Console page from Tasmota at the IP of the GDO.
20:25:25 CMD: SetOption19 1
20:25:25 MQT: GarageDoor1/RESULT = {"Command":"Unknown"}
hxxtp://192.168.244.220/cm?cmnd=SetOption19%201
RESULT = {"Command":"Unknown"}
Leave a comment:
-
Pete SetOption19 1 is what you do at the Console page from Tasmota at the IP of the GDO.
I took a look at Zigbee2MQTT's implementation of HomeAssistant discovery and it is different. Below is the disclosure for a Xiaomi Aqara water leak sensor. There were three /config messages. One for binary_sensor and two for sensor. What they have done is a separate topic for each json item being disclosed. These being water_leak, battery, and linkquality. While there is a good attempt to define a protocol by HomeAssistant, the interpretation of this by each developer is different and that makes it difficult for something like mcsMQTT (or HomeAssistant) to recognize the actual disclosure. I understand why it was done this way for Zigbee2MQTT as it wants to disclose all of the items it is reporting while Tasmota and ESPHome only disclosed the primary items. Additional logic will be needed in mcsMQTT to recognize the same state topic being declared for multiple items and these items comprising a json payload set of keys.
Code:9:41:04 PM homeassistant/binary_sensor/0x00158d00026e2bf1/water_leak/config= {"payload_on":true,"payload_off":false,"value_template":"{{ value_json.water_leak }}","device_class":"moisture", "state_topic":"zigbee/0x00158d00026e2bf1", "json_attributes_topic":"zigbee/0x00158d00026e2bf1","name":"0x00158d00026e2bf1_water_leak","unique_id":"0x00158d00026e2bf1_water_leak_zigbee","device":{"identifiers":"zigbee2mqtt_0x00158d00026e2bf1","name":"0x00158d00026e2bf1","sw_version":"Zigbee2mqtt 1.2.1","model":"Aqara water leak sensor (SJCGQ11LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee/bridge/state"} 9:41:04 PM homeassistant/sensor/0x00158d00026e2bf1/battery/config={"unit_of_measurement":"%","device_class":"battery","value_template":"{{ value_json.battery }}", "state_topic":"zigbee/0x00158d00026e2bf1", "json_attributes_topic":"zigbee/0x00158d00026e2bf1","name":"0x00158d00026e2bf1_battery","unique_id":"0x00158d00026e2bf1_battery_zigbee","device":{"identifiers":"zigbee2mqtt_0x00158d00026e2bf1","name":"0x00158d00026e2bf1","sw_version":"Zigbee2mqtt 1.2.1","model":"Aqara water leak sensor (SJCGQ11LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee/bridge/state"} 9:41:04 PM homeassistant/sensor/0x00158d00026e2bf1/linkquality/config={"unit_of_measurement":"-","value_template":"{{ value_json.linkquality }}", "state_topic":"zigbee/0x00158d00026e2bf1", "json_attributes_topic":"zigbee/0x00158d00026e2bf1","name":"0x00158d00026e2bf1_linkquality","unique_id":"0x00158d00026e2bf1_linkquality_zigbee","device":{"identifiers":"zigbee2mqtt_0x00158d00026e2bf1","name":"0x00158d00026e2bf1","sw_version":"Zigbee2mqtt 1.2.1","model":"Aqara water leak sensor (SJCGQ11LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee/bridge/state"}
Leave a comment:
Leave a comment: