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

How does one use toZigbee.js to set device parameters #688

Closed
mcsSolutions opened this issue Dec 12, 2018 · 5 comments
Closed

How does one use toZigbee.js to set device parameters #688

mcsSolutions opened this issue Dec 12, 2018 · 5 comments
Labels
stale Stale issues

Comments

@mcsSolutions
Copy link

I have DJT11LM that reports accelerometer-based information. toZigbee.js implies that it can be set to high/low/medium sensitivity. What do I do so that zigbee2mqtt sends the desired sensitivity to the device?

/* Note when send the command to set sensitivity, press button on the device to make it wakeup*/
DJT11LM_vibration_sensitivity: {
key: 'sensitivity',
convert: (value, message, type) => {
const cid = 'genBasic';
const attrId = 0xFF0D;

        if (type === 'set') {
            const lookup = {
                'low': 0x15,
                'medium': 0x0B,
                'high': 0x01,
            };
@JLFN
Copy link
Contributor

JLFN commented Dec 13, 2018

Here is a package for home assistant https://paste.ubuntu.com/p/DsP84zGmxv/

@mcsSolutions
Copy link
Author

I believe my question is more basic. What is the general mechanism by which toZigbee.js is used? It is clear that fromZigbee.js is used by zigbee2mqtt when it needs to process information from a device. When and how is toZigbee.js used? Do I set something upon in configuration.yaml or is there another way to communicate with a running zigbee2mqtt to tell it to configure the zigbee device?

I am not a home assistant user so do not recognize how the pasted text is used with it.

@Ton1965
Copy link

Ton1965 commented Dec 13, 2018

In general you need to send an MQTT message to zigbee2mqtt with a special payload. It is described in detail here.

@mcsSolutions
Copy link
Author

Excellent.

I was able send the 'set' and 'get' topics. With low setting for vibration level it seems to be hard to make it report vibration. High setting was easier to induce vibration, but still needed a deliberate degree of movement.

I can also see that the 'get' topic was recognized, but I do not see a response related to sensitivity that was programmed. Is it undecoded in the 'unknown_data' parameter?

zigbee2mqtt:info 2018-12-12 22:55:59 Zigbee publish to '0x00158d0002b23edc', genBasic - read - [{"attrId":65293}] - {"manufSpec":1,"disDefaultRsp":1,"manufCode":4447} - null
zigbee2mqtt:info 2018-12-12 22:55:59 MQTT publish, topic: 'zigbeeWA/0x00158d0002b23edc', payload: '{"angle_x":3,"angle_y":82,"angle_z":8,"angle_x_absolute":87,"angle_y_absolute":8,"linkquality":73,"unknown_data":7733248,"battery":99,"voltage":3025}'

zigbeeWA/0x00158d0002b23edc/get = {"sensitivity":"high"}
zigbeeWA/0x00158d0002b23edc = {"angle_x":3,"angle_y":82,"angle_z":8,"angle_x_absolute":87,"angle_y_absolute":8,"linkquality":73,"unknown_data":7733248,"battery":99,"voltage":3025}

@stale
Copy link

stale bot commented Feb 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale issues label Feb 11, 2019
@stale stale bot closed this as completed Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issues
Projects
None yet
Development

No branches or pull requests

3 participants