Comments (4)
This is a hobby project for which I unfortunately don't have enough time to document properly. I just wanted to put it out there for people to use in their own hobby projects.
What you will need to start it is npm install
and npm start
. For it to work you will need a configuration file data/config.json
, which looks like this:
{
"deskAddress": "12-34-56-78-90-ab",
"deskPositionOffset": 62,
"deskPositionMax": 65,
"mqttUrl": "mqtt://192.168.1.123",
"mqttUsername": "username",
"mqttPassword": "password"
}
Before it is run, the machine you are running it, should have already been paired once with the desk. When run it will publish the desk position and speed to MQTT at ikea-desk-control/desk-address/status
.
You can find the commands you can send using MQTT to ikea-desk-control/desk-address/command
at the bottom of https://github.com/sroebert/ikea-desk-control/blob/master/src/desk-manager.js. For example, sending a number between deskPositionOffset
and deskPositionOffset + deskPositionMax
will set the height of the desk.
Hopefully this will help you enough to get started.
from ikea-desk-control.
Thank you for getting this info together.With almost no knowledge, I was able to get my device paired and subscribed to the MQTT topic. And I will put more details in this post for someone starting out new. While I can view the device perfectly, I'm having issues with getting the desk to move. I followed what you put in here for subscribing to the topic ikea-desk-control/desk-address/command
At first, I misunderstood desk-address to where I originally used desk-address. However, I then realized when looking through MQTT Explorer that it was desk-"My MAC". However, I can't quite get it to work. I wasn't sure if the word "command" was literally in there or the word command. I tried so many variants here when comparing your JS file:
And I set my offset and position max like this:
"deskPositionOffset": 62, "deskPositionMax": 160,
If you can help me with an exact mqtt publish topic here, that would be greatly appreciated.
from ikea-desk-control.
Sorry for the late reply as I missed this. You need to publish to ikea-desk-control/desk-CA:45:74:C1:A7:7E/command
. You can use:
OPEN
to move all the way upCLOSE
to move all the way downANNOUNCE
to get the latest status- A number to move the desk to that position
from ikea-desk-control.
I have actually rewritten this project in Swift for the Mac (for if you could run it on a Mac). I am using a different way of sending the Bluetooth commands, which make the positioning perfectly accurate, compared to the method used in this repo. (https://github.com/sroebert/IKEADeskControl)
from ikea-desk-control.
Related Issues (2)
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 ikea-desk-control.