Hypfer / Valetudo

Cloud replacement for vacuum robots enabling local-only operation
https://valetudo.cloud
Apache License 2.0
6.38k stars 388 forks source link

Incorrect status and no maps on viomi v7 #591

Closed alceasan closed 3 years ago

alceasan commented 4 years ago

Describe the bug

After a clean installation, Valetudo starts and commands work (start, return to home, ...), including MQTT integration, but after starting a cleaning session the status appears always as "docked". The area is being updated while the cleaning is up, and also battery indicator. Also, no map data... I can start the cleaning from HomeAssistant through MQTT integration, but the problems persists.

To Reproduce

Install valetudo following the steps on https://valetudo.cloud/pages/installation/viomi.html

Screenshots

image image

Vacuum Model

Viomi v7

Valetudo Version

0.6.1

Firmware Version

3.5.3_0047

Additional context

Not sure if related, but in my vaccum box the model is labeled as STYJ02YM (viomi v8), but after setting up on Mi Home App (on Chinese server, I couldn't do it on Europe servers) and rooting it, the model it apears on /etc/miio/device.conf is viomi.vacuum.v7

Hypfer commented 4 years ago

Possibly a duplicate of #550

alceasan commented 4 years ago

Can I provide any relevant logs?

rumpeltux commented 4 years ago
  1. Make sure /etc/rc.d/S51valetudo has dest=127.0.0.1.
  2. Same file: the line iptables -t nat -A OUTPUT -p tcp --dport 80 -d $host -j DNAT --to-destination $dest:8080 should change to $dest:80 (on the robot port is 80 not 8080 as in the development setup).
  3. Also check that /mnt/data/valetudo/config.json has map_upload_host set to http://127.0.0.1

Once done, please reboot, start a clean and check again.

alceasan commented 4 years ago

I just tried, but it didn't work. Status continue to show as docked while it's cleaning.

image

alceasan commented 4 years ago

Today I changed the deposit from the water tank and mop to the standard waste box and it suddenly started working.

Now the main interface shows correctly the status and map data: image

image

I still haven't tried to go back to the water tank mod, tomorrow I'll try and report to see if it's related.

koper89 commented 3 years ago

I have same issue no map data, but I don't seem to have config.json (I installed through this rooting script + upgraded valetudo to newest version 0.6.1), in my case status and map data are not showing correctly (NO_MAP_DATA) and in info about device there's no firmware version, this is 3.5.3_0047 (but one which came in built so this is one without english version option for some reason). How to add config.json where can I find it as you mentioned above that it should be in /mnt/data/valetudo/config.json but I don't have data folder in mnt valetudo on viomi.v7 is installed to /mnt/UDISK/valetudo I seem to have some config file in /mnt/UDISK/valetudo/config/valetudo.json

Contend looks like: { "spots": [], "mqtt": { "enabled": false, "server": "foobar.example", "port": 1883, "clientId": "", "username": "user", "password": "pass", "usetls": false, "caPath": "", "qos": 0, "identifier": "rockrobo", "topicPrefix": "valetudo", "autoconfPrefix": "homeassistant", "provideMapData": true }, "webserver": { "port": 80 }, "dummycloud": { "spoofedIP": "203.0.113.1", "bindIP": "127.0.0.1" }, "httpAuth": { "enabled": false, "username": "valetudo", "password": "valetudo" }, "allowSSHKeyUpload": true, "map_upload_host": "http://127.0.0.1", "logLevel": "info", "model": { "type": "auto", "embedded": true }, "debug": { "memoryStatInterval": false } }

schannall commented 3 years ago

https://valetudo.cloud/pages/troubleshooting.html

-> Check /etc/rc.d/S51valetudo if you have that spoofed IP there.

koper89 commented 3 years ago

https://valetudo.cloud/pages/troubleshooting.html

-> Check /etc/rc.d/S51valetudo if you have that spoofed IP there.

Yes I seem to have it, here's content:

!/bin/sh

iptables -F OUTPUT iptables -t nat -F OUTPUT dest=127.0.0.1 port=80 for host in 110.43.0.83 110.43.0.85; do iptables -t nat -A OUTPUT -p tcp --dport 80 -d $host -j DNAT --to-destination $dest:$port iptables -t nat -A OUTPUT -p udp --dport 8053 -d $host -j DNAT --to-destination $dest:8053 iptables -A OUTPUT -d $host/32 -j REJECT done

koper89 commented 3 years ago

Resolved by changing spoofedIp /mnt/UDISK/valetudo/config/valetudo.json to correct one. Thanks @schannall (Maybe worth adding in docs that config file for viomi is in /mnt/UDISK/valetudo/config/valetudo.json

rumpeltux commented 3 years ago

This issue should be fixed in current HEAD (or rather is obsolete now, since we stopped faking the ip and instead patch miio_client). Much of the new UI isn’t yet functional though, so looking forward to @Depau’s implementation of the missing capabilities.

Note that installation instructions have changed so when redeploying a new binary you’ll need some adjustments.