I've made some Entities discoveries for AEOTEC Doorbell 6.
Scope: I like to adjust the volume of my bell and use scheduled rules todo so.
What i've done is create the most important bits as custom devices.
My result:
"881-162-3": [
{
"type": "fan",
"object_id": "volumebell1",
"values": ["121-3-2"],
"discovery_payload": {
"command_topic": "121-3-2",
"speed_command_topic": "121-3-2",
"speed_state_topic": "121-3-2",
"state_topic": "121-3-2",
"speeds": ["off", "low", "medium", "high"],
"payload_low_speed": 10,
"payload_medium_speed": 25,
"payload_high_speed": 50,
"payload_off": 0,
"payload_on": 25,
"state_value_template": "{{ value_json.value | int }}",
"speed_value_template": "{{ value_json.value | int }}"
},
{
"type": "fan",
"object_id": "volumebell2",
"values": ["121-4-2"],
"discovery_payload": {
"command_topic": "121-4-2",
"speed_command_topic": "121-4-2",
"speed_state_topic": "121-4-2",
"state_topic": "121-4-2",
"speeds": ["off", "low", "medium", "high"],
"payload_low_speed": 10,
"payload_medium_speed": 25,
"payload_high_speed": 50,
"payload_off": 0,
"payload_on": 25,
"state_value_template": "{{ value_json.value | int }}",
"speed_value_template": "{{ value_json.value | int }}"
}
},
{
"type": "fan",
"object_id": "volumebell3",
"values": ["121-5-2"],
"discovery_payload": {
"command_topic": "121-5-2",
"speed_command_topic": "121-5-2",
"speed_state_topic": "121-5-2",
"state_topic": "121-5-2",
"speeds": ["off", "low", "medium", "high"],
"payload_low_speed": 10,
"payload_medium_speed": 25,
"payload_high_speed": 50,
"payload_off": 0,
"payload_on": 25,
"state_value_template": "{{ value_json.value | int }}",
"speed_value_template": "{{ value_json.value | int }}"
}
}
}
]
Is there better way to do so and/or Template repeated bits?
is there some other type that can support inputing the value in a field?
This device also allows you to update some specific values from a List (the tone) how can I create a Tone selector which can work in Home assistant?
A dropdown list entity
@billiaz Thanks for the info, I have now added internal support for command class 0x79 so now your sound switch will be automatically discovered :) Please remove this customdevices and use latest version from master and confirm me if they are working
My little raspberry pi4 is building every day like Crazy!
@billiaz Are you using the docker way? If so I really suggest you to switch to nodejs if you would like to make the process lot faster!
Using your repo and changing only the Hash. you mean the build container to be nodejs?
Also in your code addition
},
'sound_switch': {
type: 'fan',
object_id: 'sound_switch',
discovery_payload: {
command_topic: true,
speed_command_topic: true,
speed_state_topic: true,
state_topic: true,
speeds: ['off', 'low', 'medium', 'high'],
payload_low_speed: 10,
payload_medium_speed: 25,
payload_high_speed: 50,
payload_off: 0,
payload_on: 25,
state_value_template: '{{ value_json.value | int }}',
speed_value_template: '{{ value_json.value | int }}'
}
}
}
The min/med/high values are personal choice! the volume is from 0-100, would it be better solution to "custom adjust this with another type? like Dimmer !?
What about drop down like switch?
@billiaz I'm not very familiar with hass, could you send me a working configuration for this? Check https://www.home-assistant.io/docs/mqtt/discovery/
I think a dimmer would be the best for this use case but sincerly I don't know what type to use for it.
your example covers the whole sound_switch. But soundswitch has 3 sub types/categories:
121-?-0 - number of available tones (Read only
121-?-1 - List of tones
121-?-2 - Volume 0-100
121-?-3 - Default tone if command has no tone specified
? = action target
Actions:
1 - Browse dones
2 - Tamper
3 - Doorbell 1
4 - Doorbell 2
5 - Doorbell 3
etc...
my example is made for all Volume (121-?-2). Is there way to cover also 121-*-3 with another option?
@billiaz You right: https://github.com/OpenZWave/open-zwave/blob/master/config/Localization.xml#L1575
my example is made for all Volume (121-?-2). Is there way to cover also 121-*-3 with another option?
Yes but what type of control should I create for that?
I am looking. If there is way to create new component for this and work with MQTT might be the only way. Really trying to fit something on this.
@billiaz Let me know if you find a way to support that
@robertsLando what about https://www.home-assistant.io/integrations/binary_sensor.mqtt/#json_attributes_topic
this for the Sound tones and maybe a dimmer or fan for the volume
The fan for the volume is already working, for json attributes it needs a try, but I think json attributes are read only, right?
To clarify.
Instead of FAN, can I use A Dimmer switch to change volume? I could have a scale 10 Dimmer 0-10 and this could translate to 0-100. This way the volume can be set more progressively.
I tried to make it, but with many failures.
@billiaz Unfortunally hass has a really low set of components and some are very difficult to set up.
Have you tried to set up the component manually on hass? Maybe it is easier for tests, check https://selfhostedhome.com/migrating-to-zwave2mqtt-for-home-assistant/. Is shows how to set up alight dimmer that you could use for the fan
I managed to get Dimmer working.
volume is adjustable from 0-100 I created a dimmer with the following setup:
light:
- platform: mqtt
#schema: template
name: "Bell Volume"
command_topic: "zwave2mqtt/MetersBox/DoorBell/121/4/2/set"
brightness_command_topic: "zwave2mqtt/MetersBox/DoorBell/121/4/2/set"
brightness_scale: 100
brightness_state_topic: "zwave2mqtt/MetersBox/DoorBell/121/4/2"
brightness_value_template: "{{ value_json.value }}"
on_command_type: "last"
payload_off: 0
payload_on: 25
This works like charm! now this doorbell has 8 volumes
the topics are: 121-?-2 where ? is 1-8.
Is there a way to create a loop in devices which will create 8 entities?
@billiaz Could you try with latest commit?
@robertsLando reporting soon. but Now I got it how you target specific classes.
compiled with fe9511e0da043b29e9a3561b43b4acf2f1575f5a. Doesn't show any bell on discovered devices (under node)
@billiaz It should show volume dimmers, nope? Do you get any errors in discovery?
z2m web int shows nothing.
log:
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.529 Info, Node011, (121 - COMMAND_CLASS_SOUND_SWITCH) - Compatibility Flags:
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.529 Info, Node011, (121 - COMMAND_CLASS_SOUND_SWITCH) - State Flags:
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.529 Info, Node011, CCVersion: 1
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.529 Info, Node011, InNif: true
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.529 Info, Node011, StaticRequests: 5
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.529 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 1, index 1
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.529 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 2, index 1
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.530 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 3, index 1
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.530 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 4, index 1
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.530 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 5, index 1
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.531 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 6, index 1
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.531 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 7, index 1
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.531 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 8, index 1
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.531 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 1, index 3
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.531 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 2, index 3
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.532 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 3, index 3
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.532 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 4, index 3
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.532 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 5, index 3
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.533 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 6, index 3
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.533 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 7, index 3
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.533 Warning, Value size is invalid (0). Only 1, 2 & 4 supported for node 11, class 0x79, instance 8, index 3
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.534 Info, Node011, (133 - COMMAND_CLASS_ASSOCIATION) - Compatibility Flags:
zwave2mqtt-67c7bbb8f6-p2nt5 z2m 2020-02-21 13:48:03.534 Info, Node011, (133 - COMMAND_CLASS_ASSOCIATION) - State Flags:
@billiaz I mean on hass side
shouldn't the discovered entities show first on Z2M interface?
@billiaz Yes they should be visible in z2m interface also, it's strange you don't see anything could you check the code?
@billiaz Yes they should be visible in z2m interface also, it's strange you don't see anything could you check the code?
i checked the code i checked out and all changes are there. Checked the active container.
Could you add some breakpoints or console.log to see what happens?
I'm not a dev. if you can guide me with some guide for breakpoints.
console.log: the container output is enough or something else?
You should run node --inspect bin/www and open your browser to the link you see in the console. Than go to 貌ib/Gateway and set a breakpoint to the line that creates the sound_switch
More info here: https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.621 Info, Node011, COMMAND_CLASS_MULTI_CHANNEL_ASSOCIATION doesn't support MultiInstance - Not adding Instance
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.621 Info, Node011, Skipping Security_Supported_Get, as the Node is not Secured
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.621 Detail, Node011, Expected reply and command class was received
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.621 Detail, Node011, Message transaction complete
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.621 Detail,
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.622 Detail, Node011, Removing current message
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.622 Detail, Node011, Query Stage Complete (Instances)
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.622 Detail, Node011, AdvanceQueries queryPending=0 queryRetries=0 queryStage=ManufacturerSpecific2 live=1
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.622 Info, Node011, Opening config param file /usr/local/etc/openzwave/aeotec/zw162.xml
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.630 Info, Node011, (112 - COMMAND_CLASS_CONFIGURATION) - Compatibility Flags:
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.630 Info, Node011, (112 - COMMAND_CLASS_CONFIGURATION) - State Flags:
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.630 Info, Node011, CCVersion: 1
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.631 Info, Node011, InNif: true
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.631 Info, Node011, StaticRequests: 5
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.631 Warning, Localization::SetValueItemHelp: Duplicate Item Entry for CommandClass 112, ValueID: 1 (-1) ItemIndex 32: Use the Last Valid Configuration Value for the Light Effect (Lang: )
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.632 Warning, Localization::SetValueItemHelp: Duplicate Item Entry for CommandClass 112, ValueID: 1 (-1) ItemIndex 31: Use Light Effect #7, Defined in Parameter 22 (Lang: )
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.633 Warning, Localization::SetValueItemHelp: Duplicate Item Entry for CommandClass 112, ValueID: 1 (-1) ItemIndex 30: Use Light Effect #6, Defined in Parameter 21 (Lang: )
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.637 Warning, Localization::SetValueItemHelp: Duplicate Item Entry for CommandClass 112, ValueID: 1 (-1) ItemIndex 29: Use Light Effect #5, Defined in Parameter 20 (Lang: )
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.638 Warning, Localization::SetValueItemHelp: Duplicate Item Entry for CommandClass 112, ValueID: 1 (-1) ItemIndex 28: Use Light Effect #4, Defined in Parameter 19 (Lang: )
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.638 Warning, Localization::SetValueItemHelp: Duplicate Item Entry for CommandClass 112, ValueID: 1 (-1) ItemIndex 27: Use Light Effect #3, Defined in Parameter 18 (Lang: )
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.638 Warning, Localization::SetValueItemHelp: Duplicate Item Entry for CommandClass 112, ValueID: 1 (-1) ItemIndex 26: Use Light Effect #2, Defined in Parameter 17 (Lang: )
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.638 Warning, Localization::SetValueItemHelp: Duplicate Item Entry for CommandClass 112, ValueID: 1 (-1) ItemIndex 25: Use Light Effect #1, Defined in Parameter 16 (Lang: )
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.639 Warning, Localization::SetValueItemHelp: Duplicate Item Entry for CommandClass 112, ValueID: 1 (-1) ItemIndex 24: Use the Last Valid Configuration Value for the Tone (Lang: )
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.639 Warning, Localization::SetValueItemHelp: Duplicate Item Entry for CommandClass 112, ValueID: 1 (-1) ItemIndex 19: If you鈥檙e not sure which tone to use, you can configure the value of Tone Play Mode to be 3. Then send Basic Set 0xFF to Endpoint 1 or Root Device to trigger auto-selecting tone function. Chime will play built-in tones randomly and the Default Tone Identifier will be changed each time a new tone is played. When send Basic Set 0x00 to Endpoint 1 or Root Device to stop playing tone, the Default Tone Identifier will store, which means the tone has been selected. Please note that the Tone Play Mode needs to be configured to be 0 or 1 after the tone is selected, otherwise the automatic selection tone function will be retriggered when the Endpoint 1 or Root Device is triggered to play tone and light again. (Lang: )
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.639 Warning, Localization::SetValueItemHelp: Duplicate Item Entry for CommandClass 112, ValueID: 1 (-1) ItemIndex 18: If you鈥檙e not sure which tone to use, you can configure the value of Tone Play Mode to be 2. Then send Basic Set 0xFF to Endpoint 1 or Root Device to trigger auto-selecting tone function. Chime will play built-in tones in order and the Default Tone Identifier will be changed each time a new tone is played. When send Basic Set 0x00 to Endpoint 1 or Root Device to stop playing tone, the Default Tone Identifier will store, which means the tone has been selected. Please note that the Tone Play Mode needs to be configured to be 0 or 1 after the tone is selected, otherwise the automatic selection tone function will be retriggered when the Endpoint 1 or Root Device is triggered to play tone and light again. (Lang: )
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.639 Warning, Localization::SetValueItemHelp: Duplicate Item Entry for CommandClass 112, ValueID: 1 (-1) ItemIndex 17: Use a single loop playback for the Tone (Lang: )
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.640 Warning, Missing default list value or vindex from xml configuration: node 11, class 0x70, instance 1, index 48
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.640 Warning, Missing default list value or vindex from xml configuration: node 11, class 0x70, instance 1, index 49
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.640 Warning, Missing default list value or vindex from xml configuration: node 11, class 0x70, instance 1, index 50
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.640 Warning, Missing default list value or vindex from xml configuration: node 11, class 0x70, instance 1, index 51
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.640 Info, Node011, AddCommandClass - Unsupported CommandClass 0x14
zwave2mqtt-85776d656f-gtdct z2m 2020-02-21 16:55:02.641 Info, Node011, (96 - COMMAND_CLASS_MULTI_INSTANCE/CHANNEL) - Compatibility Flags:
does this help? :) maybe is not what you expect.
Trying my best to perform debuging in container
ignore the previous, rookie mistake
my chrome doesn't stop on breakpoints. I have to find another debugger
@robertsLando I cannot for some reason use breakpoints properly.
Did you make it work someway?
No my chrome is buggy with breakpoints (found people complain) and I am on a cdocker container.
A full debug log using inspect would help?
It could, if there are errors there