rand256 / valetudo

Valetudo RE - experimental vacuum software, cloud free
Apache License 2.0
667 stars 73 forks source link

RE 0.8.2 / telegram bot #232

Open jcplu opened 4 years ago

jcplu commented 4 years ago

Hello, Telegram bot was working ... but now, nothing happens when I send a command from my phone (working from my pc). Also, I receive the messages from the robot to my phone. Thx for your help.

rand256 commented 4 years ago

I'd guess that's because robot's internal time is out of sync. Anyway your valetudo version is out of date.

jcplu commented 4 years ago

Thanks for your help, it was the internal time. I keep this version, because I prefer Telegram with command line. How can I add an automatic sync command to avoid this problem ?

rand256 commented 4 years ago

It should probably sync by default at every boot at least - if only the device has unrestricted internet access. I didn't look into that deeply, as that's not valetudo's duty, it should be done already by base firmware.

jcplu commented 4 years ago

reboot command didn't solve the problem.

jcplu commented 4 years ago

the command hwclock -s solved partially the problem after a reboot, time has two minutes more

p4f456 commented 4 years ago

Hello, I think I face a similar issue here. Created 2 different Telegram bots but when trying to add the Token in Valetudo I always receive Telegrambot connection failed. Anything I did miss?

pidator commented 4 years ago

You're also still on 0.8.2? Then the same advice @rand256 has given before: check the time of the linux system!

Btw: why two different bots?

p4f456 commented 4 years ago

No actually I am on 0.9.4. I tried it with one bot and as it did not work I tried a second one as I thought I did a mistake during creation or with the token. But still I get this error

pidator commented 4 years ago

No actually I am on 0.9.4.

Then your issue isn't releated to this one. Please open a new issue and provide all the data/settings/versions/steps you've done and describe your error in detail. Otherwise these two issues get mixed and they definitely aren't related.

pidator commented 4 years ago

after a reboot, time has two minutes more

Do you use an NTP Server?

jcplu commented 4 years ago

NTP server command works but doesn't fix the problem. I check many times : the hardware clock is OK but the system time is 2 minutes more. I finally added in crontab file the command hwclock -s : every 6 hours and it's now OK.

tchleb commented 4 years ago

NTP server command works but doesn't fix the problem. I check many times : the hardware clock is OK but the system time is 2 minutes more. I finally added in crontab file the command hwclock -s : every 6 hours and it's now OK.

How do add the crontab file? When i try crontab -e i got this error crontab: can't change directory to '/etc/crontabs': No such file or directory

jcplu commented 3 years ago

You can use winscp with root and rsa private key file

bmwm69 commented 3 years ago

Hello

I still with that issue with version 10.7 . Its possible check status and other things with telegram but dont receive any waring or complete cleanup , consumables .

pidator commented 3 years ago

You'll probably have to "activate" the status messages using the speaker symbol of the bot-keyboard.

bmwm69 commented 3 years ago

Status notifications enabled - Check

Configuration page:

Which status changes to notify about - All - Check

Version : Gen1

pidator commented 3 years ago

Which status changes to notify about - All - Check

Do you tried setting an other value, save and set back to all and save again?

jcplu commented 3 years ago

robot's internal time is out of sync

1) run the command hwclock --show

2) run the command date

send the results here

bmwm69 commented 3 years ago

Which status changes to notify about - All - Check

Do you tried setting an other value, save and set back to all and save again?

Yes !

robot's internal time is out of sync

  1. run the command hwclock --show
  2. run the command date

send the results here

root@rockrobo:~# hwclock --show Tue Aug 31 21:31:56 2021 -1.254741 seconds

root@rockrobo:~# date Tue Aug 31 21:32:14 WEST 2021

Current time in my time zone GMT 0 ( Portugal )

21:32

jcplu commented 3 years ago

try hwclock -w and test telegram bot

bmwm69 commented 3 years ago

try hwclock -w and test telegram bot

dont work :(

root@rockrobo:~# date Tue Aug 31 22:00:11 WEST 2021 root@rockrobo:~# hwclock -w root@rockrobo:~# date Tue Aug 31 22:01:27 WEST 2021

jcplu commented 3 years ago

send results of the three commands : roborock > date roborock > hwclock -r computer > date

bmwm69 commented 3 years ago

root@rockrobo:~# hwclock -r Tue Aug 31 22:14:54 2021 -1.990040 seconds root@rockrobo:~# date Tue Aug 31 22:14:56 WEST 2021

bmwm69 commented 3 years ago

Solved ! Removed all configuration HTTP API token , disabled telegram and reconfigured !

jcplu commented 3 years ago

Strange, because telegram bot worked from telegram to robot... Can you check the three commands above ?