Annex-Engineering/klipper_estimator

resolving .local?

jtrmal opened this issue · 2 comments

Hi, I'm kinda unsure what's wrong in this case. I can ping the computer without any troubles and log to the machine as well. When I use the config_moonraker_url with IP address, all works, but when I use the mDNS name, it seems it does not work and the error is not exactly providing info I could use to troubleshoot this. Any suggestion/advice? I'm using latest release...

$ klipper_estimator_osx --config_moonraker_url http://192.168.250.222 dump-config
{
  "max_velocity": 200.0,
  "max_acceleration": 3000.0,
  "max_accel_to_decel": 1500.0,
  "square_corner_velocity": 8.0,
  "instant_corner_velocity": 1.0,
  "move_checkers": [
    {
      "axis_limiter": {
        "axis": [
          0.0,
          0.0,
          1.0
        ],
        "max_velocity": 100.0,
        "max_accel": 500.0
      }
    },
    {
      "extruder_limiter": {
        "max_velocity": 53.21621607382886,
        "max_accel": 798.2432411074329
      }
    }
  ],
  "firmware_retraction": {
    "retract_length": 0.6,
    "unretract_extra_length": 0.0,
    "unretract_speed": 30.0,
    "retract_speed": 30.0
  }
} 

$ ping vsw.local
PING vsw.local (192.168.250.222): 56 data bytes
64 bytes from 192.168.250.222: icmp_seq=0 ttl=64 time=8.989 ms
^C
--- vsw.local ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 8.989/8.989/8.989/0.000 ms

$ klipper_estimator_osx --config_moonraker_url http://vsw.local dump-config
Failed to load printer configuration: request failed: error decoding response body: missing field `result` at line 1 column 580

Resolved by fixing my cors_domains in moonraker.conf.
I still don't understand fully but it seemed to be related to not having ipv6 (i.e. not accessing via ipv6) since yesterday and having messed up ipv4 config in moonraker.conf

seems like the klipper_estimator is using link-local ipv6 address preferably (probably it's how the MacOSX resolver is set up)
y.