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

Add support for SmartThings Multipurpose sensor (2018 version) #406

Closed
Fabiancrg opened this issue Apr 17, 2019 · 10 comments
Closed

Add support for SmartThings Multipurpose sensor (2018 version) #406

Fabiancrg opened this issue Apr 17, 2019 · 10 comments

Comments

@Fabiancrg
Copy link
Contributor

Hi,

I have a SmartThings multipurpose sensor and I am trying to add support for this device.
This device should report the following information:

  • Contact (true - false)
  • Temperature
  • Vibration

Currenlty I copied an existing device (multiv4) and it somehow working as I have the contact info and temperature. Unfortunately I don't see any vibration info (need to run the sniffer to check if this is really working).

But I do have some issues:
1- When I open the contact, I get two messages at the same time, one saying "contact false" and the second "contact true".

Apr 17 19:08:38 NUC npm[6299]:   zigbee2mqtt:info 4/17/2019, 7:08:38 PM MQTT publish: topic 'zigbee2mqtt/0x286d97000105d957', payload '{"contact":false,"battery_low":false,"linkquality":120,"temperature":20.83}'
Apr 17 19:08:38 NUC npm[6299]:   zigbee2mqtt:warn 4/17/2019, 7:08:38 PM No converter available for 'IM6001-MPP01' with cid 'ssIasZone', type 'attReport' and data '{"cid":"ssIasZone","data":{"zoneStatus":33}}'
Apr 17 19:08:38 NUC npm[6299]:   zigbee2mqtt:warn 4/17/2019, 7:08:38 PM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
Apr 17 19:08:38 NUC npm[6299]:   zigbee2mqtt:info 4/17/2019, 7:08:38 PM MQTT publish: topic 'zigbee2mqtt/0x286d97000105d957', payload '{"contact":true,"battery_low":false,"linkquality":120,"temperature":20.83}'

2- I also have a message for ssIasZone and I don't know what to do with it, it is logged each time the contact state changes:

Apr 17 19:12:20 NUC npm[6299]:   zigbee2mqtt:info 4/17/2019, 7:12:20 PM MQTT publish: topic 'zigbee2mqtt/0x286d97000105d957', payload '{"contact":true,"battery_low":false,"linkquality":131,"temperature":21.05}'
Apr 17 19:12:20 NUC npm[6299]:   zigbee2mqtt:warn 4/17/2019, 7:12:20 PM No converter available for 'IM6001-MPP01' with cid 'ssIasZone', type 'attReport' and data '{"cid":"ssIasZone","data":{"zoneStatus":32}}'
Apr 17 19:12:20 NUC npm[6299]:   zigbee2mqtt:warn 4/17/2019, 7:12:20 PM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
Apr 17 19:12:20 NUC npm[6299]:   zigbee2mqtt:info 4/17/2019, 7:12:20 PM MQTT publish: topic 'zigbee2mqtt/0x286d97000105d957', payload '{"contact":true,"battery_low":false,"linkquality":131,"temperature":21.05}'

I would like to understand how to configure the different config files for devices but the help page does not exaplain everything in details, where can I find a more complete example ?

Thank you,
Fabian

@Koenkk
Copy link
Owner

Koenkk commented Apr 18, 2019

Can you enable the debug logging? (log_level: debug) and provide the logging again? http://www.zigbee2mqtt.io/configuration/configuration.html

@Fabiancrg
Copy link
Contributor Author

Hi, here is the debug log:

When contact is open:

Apr 19 09:01:31 NUC npm[1172]:   zigbee2mqtt:debug 4/19/2019, 9:01:31 AM Received zigbee message of type 'statusChange' with data '{"cid":"ssIasZone","zoneStatus":33}' of device 'multi' (0x286d97000105d957) of endpoint 1
Apr 19 09:01:31 NUC npm[1172]:   zigbee2mqtt:info 4/19/2019, 9:01:31 AM MQTT publish: topic 'zigbee2mqtt/0x286d97000105d957', payload '{"contact":false,"battery_low":false,"linkquality":139,"temperature":18.71}'
Apr 19 09:01:31 NUC npm[1172]:   zigbee2mqtt:debug 4/19/2019, 9:01:31 AM Received zigbee message of type 'attReport' with data '{"cid":"ssIasZone","data":{"zoneStatus":33}}' of device 'multi' (0x286d97000105d957) of endpoint 1
Apr 19 09:01:31 NUC npm[1172]:   zigbee2mqtt:warn 4/19/2019, 9:01:31 AM No converter available for 'IM6001-MPP01' with cid 'ssIasZone', type 'attReport' and data '{"cid":"ssIasZone","data":{"zoneStatus":33}}'
Apr 19 09:01:31 NUC npm[1172]:   zigbee2mqtt:warn 4/19/2019, 9:01:31 AM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
Apr 19 09:01:31 NUC npm[1172]:   zigbee2mqtt:debug 4/19/2019, 9:01:31 AM Received zigbee message of type 'devChange' with data '{"cid":"ssIasZone","data":{"zoneStatus":33}}' of device 'multi' (0x286d97000105d957) of endpoint 1
Apr 19 09:01:31 NUC npm[1172]:   zigbee2mqtt:info 4/19/2019, 9:01:31 AM MQTT publish: topic 'zigbee2mqtt/0x286d97000105d957', payload '{"contact":true,"battery_low":false,"linkquality":139,"temperature":18.71}'

