Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neo NAS-AB02B0 (alarm/siren) missing power indication #6428

Closed
70MM13 opened this issue Feb 23, 2021 · 6 comments
Closed

Neo NAS-AB02B0 (alarm/siren) missing power indication #6428

70MM13 opened this issue Feb 23, 2021 · 6 comments
Labels
problem Something isn't working

Comments

@70MM13
Copy link

70MM13 commented Feb 23, 2021

What happened

While fooling around with my new device I think I found a missing feature.
It appears this device is very similar to the Wifi version
Not only has that page a nice list of the alarm sounds, I also noticed the "power type" status:

  • dpId 101 - power type (1 - battery high; 2 - medium; 3 - low; 4 - usb port)

In my debug log I have correct reportings of that id:

Received Zigbee message from 'NEO_siren_alarm', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[0],"type":"Buffer"},"datatype":4,"dp":101,"fn":0,"status":0,"transid":2}' from endpoint 1 with groupID null
Received Zigbee message from 'NEO_siren_alarm', type 'commandSetDataResponse', cluster 'manuSpecificTuya', data '{"data":{"data":[4],"type":"Buffer"},"datatype":4,"dp":101,"fn":0,"status":0,"transid":2}' from endpoint 1 with groupID null

and can confirm the data:0 is on battery and data:4 is on usb power.

So my request is, can we have a reporting on this?

@70MM13 70MM13 added the problem Something isn't working label Feb 23, 2021
@Koenkk
Copy link
Owner

Koenkk commented Feb 24, 2021

You can check if it work by replacing https://github.com/Koenkk/zigbee-herdsman-converters/blob/9162491ef881debca91e365cebe2ed61b2f63d61/converters/fromZigbee.js#L1859
with

            case tuya.dataPoints.neoUnknown1: // 0x0465 [4]
                const lookup = {1: 'battery_high', 2: 'battery_medium', 3: 'battery_low', 4: 'usb'}
                return {power_type: lookup[value]};

See https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html on how to modify devices.js

@70MM13
Copy link
Author

70MM13 commented Feb 24, 2021

Thanks, tried it and works almost correct.
4 for usb is ok but in contrary to the given values I get 0 when on battery power. So it's not clear if 1,2,3 are used or maybe not.
I now have
const lookup = {0: 'battery', 1: 'battery_high', 2: 'battery_medium', 3: 'battery_low', 4: 'usb'}
and am looking for a way to simulate low battery or something :)
edit:
Ok I don't have a regulated power supply but came up with the following:
0 with full batteries (6,4V - 2xCR123A)
1 not seen
2 at 5 V
3 at 3.3 V

So I guess the battery range is 0..3 and 4 for usb. Maybe the following is an option?

const lookup = {0: 'battery_full', 1: 'battery_high', 2: 'battery_medium', 3: 'battery_low', 4: 'usb'}

@Koenkk
Copy link
Owner

Koenkk commented Feb 24, 2021

I'm fine with it, does it work correctly? Then I can add it

@70MM13
Copy link
Author

70MM13 commented Feb 24, 2021

yes, thank you

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Feb 24, 2021
@Koenkk
Copy link
Owner

Koenkk commented Feb 24, 2021

Added, also added battery_low true/false.

Changes will be available in the latest dev branch in a few hours (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html)

@Koenkk Koenkk closed this as completed Feb 24, 2021
@70MM13
Copy link
Author

70MM13 commented Feb 25, 2021

Added, also added battery_low true/false.

Changes will be available in the latest dev branch in a few hours (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html)

Nice, thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants