Hypfer / Valetudo

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

[Viomi] Dummycloud is (always) spoofing 203.0.113.1 #459

Closed schannall closed 4 years ago

schannall commented 4 years ago

Describe the bug

Hi, I'm trying to build Valetudo for the Viomi. It builds an runs okay, but the webserver always throws errors. Digging a little deeper, I found, that Valetudo always spoofs the 203.0.113.1 IP, regardless of what I have in the configs.

To Reproduce

Steps to reproduce the behavior:

  1. edit your config Files: develop/config.json

    {
    "spots": [],
    "areas": [],
    "dummycloud": {
      "spoofedIP": "110.43.0.83",
      "bindIP": "127.0.0.1"
    }
    }

    Test if all files where spoofedIP is in are set to the 110.43.0.83 adress: grep -r "spoofedIP" | grep -v "\.spoofedIP"

    lib/res/default_settings.json:        "spoofedIP": "110.43.0.83",
    Binary file valetudo matches
    develop/config.json:      "spoofedIP": "110.43.0.83",
    develop/local/config.json:        "spoofedIP": "110.43.0.83",
    viomi_instructions.md:    "spoofedIP": "110.43.0.83"
  2. Build your application npm run build_viomi

    
    > valetudo@0.4.0 build_viomi /root/build/Valetudo
    > pkg --targets node10-alpine-armv6 --no-bytecode --options max-old-space-size=32 --public-packages=prettycron .

pkg@4.3.7

3. Copy it to your Robot
`scp valetudo root@robot:/mnt/UDISK/`
4. See error
`root@TinaLinux:~# /mnt/UDISK/valetudo `

[2020-03-17T07:30:02.079Z] [INFO] Loading configuration file: /mnt/data/valetudo/config.json […] [2020-03-17T07:30:02.275Z] [INFO] Dummycloud is spoofing 203.0.113.1:8053 on 127.0.0.1:8053 [2020-03-17T07:30:02.280Z] [INFO] Webserver running on port 80

Expected behavior

Have the config file on the robot set up correctly. When editing /mnt/data/valetudo/config.json at least the IP is set correctly. I'm now getting another error (local request 15016 get_status timed out) but I have not yet looked further into it.

Additional context

Valetudo built with https://github.com/Hypfer/Valetudo/tree/5dc6e438afc1361b1955230a854a8c677da01e45

schannall commented 4 years ago

Oh God, I'm just stupid. The config file is created the first run and will not be updated by newer builds. It seemes, I had an error in one of my first builds. Deleting the file will create a new one with the right values..