When contact is closed:

Apr 19 09:01:35 NUC npm[1172]:   zigbee2mqtt:debug 4/19/2019, 9:01:35 AM Received zigbee message of type 'statusChange' with data '{"cid":"ssIasZone","zoneStatus":32}' of device 'multi' (0x286d97000105d957) of endpoint 1
Apr 19 09:01:35 NUC npm[1172]:   zigbee2mqtt:info 4/19/2019, 9:01:35 AM MQTT publish: topic 'zigbee2mqtt/0x286d97000105d957', payload '{"contact":true,"battery_low":false,"linkquality":141,"temperature":18.71}'
Apr 19 09:01:35 NUC npm[1172]:   zigbee2mqtt:debug 4/19/2019, 9:01:35 AM Received zigbee message of type 'attReport' with data '{"cid":"ssIasZone","data":{"zoneStatus":32}}' of device 'multi' (0x286d97000105d957) of endpoint 1
Apr 19 09:01:35 NUC npm[1172]:   zigbee2mqtt:warn 4/19/2019, 9:01:35 AM No converter available for 'IM6001-MPP01' with cid 'ssIasZone', type 'attReport' and data '{"cid":"ssIasZone","data":{"zoneStatus":32}}'
Apr 19 09:01:35 NUC npm[1172]:   zigbee2mqtt:warn 4/19/2019, 9:01:35 AM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
Apr 19 09:01:35 NUC npm[1172]:   zigbee2mqtt:debug 4/19/2019, 9:01:35 AM Received zigbee message of type 'devChange' with data '{"cid":"ssIasZone","data":{"zoneStatus":32}}' of device 'multi' (0x286d97000105d957) of endpoint 1
Apr 19 09:01:35 NUC npm[1172]:   zigbee2mqtt:info 4/19/2019, 9:01:35 AM MQTT publish: topic 'zigbee2mqtt/0x286d97000105d957', payload '{"contact":true,"battery_low":false,"linkquality":141,"temperature":18.71}'

@Fabiancrg
Copy link
Contributor Author

Fabiancrg commented Apr 19, 2019

By the way, here is what I have in the device.js (copied from exiting device 'multiv4'):

{
    zigbeeModel: ['multi'],
    model: 'IM6001-MPP01',
    vendor: 'SmartThings',
    description: 'Multipurpose sensor (2018 model)',
    supports: 'contact',
    fromZigbee: [
        fz.generic_temperature, fz.ignore_temperature_change, fz.st_contact_status_change,
        fz.generic_batteryvoltage_3000_2500, fz.ias_contact_dev_change,
    ],
    toZigbee: [],
    configure: (ieeeAddr, shepherd, coordinator, callback) => {
        const device = shepherd.find(ieeeAddr, 1);
        const actions = [
            (cb) => device.write('ssIasZone', 'iasCieAddr', coordinator.device.getIeeeAddr(), cb),
            (cb) => device.functional('ssIasZone', 'enrollRsp', {enrollrspcode: 0, zoneid: 23}, cb),
            (cb) => device.bind('msTemperatureMeasurement', coordinator, cb),
            (cb) => device.report('msTemperatureMeasurement', 'measuredValue', 30, 600, 1, cb),
            (cb) => device.bind('genPowerCfg', coordinator, cb),
            (cb) => device.report('genPowerCfg', 'batteryVoltage', 0, 1000, 0, cb),
        ];
        execute(device, actions, callback);
    },
},

@Koenkk
Copy link
Owner

Koenkk commented Apr 19, 2019

Please try with, this should fix both 1 and 2 of #406 (comment)

