# Read ACCELEROMETER\_QUERY response in macro

**URL:** <https://klipper.discourse.group/t/read-accelerometer-query-response-in-macro/24015>\
**Category:** General Discussion\
**Created:** [June 26, 2025, 7:16pm UTC](https://klipper.discourse.group/t/read-accelerometer-query-response-in-macro/24015 "2025-06-26T19:16:13Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [June 27, 2025, 2:19am UTC](https://klipper.discourse.group/t/read-accelerometer-query-response-in-macro/24015/5 "2025-06-27T02:19:50Z")

</div>

@bozzo

> [@bozzo](#):
>
> try replacing `sudo pip install ...` with `~/klippy-env/bin/pip install ...`

That did the trick, klipper-repl is now installed in `~/klippy-env/bin`:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/d/7/d7293c07bfe87c3bbed28ed40334278aa2cdc832.png)

Now, I don’t have a link to the Klipper API (or Klipper itself) in the `run` folder:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/a/e/ae730441c4778ff07417c564f099fd44cabf3852.png)

This is important because when I try to run `klipper-repl` with `/run/klipper/api` as suggested in the `klipper-repl` GitHub page, I get:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/8/a/8ae4097bd42262e8f5d617261d109e2a98dcc913.png)

Reading through the `klipper-repl` Discourse announcement:

> [@Announcing klipper-repl: the missing Klipper command line](https://klipper.discourse.group/t/announcing-klipper-repl-the-missing-klipper-command-line/8720):
>
> I’m happy to announce the initial release of [klipper-repl](https://github.com/unjordy/klipper-repl), a command line frontend for Klipper that uses the same socket API as Fluidd and Mainsail to provide an efficient G-Code REPL interface. Its features include: Automatic reconnection if Klipper restarts or is unavailable Support for running G-Code commands as part of shell scripts Multiple G-Code commands per line – use , as a separator Syntax highlighting for both G-Code and user-defined macros Tab autocompletion for use…

I tried using `printer_data/comms/klippy.sock` (which is used there but got the same error as the last post in the thread):

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/a/c/ac317739c7b10ffcfabacb82520bd6c250c2c2b3.png)

Now, I did try restarting the Klipper API (I know I shouldn’t have bothered, but I had to try) using the command:

```auto
~/klippy-env/bin/python ~/klipper/klippy/klippy.py ~/printer_data/config/printer.cfg -a /tmp/klippy_uds -l /tmp/klippy.log`

```

This is from the Klipper API page:

> **[API server - Klipper documentation](https://www.klipper3d.org/API_Server.html)**

I changed the `printer.cfg` location to match what was in the system.

I’m guessing I’m not providing the correct link to the Klipper API Socket, but I have no idea where it is.

Any ideas for next steps?

Thanx.

---

_[View the full topic](https://klipper.discourse.group/t/read-accelerometer-query-response-in-macro/24015)._
