idasen-controller icon indicating copy to clipboard operation
idasen-controller copied to clipboard

query the state when in server mode

Open binlan opened this issue 1 year ago • 6 comments

Hi,

i think there is no way currently to get the current hight of the table when it runs in server mode, right? Ok, i could look into the logfile, but It would be nice to be able to curl (or linak-controller) the server for the current status. i run the linak-controller on a raspberry-pi in server mode mounted on the table. i now would like to integrate it in my home automation and therefore it would be helpful to display the state.

what do you think.

thank you.

binlan avatar Jan 05 '24 18:01 binlan

You can run:

linak-controller --forward

to get the current height

rhyst avatar Jan 05 '24 18:01 rhyst

ah, without everything. yes thats help.

thank you

binlan avatar Jan 05 '24 18:01 binlan

No problem, I will leave this issue open as a reminder to put that in the README

rhyst avatar Jan 05 '24 19:01 rhyst

hmm, unfortunately it didnt do the job. if i e.g. move the table by hand, than a linak-controller --server-address my-table --forward move them back to the former position. I think it looks like, the server did not recognize the position change. If i would let my home automation poll with that method, it would make the hand switch unusable.

binlan avatar Jan 05 '24 19:01 binlan

I have connected my desk to my home automation over a REST Api and a (pushing) webhook, which I implemented in my own branch https://github.com/voruti/linak-controller/tree/typescript-rewrite. Maybe this can help you.

voruti avatar Jan 06 '24 07:01 voruti

I am not sure what the problem is. When I move my desk using the physical switch, and run linak-controller (either using server mode or not) then it accurately reports the current height.

rhyst avatar Jan 09 '24 12:01 rhyst