Comments (7)
Hello @foulek57
I don't have access to this device so i can't answer your question.
Hope someone else can help with your question.
from ewelink-api.
Is it possible to change the led color of light switches?
In bedroom it would be better if off color were pink and on blue. Easier to sleep.
from ewelink-api.
Hello,
I think have find a way, will do some test and come back to you
from ewelink-api.
Hello,
Have fins a way ans it's work !
Juste need to send over thΓ© socket the json with the value at each color red green blue.
Possible to include it in your code ?
I can give you the complet json I send
from ewelink-api.
foulek57, post the json.
I'm guessing it makes sense to create a new method to configure devices, ie:
- setDeviceConfig()
this would be very similar to:
- setDevicePowerStateMixin()
from ewelink-api.
Hello,
I don't know if they are the same params on all lighting I need the results of getdevice of the LED strip to compare
from ewelink-api.
Here the script I used for, note that I run it with a server and send my request with a http request
`app.get('/wi16/:device_id/:apikey/:r/:g/:b/:lb', function(req, res)
{
(
async () =>
{
var device_id = req.params.device_id;
var apikey = req.params.apikey;
var r = req.params.r;
var g = req.params.g;
var b = req.params.b;
var lb = req.params.lb;
const timeStamp = new Date() / 1000;
const sequence = Math.floor(timeStamp * 1000);
var payload = {};
payload.action = 'update';
payload.userAgent = 'app';
payload.apikey = '' + apikey;
payload.deviceid = '' + device_id;
payload.params = {};
payload.params.lightBcolor = b; // 0-255
payload.params.lightRcolor = r;
payload.params.lightGcolor = g;
payload.params.lightbright = lb; // 0-100%
payload.sequence = '' + sequence;
var string = JSON.stringify(payload);
console.log(string);
res.send(string);
socket.send(string);
}
)();
}); `
Have it in the async function of the socket.
from ewelink-api.
Related Issues (20)
- Install error
- Trouble with getDevicePowerUsage
- How do I know the type of device (Power meter, thermometer, etc.)? HOT 1
- Slow api, ETIMEDOUT, ECONRESET, ECONNREFUSED HOT 14
- problem with setInterval wsp.send('ping') openWebSocket.js HOT 1
- { error: 500, msg: 'SyntaxError: Unexpected token < in JSON at position 0' } HOT 1
- New and Simple REST API with Ready Scripts
- Error 401: Wrong account or password HOT 21
- ewelink
- Unable to install on Raspberry Pi
- THR316 doesn't update
- Unable to use power consumption with sonoff POW Elite HOT 6
- Get Voltage and current on POWR2 device HOT 2
- CoolkIt: Announcement regarding the expiration of the APPID referenced in this project and the cessation of maintenance of the v1 interface, suggesting migration HOT 7
- Error 401: Wrong account or password -- again HOT 54
- Error: 406 { error: 406, msg: 'Authentication failed' } HOT 21
- Support for changing the network indicator led?
- Is There Any PHP Version HOT 1
- error: 401, msg: 'Wrong account or password'
- Sonoff Dual R3 - Power Consumption Issue 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 ewelink-api.