rand256 / valetudo

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

Error: Unable to reach vacuum, handshake failed #15

Closed josch closed 5 years ago

josch commented 5 years ago

Hi,

I have a gen2 robot and recently tried flashing it with this fork. Steps to reproduce:

mkdir -p valetudo/deployment/etc
curl https://github.com/Hypfer/Valetudo/raw/master/deployment/valetudo.conf > valetudo/deployment/valetudo.conf
curl https://github.com/Hypfer/Valetudo/raw/master/deployment/etc/hosts > valetudo/deployment/etc/hosts
curl https://github.com/Hypfer/Valetudo/raw/master/deployment/etc/rc.local > valetudo/deployment/etc/rc.local
curl --location https://github.com/rand256/valetudo/releases/download/0.4.0-RE2-fix/valetudo.tar.gz | tar --extract --to-stdout --gunzip --file=- valetudo > valetudo/valetudo
mkdir -p firmware
curl --continue-at - https://cdn.awsde0.fds.api.mi-img.com/rubys/updpkg/v11_001886.fullos.ee205b4f-7d81-45c9-95a3-a4eaeed1af52.pkg --output firmware/v11_001886.fullos.pkg

dustcloud/devices/xiaomi.vacuum/firmwarebuilder/imagebuilder.sh \
    --firmware=firmware/v11_001886.fullos.pkg \
    --public-key=$HOME/.ssh/id_rsa.pub \
    --valetudo-path=valetudo \
    --disable-firmware-updates \
    --ntpserver=192.168.178.1 \
    --replace-adbd

mirobo --debug discover --handshake true
mirobo --ip 192.168.8.1 --token xxx update-firmware output/v11_001886.fullos.pkg
mirobo --ip 192.168.8.1 --token xxx configure-wifi --timezone Europe/Berlin yyy zzz

I noticed that after a reboot valetudo was not running. When I ran /usr/local/bin/valetudo manually I got:

No configuration file present. Creating one at: /mnt/data/valetudo/config.json
Dummycloud is spoofing 203.0.113.1:8053 on 127.0.0.1:8053
Webserver running on port 80
failed to get handshake for message: get_timezone [] { retries: 97, retriesHS: 102 }
/snapshot/valetudo/lib/miio/Vacuum.js:91
        throw new Error("Unable to reach vacuum, handshake failed");
        ^

Error: Unable to reach vacuum, handshake failed
    at Vacuum.sendMessage (/snapshot/valetudo/lib/miio/Vacuum.js:91:15)
    at Vacuum.<anonymous> (/snapshot/valetudo/lib/miio/Vacuum.js:145:14)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)

What could be the problem?

josch commented 5 years ago

Nevermind. I'm an idiot. Sorry for the noise!