Comments (5)
@marc-gist that online/offline state is not accurate, if you can control the device, you can ignore this.
from zigbee-herdsman-converters.
Well, solved my own question: please check and see if i did this right (sorry, didn't do in git forked yet, please add from here if you are willing).
devices.js
// smartthings
{
zigbeeModel: ['outlet'],
model: 'IM6001-OTP05',
vendor: 'Samsung',
description: 'Smartthings Outlet',
supports: 'on/off',
fromZigbee: [fz.samsung_outlet, fz.samsung_outlet_report],
toZigbee: [tz.samsung_on_off],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 1);
const cfg = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
const actions = [
(cb) => device.bind('genOnOff', coordinator, cb),
(cb) => device.foundation('genOnOff', 'configReport', [cfg], foundationCfg, cb),
];
execute(device, actions, callback);
},
},
fromZigbee.js
samsung_outlet: {
cid: 'genOnOff',
type: 'devChange',
convert: (model, msg, publish, options) => {
//console.log(msg.data);
return {state: msg.data.data.onOff === 1 ? 'ON' : 'OFF'};
},
},
samsung_outlet_report: {
cid: 'genOnOff',
type: 'attReport',
convert: (model, msg, publish, options) => {
return;
},
},
toZigbee.js
samsung_on_off: {
key: ['state'],
convert: (key, value, message, type, postfix) => {
const cid = 'genOnOff';
const attrId = 'onOff';
let state = value.toLowerCase();
if (state === 'on' ) {
state = 1;
} else if ( state === 'off' ) {
state = 0;
} else {
return;
}
if (type === 'set') {
if (typeof value !== 'string') {
return;
}
return {
cid: cid,
cmd: state,
cmdType: 'functional',
zclData: {
},
cfg: cfg.default,
};
} else if (type === 'get') {
return {
cid: cid,
cmd: 'read',
cmdType: 'foundation',
zclData: [{attrId: zclId.attr(cid, attrId).value}],
cfg: cfg.default,
};
}
},
},
So "get" doesn't do anything... not sure why, but do i care?
from zigbee-herdsman-converters.
added pull request on cleaned up code and fork. #286
from zigbee-herdsman-converters.
An issue I found... seems as though the plug doesn't act as a router, even though its labeled as one in the logs and on the admin. If i fetch a network map it shows as offline
from zigbee-herdsman-converters.
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.
from zigbee-herdsman-converters.
Related Issues (20)
- Proposal: Don't enable legacy mode by default HOT 5
- Sonoff ZBMINIL2 firmware update HOT 2
- Paulmann 500.67 RGB-CCT remote control not recognized HOT 1
- The Philips Bulb 9290018216 was found as Philips Bulb 8718699673147 "Wrong recognition" HOT 1
- Unable to clear schedule of Sonoff TRVZB
- Select exposed device functions based on the version number HOT 4
- QBKG18LM config no left and right endpoint definition despite the switch being double rocker HOT 4
- Lumi TRV RangeError on post-pairing empty buffer message HOT 1
- Add light switch - TS0601 - vendor '_TZE204_aagrxlbd' HOT 1
- SchneiderElectric Indicator Mode not working HOT 1
- LDSENK02S DonT display Voltage or Current HOT 12
- TuYa BAC-002 HOT 2
- [Feature request]: Request to control the attributes "onOffTransitionTime", "onLevel", "options" of the "LevelCtrl" cluster using exposes for ikea devices. HOT 1
- Phillips Hue Tap Dial Switch does not expose all attributes
- Template for new device `TS0601_TZE200_wbhaespm` HOT 1
- Proposal: deprecation of legacy clicks HOT 2
- Cloud you please Help me to add ts0601 tze204_nirfgpny to Zigbee2MqTT
- New device support - GiEX Water Valve GX02 HOT 1
- New device template for `_TZE204_dvosyycn` HOT 7
- Support for new Tradfri LED2111G6 lightbulbs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zigbee-herdsman-converters.