Comments (4)
Hey @rtomasik
I don't have a rf bridge device.
Hope someone else can answer that question.
from ewelink-api.
Hi all,
Here my code :
var express = require('express');
var hostname = 'localhost';
var portServer = 6005;
var app = express();
const ewelink = require('ewelink-api');
var request = require('request');
const socket = await connection.openWebSocket
(
async data =>
{
app.get('/sync', function(req, res)
{
( async () =>
{
var device_id = DEVICEID;
var apikey = APIKEY;
var channel = RFCHL;
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.sequence = '' + sequence;
payload.params = {};
payload.params.cmd = 'transmit';
payload.params.rfChl = channel;
var string = JSON.stringify(payload);
socket.send(string);
}
)();
});
)();
var server = app.listen(portServer, hostname, function()
{
var date = new Date();
console.log("Serveur correctement lancé sur http://"+ hostname +":"+ portServer + " Le " + date);
});
I send trought the socket the payload.
I also run a server to send http request
@skydiver any way to add this to your script ?
from ewelink-api.
@foulek57 thank you, i will test it.
@skydiver How to use LAN mode? Everywhere there are examples with logging in through ewelink account.
from ewelink-api.
@rtomasik I have a pull request where I solved the RF Bridge connection
https://github.com/sickao3/ewelink-api
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.