mitsuhiko / idasen-control

Lets you control IKEA IDÅSEN desks from the command line.
https://www.npmjs.com/package/idasen-control
MIT License
428 stars 24 forks source link

Can't find desk under Mac OS 10.15.4 #3

Open MaxBenChrist opened 4 years ago

MaxBenChrist commented 4 years ago

Hi @mitsuhiko,

thanks for sharing this greattool. I am trying to set this up under Mac OS 10.15.4 with a new idasen desk (which was already paired with the smartphone app).

However, the idasen-control --scan returns

Scanning for desks
Done scanning.
No desks found. Make sure to bring the desk to pairing mode before scanning.

Interestingly, if I start the idasen-control --server, it seems to find a desk but without adress

[2020-06-03T13:38:26.682Z] starting BLE
[2020-06-03T13:38:26.690Z] stateChange poweredOn
[2020-06-03T13:38:26.690Z] Starting scan
[2020-06-03T13:38:33.374Z] Discovered a desk at 
[2020-06-03T13:38:33.375Z] Discovered a desk at 
[2020-06-03T13:38:33.940Z] Discovered a desk at 
[2020-06-03T13:38:33.941Z] Discovered a desk at 
[2020-06-03T13:38:34.252Z] Discovered a desk at 
[2020-06-03T13:38:34.253Z] Discovered a desk at 
[2020-06-03T13:38:34.595Z] Discovered a desk

it only starts discovering the desks if I press the pairing button (see the 5s difference').

any idea how to fix this? I don't have much java script experience unfortunately

Gomez commented 4 years ago

I have a similar problem under linux (debian 10). Desk was found in the gnome bluetooth settings but not with this tool. Is there a way to get more output? Something i can do before scanning to verify ble is working?

yashk commented 4 years ago

My OSX version 10.15.4 (19E287). workaround i tried is installed https://github.com/jnross/Bluetility app and scanned for the devices. the desk showed up and app forced the os for "want to pair pop up" , selected yes. now idasen-control recognised the desk.

[2020-06-26T09:52:54.165Z] starting BLE
[2020-06-26T09:52:54.175Z] stateChange poweredOn
[2020-06-26T09:52:54.175Z] Starting scan
[2020-06-26T09:53:06.554Z] Found configured desk ee-7a-xx-xx-xx-xx
[2020-06-26T09:53:06.558Z] scanStop

[2020-06-26T09:53:35.631Z] received request { op: 'getStatus' }
[2020-06-26T09:53:35.632Z] sending response { ready: true, height: 17.6, pos: 'sitting', sittingTime: 40 }
[2020-06-26T09:54:09.554Z] received request { op: 'getStatus' }
[2020-06-26T09:54:09.554Z] sending response { ready: true, height: 17.6, pos: 'sitting', sittingTime: 65 }
[2020-06-26T09:54:20.048Z] received request { op: 'moveTo', pos: 50 }
[2020-06-26T09:54:29.224Z] dropping response because client disconnected
[2020-06-26T09:54:34.883Z] received request { op: 'moveTo', pos: 17 }
[2020-06-26T09:54:44.223Z] dropping response because client disconnected
[2020-06-26T09:55:56.554Z] received request { op: 'moveTo', pos: 50 }
[2020-06-26T09:56:06.119Z] dropping response because client disconnected
[2020-06-26T09:56:08.383Z] received request { op: 'moveTo', pos: 17 }
[2020-06-26T09:56:17.938Z] dropping response because client disconnected
[2020-06-26T09:57:13.388Z] received request { op: 'getStatus' }
[2020-06-26T09:57:13.388Z] sending response { ready: true, height: 16.7, pos: 'sitting', sittingTime: 15 }
Purii commented 4 years ago

Similar issue with macOS 10.15.5. Table has been connected via phone before. Tried all possible reset / connection triggers: Press Short, Press Long, Hold,..

jeffreylfoster commented 4 years ago

I had a similar issue on 10.15.5. In the end, I installed the linak control basic software (from linak dot com), and it was able to connect to that software. I then used blueutil --paired to get the mac address, disconnected from the linak software on my mac, and was able to then use idasen-control --connect-to [mac address] to connect. It still had status as "desk not ready", but once I ran idasen-control --server, it suddenly worked.

However, the raising and lowering is very jumpy. Goes a random number of centimetres up or down, stops, and then starts back up again. Any suggestion on how to fix that jumpiness?

Gomez commented 4 years ago

I have a similar problem under linux (debian 10). Desk was found in the gnome bluetooth settings but not with this tool. Is there a way to get more output? Something i can do before scanning to verify ble is working?

For me this (done in python) works on linux: https://github.com/rhyst/idasen-controller

rafanime commented 4 years ago

I've managed to get this working no problem on Mac 10.15.5.

[2020-07-03T10:41:05.930Z] stateChange poweredOn
[2020-07-03T10:41:05.931Z] Starting scan
[2020-07-03T10:41:19.729Z] Found configured desk d4-6x-xx-xx-xx-xx
[2020-07-03T10:41:19.731Z] scanStop

Basically this runs the server and disconnects bluetooth giving the server a chance to reconnect to it. Solves it every time for me since my mac was auto-pairing but not letting the server catch the configuration.

Hope this helps

amalbuquerque commented 4 years ago

I had the same problem ("No desks found") after waking up my laptop (Ubuntu 18.04).

The solution was to mimick what @rafanime did on OSX:

Stopping the --server afterwards is OK, since the desk continues to react to idasen-control commands.

marhaupe commented 4 years ago

I just updated to Big Sur and don't have this problem anymore. I can't say for sure that the update was the thing that fixed it for me, but if others report the same, it probably was - let me know.

alexey-danilov commented 3 years ago

For me all the solutions above still do not work reliably. Sometimes I manage to connect to desk:

idasen-control -s height: 21.85 (sitting) time sitting: 10s

Then try to raise it:

idasen-control -m 40 --wait

...just to arrive an nothing:

idasen-control -s height: 21.85 (sitting) time sitting: 25s

In the meanwhile server is emulating some activity: [2021-01-02T20:35:48.457Z] starting BLE [2021-01-02T20:35:48.467Z] stateChange poweredOn [2021-01-02T20:35:48.468Z] Starting scan [2021-01-02T20:35:48.789Z] Found configured desk f7-33-20-04-43-98 [2021-01-02T20:35:48.791Z] scanStop [2021-01-02T20:36:01.050Z] received request { op: 'moveTo', pos: 40 } [2021-01-02T20:36:02.565Z] sending response true (<huh?)