Open apadilla83 opened 3 years ago
I have the same issue. Were you able to find a solution?
Nothing , I have to use the api over internet to work witch 2 channels devices....Nobody answer....
I figured it out. You must execute these only once in your app.
devicesCache = await Zeroconf.loadCachedDevices();
arpTable = await Zeroconf.loadArpTable();
/* create the connection using cache files */
connection = new ewelink({ devicesCache, arpTable });
I set them up to execute during startup of my app, and use connection
as singleton. The problem was fixed.
I figured it out. You must execute these only once in your app.
devicesCache = await Zeroconf.loadCachedDevices(); arpTable = await Zeroconf.loadArpTable(); /* create the connection using cache files */ connection = new ewelink({ devicesCache, arpTable });
I set them up to execute during startup of my app, and use
connection
as singleton. The problem was fixed.
This Work!! many thanks!!
Can you please paste a sniplet? Can‘t get it to work with a Pro 4Channel :-(
I fixed this by changing this /src/mixins/setDevicePowerState.js line 48
if (switches) {
params.switches = switches.filter(sw => sw.outlet === channel - 1)
params.switches[0].switch = stateToSwitch;
} else {
params.switch = stateToSwitch;
}
it was sending the signal to switch all of the channels
Hi, xajis, This work for me. Thanks!
Happy to help :) this was bugging me for a long time..
Hi, when I turn on second channel on sonoff device, if firts channel are on, siwtch to off the firts channel and on the second channel. There any way to change this behaviour?
Thanks