NAS-AB02 Siren: Unable to set volume

I recently got this zigbee sire. I’m new to these edge driver but I was able to find this post and installed the suggested driver

I can get most of the things to work (change duration, change melody, make the siren sound (always both the siren and the lights, but that’s ok for me), but I can’t adjust the volume. Looking at some other places it seems it only handles discretes values (low, medium and high), but what I get in the app is a slider from 0 to 100. I suspect it is now stuck to low, as the volume was higher when I just paired it (it went down as I was changing settings like the melody)

Appreciate any ideas. TIA

It is defined to 0 (low), 50 (medium) and 100 (high)

The capability was developed to work with both data types, enum for discrete values and integer otherwise.

If it is not working, logs taken from smartthings-cli will help to identify the problem.

Hi, thanks for the reply. I just installed the cli, so I’m not sure how to debug yet. I did notice I could run a SetVolume command, but the volumen remains = 0% (which is what I see in the GUI)

 smartthings devices:commands [redacted]

Alarm

Capabilities:
───────────────────────────
 1  alarm
 2  audioVolume
 3  battery
 4  signalStrength
 5  refresh
 6  valleyboard16460.debug
───────────────────────────

? Enter capability index or id 2

Commands:
───────────────────────────────
 1  volumeDown()
 2  volumeUp()
 3  setVolume(volume<integer>)
───────────────────────────────

? Enter command 3
? Enter command arguments (volume) 100
Command executed successfully
PS C:\Users\[redacted]> smartthings devices:capability-status 1
───────────────────────────
 #  Id
───────────────────────────
 1  alarm
 2  audioVolume
 3  battery
 4  refresh
 5  signalStrength
───────────────────────────
 6  valleyboard16460.debug
───────────────────────────
? Select a capability. 2
──────────────────
 Attribute  Value
 volume     0 %
──────────────────

edit: after enabling SMARTTHINGS_DEBUG=true, the command part show this:

? Enter command arguments (volume) 100
[2023-12-03T15:37:34.985] [DEBUG] login-authenticator - authentication - enter
[2023-12-03T15:37:34.985] [DEBUG] rest-client - making axios request: {"url":"https://api.smartthings.com/devices/[redacted]/commands","method":"post","headers":{"Content-Type":"application/json;charset=utf-8","Accept":"application/json","User-Agent":"@smartthings/cli/1.8.1 win32-x64 node-v18.5.0","Accept-Language":"en-US","Authorization":"Bearer [redacted]"},"data":{"commands":[{"component":"main","capability":"audioVolume","command":"setVolume","arguments":[100]}]}}
Command executed successfully

ok, I found some more interesting logs after checking some of the issues in github (I learned about logcat). I got an error:

2023-12-03T23:07:01.291969386+00:00 TRACE Personal Tuya Devices - main  Received event with handler zigbee
2023-12-03T23:07:01.293572918+00:00 INFO Personal Tuya Devices - main  <ZigbeeDevice: [redacted] [0xB82B] (Alarm)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xB82B, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: TuyaEF00 >, lqi: 0x88, rssi: -74, body_length: 0x000A, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x19, seqno: 0x27, ZCLCommandId: 0x01 >, < DataResponseClient || transid: 0x005A (BE), < DatapointSegment || dpid: 0x05, DatapointSegmentType: Enum, length: 0x0001 (BE), value: 0x64 > > > >
2023-12-03T23:07:01.332083319+00:00 TRACE Personal Tuya Devices - main  Found ZigbeeMessageDispatcher handler in personal-tuya-devices -> GenericEF00 -> Model
2023-12-03T23:07:01.350746317+00:00 INFO Personal Tuya Devices - main  Executing ZclClusterCommandHandler: cluster: TuyaEF00, command: DataResponseServer
2023-12-03T23:07:01.352080649+00:00 ERROR Personal Tuya Devices - main  Alarm thread encountered error: [string "st/dispatcher.lua"]:233: Error encountered while processing event for <ZigbeeDevice: [redacted] [0xB82B] (Alarm)>:
    arg1: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xB82B, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: TuyaEF00 >, lqi: 0x88, rssi: -74, body_length: 0x000A, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x19, seqno: 0x27, ZCLCommandId: 0x01 >, < DataResponseClient || transid: 0x005A (BE), < DatapointSegment || dpid: 0x05, DatapointSegmentType: Enum, length: 0x0001 (BE), value: 0x64 > > > >
[string "st/dispatcher.lua"]:233: Error encountered while processing event for <ZigbeeDevice: [redacted] [0xB82B] (Alarm)>:
    arg1: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xB82B, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: TuyaEF00 >, lqi: 0x88, rssi: -74, body_length: 0x000A, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x19, seqno: 0x27, ZCLCommandId: 0x01 >, < DataResponseClient || transid: 0x005A (BE), < DatapointSegment || dpid: 0x05, DatapointSegmentType: Enum, length: 0x0001 (BE), value: 0x64 > > > >
[string "st/dispatcher.lua"]:233: Error encountered while processing event for <ZigbeeDevice: [redacted] [0xB82B] (Alarm)>:
    arg1: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xB82B, src_endpoint: 0x01, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: TuyaEF00 >, lqi: 0x88, rssi: -74, body_length: 0x000A, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x19, seqno: 0x27, ZCLCommandId: 0x01 >, < DataResponseClient || transid: 0x005A (BE), < DatapointSegment || dpid: 0x05, DatapointSegmentType: Enum, length: 0x0001 (BE), value: 0x64 > > > >
[string "st/capabilities/init.lua"]:226: Invalid value for Audio Volume.volume value: {value={}} error: Given table for value. Required type is a number
1 Like

@AlejandroPadilla , do you know if there is any chance to publish one of the latest releases ?

The last one was v6_49X

I think the error is related to one of the latest releases.
It is fixable without the release, but I would be able to make sure that it is a recent bug or not.
I have a unit test specific for audioVolume capability that will tell me this for sure.

Interesting enough, the device is sending value 100 ( 0x64 ) instead of any acceptable discrete values (0, 1 or 2).

The driver is expecting to receive a discrete value and that is causing the error.

The only thing I can think of this happen is if you tried to change the profile to some incompatible device and it “corrupted” the data stored by the device.

Can you test it by installing the driver from the beta channel ?

https://bestow-regional.api.smartthings.com/invite/VbMb856WP8lB

with the beta driver I’m able to set the volume! Thanks! :slight_smile:

1 Like

Hello everyone, I want to let you know that we already reported the situation to the engineering team. I will post updates as soon as they appear.

2 Likes

There wasn’t any problem with the firmware, thanks for helping.
I was sending an empty value to the capability when the value received from zigbee were out of expected (0, 1, 2). So it was a problem in my driver.

I asked for the current release just because I wanted to make sure whether the issue was old or not.
Also, I always like to run the unit tests using the later version, and I can’t do this without a public release.

2 Likes

Hey @w35l3y, I have another tuya device a 3-in-1 sensor/button.. I couldn’t find it in the supported devices in your driver. Anything I could do to help to get it included? I’ve already forked your repo, but I’m not really sure where to begin. Thanks!

Hello @w35l3y, thank you for the updates.

1 Like

If your device uses EF00 cluster…

As developer:

As user:

Thanks, I managed to get a child button going (single tap, double tap and hold). Also a child illumance (only two values though, either 0 (dark) or 231(light). I’m not sure yet how to get presence

I found this on the zigbee2mqtt repo. Reading about how to add it to the repo