{
    zigbeeModel: ['multi'],
    model: 'IM6001-MPP01',
    vendor: 'SmartThings',
    description: 'Multipurpose sensor (2018 model)',
    supports: 'contact',
    fromZigbee: [
        fz.generic_temperature, fz.ignore_temperature_change, fz.st_contact_status_change,
        fz.generic_batteryvoltage_3000_2500, fz.ignore_iaszone_change, fz.ignore_iaszone_attreport,
    ],
    toZigbee: [],
    configure: (ieeeAddr, shepherd, coordinator, callback) => {
        const device = shepherd.find(ieeeAddr, 1);
        const actions = [
            (cb) => device.write('ssIasZone', 'iasCieAddr', coordinator.device.getIeeeAddr(), cb),
            (cb) => device.functional('ssIasZone', 'enrollRsp', {enrollrspcode: 0, zoneid: 23}, cb),
            (cb) => device.bind('msTemperatureMeasurement', coordinator, cb),
            (cb) => device.report('msTemperatureMeasurement', 'measuredValue', 30, 600, 1, cb),
            (cb) => device.bind('genPowerCfg', coordinator, cb),
            (cb) => device.report('genPowerCfg', 'batteryVoltage', 0, 1000, 0, cb),
        ];
        execute(device, actions, callback);
    },
},

@Fabiancrg
Copy link
Contributor Author

Hi,

I tried it and it's working, I have this now:

Apr 19 21:56:38 NUC npm[23750]:   zigbee2mqtt:debug 4/19/2019, 9:56:38 PM Received zigbee message of type 'statusChange' with data '{"cid":"ssIasZone","zoneStatus":32}' of device 'multi' (0x286d97000105d957) of endpoint 1
Apr 19 21:56:38 NUC npm[23750]:   zigbee2mqtt:info 4/19/2019, 9:56:38 PM MQTT publish: topic 'zigbee2mqtt/0x286d97000105d957', payload '{"battery":"40.00","voltage":2700,"linkquality":141,"temperature":24.18,"contact":true,"battery_low":false}'


Apr 19 21:56:43 NUC npm[23750]:   zigbee2mqtt:debug 4/19/2019, 9:56:43 PM Received zigbee message of type 'statusChange' with data '{"cid":"ssIasZone","zoneStatus":33}' of device 'multi' (0x286d97000105d957) of endpoint 1
Apr 19 21:56:43 NUC npm[23750]:   zigbee2mqtt:info 4/19/2019, 9:56:43 PM MQTT publish: topic 'zigbee2mqtt/0x286d97000105d957', payload '{"battery":"40.00","voltage":2700,"linkquality":141,"temperature":24.18,"contact":false,"battery_low":false}'

I do have this messages too:

Apr 19 21:57:01 NUC npm[23750]:   zigbee2mqtt:debug 4/19/2019, 9:57:01 PM Configuring 0x286d97000105d957 (0x286d97000105d957) ...
Apr 19 21:57:05 NUC npm[23750]:   zigbee2mqtt:debug 4/19/2019, 9:57:05 PM Received zigbee message of type 'readRsp' with data '{"cid":"ssIasZone","data":{"zoneState":1,"zoneType":21,"zoneStatus":33,"iasCieAddr":"0x00124b001936dba2","zoneId":23}}' of device 'multi' (0x286d97000105d957) of endpoint 1
Apr 19 21:57:05 NUC npm[23750]:   zigbee2mqtt:debug 4/19/2019, 9:57:05 PM Received zigbee message of type 'readRsp' with data '{"cid":"ssIasZone","data":{"65533":1}}' of device 'multi' (0x286d97000105d957) of endpoint 1
Apr 19 21:57:34 NUC npm[23750]:   zigbee2mqtt:warn 4/19/2019, 9:57:34 PM Failed to configure 0x286d97000105d957 (0x286d97000105d957) ('Error: Timed out after 30000 ms') (attempt #3)
Apr 19 21:57:34 NUC npm[23750]:   zigbee2mqtt:warn 4/19/2019, 9:57:34 PM This can be ignored if the device is working properly

Device does work properly now so I will ignore it.

Should I introduce a PR for this ?
If yes, what do I have to do to have the device added in the list of supported devices ?

@Koenkk
Copy link
Owner

Koenkk commented Apr 19, 2019

If you make a pr, it will be automatically added to the list of supported devices on the next zig ee2mqtt release.

@Fabiancrg
Copy link
Contributor Author

PR submitted #413

@Koenkk
Copy link
Owner

Koenkk commented Apr 22, 2019

merged, thanks!

@Koenkk Koenkk closed this as completed Apr 22, 2019
@mclaudiopt
Copy link

hi there...it is working on edge version of the addon...but it does not refresh readings...
contact sensor update is immediate but temperature is only refreshed if zigbee2mqtt is restarted. vibration sensor not available....
for me at this time the most important is temperature refresh ...what can i do?

@mclaudiopt
Copy link

hello
i have this error
zigbee2mqtt:warn 5/11/2019, 7:08:44 PM Failed to configure Smarthings MultiSensor (0x286d970001010cd0) ('Error: Timed out after 30000 ms') (attempt #1)

also it only updates if i restart zigbee2mqtt. what can i do?
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants