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

HELP PLEASE - HEIMAN smart emergency button model HS1EB-E #1724

Closed
FRFrancisqueti opened this issue Jul 11, 2019 · 2 comments
Closed

HELP PLEASE - HEIMAN smart emergency button model HS1EB-E #1724

FRFrancisqueti opened this issue Jul 11, 2019 · 2 comments
Labels
stale Stale issues

Comments

@FRFrancisqueti
Copy link

Hi Koenk.

I'm having trouble running the HEIMAN smart emergency button model HS1EB-E. Please, could you help me?

I already did the pairing but the SOS function is only in "true", follows database:

{"id":5,"type":"EndDevice","ieeeAddr":"0x000d6f0012061ee7","nwkAddr":45089,"manufId":4619,"epList":[1],"status":"online","joinTime":1562865174,"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,1,3,1280],"outClusterList":[25],"clusters":{}}},"_id":"fOFI0E9PVs4CZlcC"}
{"id":5,"type":"EndDevice","ieeeAddr":"0x000d6f0012061ee7","nwkAddr":45089,"manufId":4619,"manufName":"HEIMAN","powerSource":"Battery","modelId":"SOS-EM","epList":[1],"status":"online","joinTime":1562865174,"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,1,3,1280],"outClusterList":[25],"clusters":{}}},"_id":"fOFI0E9PVs4CZlcC"}
{"id":5,"type":"EndDevice","ieeeAddr":"0x000d6f0012061ee7","nwkAddr":45089,"manufId":4619,"manufName":"HEIMAN","powerSource":"Battery","modelId":"SOS-EM","epList":[1],"status":"online","joinTime":1562865174,"endpoints":{"1":{"profId":260,"epId":1,"devId":1026,"inClusterList":[0,1,3,1280],"outClusterList":[25],"clusters":{"genBasic":{"dir":{"value":1},"attrs":{"65533":1,"zclVersion":1,"appVersion":23,"stackVersion":2,"hwVersion":16,"manufacturerName":"HEIMAN","modelId":"SOS-EM","dateCode":"2018.9.9","powerSource":3,"swBuildId":"1.1.1"}},"genPowerCfg":{"dir":{"value":1},"attrs":{"65533":1,"batteryVoltage":30,"batteryPercentageRemaining":200,"batteryRatedVoltage":32}},"genIdentify":{"dir":{"value":1},"attrs":{"65533":1,"identifyTime":0}},"genOta":{"dir":{"value":2},"attrs":{}},"ssIasZone":{"dir":{"value":1},"attrs":{"65533":1,"zoneState":0,"zoneType":277,"zoneStatus":1,"iasCieAddr":"0x0000000000000000","zoneId":255}}}}},"_id":"fOFI0E9PVs4CZlcC"}

And here the settings in devices.js:

{
zigbeeModel: ['SOS-EM'],
model: 'HS1EB-E',
vendor: 'HEIMAN',
description: 'Smart Emergency Button',
supports: 'sos',
fromZigbee: [fz.heiman_sos],
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.report('ssIasZone', 'zoneStatus', 0, 35, null, cb),
(cb) => device.functional('ssIasZone', 'enrollRsp', {enrollrspcode: 0, zoneid: 255}, cb),
];

        execute(device, actions, callback);
    },
},  

Here fromZigbee.js:

heiman_sos: {
    cid: 'ssIasZone',
    type: 'statusChange',
    convert: (model, msg, publish, options) => {
        const zoneStatus = msg.data.zoneStatus;
        return {
            sos: (zoneStatus & 1) > 0, // Bit 1 = Alarm: sos
            tamper: (zoneStatus & 1<<2) > 0, // Bit 3 = Tamper status
            battery_low: (zoneStatus & 1<<3) > 0, // Bit 4 = Battery LOW indicator
        };
    },
},

Please, I ask for your help. Thank you.

@Koenkk
Copy link
Owner

Koenkk commented Jul 12, 2019

I'm not sure what the problem is, but if you also want to have a publish false, try renaming sos: (zoneStatus & 1) > 0, // Bit 1 = Alarm: sos to click: (zoneStatus & 1) > 0, // Bit 1 = Alarm: sos. (assuming you are using the home assistant integration).

@stale
Copy link

stale bot commented Sep 10, 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 Sep 10, 2019
@stale stale bot closed this as completed Sep 17, 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

2 participants