-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Huge delay on CLI #48
Comments
Are you experiencing this delay when using the Python API, too? Or is it really just the CLI? Are you using If that's not the case, please set |
I think I am seeing the delay too, but I had put it down to my setup.
(No sudo as don't need it).
I first noticed it a month or so ago iirc.
Just Pi Zero (I use an Google AIY Raspbian image, all up to date).
It take much longer than it used to.
I wonder if a kernel update has altered something.
I'll test with a fresh image later.
…On Sun, 26 Aug 2018, 16:19 Timo Furrer, ***@***.***> wrote:
but when using the CLI there is a 10-20 second delay
Are you experiencing this delay when using the Python API, too? Or is it
really just the CLI?
Are you using sudo when running the CLI tool? If so, can you do a sudo su
and verify that it's not sudo which causes that delay.
If that's not the case, please set W1THERMSENSOR_NO_KERNEL_MODULE=1.
Without this setting it'll always load the w1-gpio and w1-therm kernel
modules when running the CLI.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#48 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALALtxZ3pOrAp1H8gAOq6VQbKzxxuVGoks5uUrxmgaJpZM4WMkEb>
.
|
hmmm, that's strange 🤔 Could you also do something like this: from time import time
from w1thermsensor import W1ThermSensor
sensor = W1ThermSensor()
print(time())
sensor.raw_sensor_value
print(time()) If you are seeing the delay with this, too the problem might be when open / reading the file. |
For me, the delay is strictly with the CLI. Printing the reading to the console every second programmatically works just fine. The huge delay is only when using any operation with the CLI, whether that be a temp reading, listing available sensors, or anything else. I'm not totally sure by what you meant in your first response to do. |
Alright, please try:
do you see the delay here, too? |
for me about 14 seconds (to read two sensors) with that, similar for the
normal method will all
RaspberryPi has all the gubbins loaded up at boot time (normally).
That is to say, no modprobe should be happening on my Pi.
…On Mon, 27 Aug 2018 at 09:50, Timo Furrer ***@***.***> wrote:
Alright, please try:
W1THERMSENSOR_NO_KERNEL_MODULE=1 w1thermsensor ls
do you see the delay here, too?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#48 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALALtxboXuyUMwVfbUCanCzB3PFva3DWks5uU7LDgaJpZM4WMkEb>
.
|
@timofurrer Same delay with that command. |
Could you please do: sudo time ls -l /sys/bus/w1/devices You'll see a directory for each sensor connected to your Pi. Once you spotted the right (maybe even the only) one, can you run the following: (whereas sudo time cat /sys/bus/w1/devices/<THE_SENSOR_DIRECTORY>/w1_slave Please post the output here, including the time infos. |
@Zach443 could you give it a try already? |
sudo: time: command not found So no sudo as not needed. Reading is fine, its the program it seems pi@AIYTankPi:~ $ time w1thermsensor all real 0m18.656s pi@AIYTankPi:~ $ time ls -l /sys/bus/w1/devices real 0m0.052s pi@AIYTankPi:~ $ time cat /sys/bus/w1/devices/28-031561dd98ff real 0m0.022s pi@AIYTankPi:~ $ time cat /sys/bus/w1/devices/28-031561e6d7ff real 0m0.039s |
Just noticed I'm using 1.0.3 it seems Could you update apt so we can use 1.0.5 and see if that fixes it? |
Can you cat the file in the directory you've used? |
Do you mean
Time of <1s seems normal to me. As it should be .75s plus a bit |
Unfortunately, I don't do this apt syncing. I'll ask for the update though! |
Seems pretty good. Can you try do the same from source, so you don't have to wait for apt to be updated with the newest release. |
Bump to remind me to check this (or the other chap @Zach443 |
I'm going to close this, due to inactivity. |
I have a Pi 1, so I'm not sure if this is the cause, but when using the CLI there is a 10-20 second delay on every command. Is this normal? The command output is normal, but the delay seems insane.
The text was updated successfully, but these errors were encountered: