[sort of solved] All RESTful switches stopped working: "No route to resource/endpoint"

Hi,

running HA 0.111.2 on a RPi 3B+ under Supervisor 227 on HassOS 4.10.
All current at the time of writing.

A few HA updates ago, all of my formerly working RESTful switches, controlling several ESP8266-based devices, all stopped working. I didn’t notice right away, because the switches control less-critical features on those devices.

The devices themselves work. One of them, for example, is a WeMo-compatible Power Plug. The WeMo parts works (discovery, switch, everything), but not the RESTful API that controls the LED.

Only message I get from the log:

2020-06-14 15:06:54 ERROR (MainThread) [homeassistant.components.rest.switch] No route to resource/endpoint: http://192.168.178.172/state.json

Subquestion: Any hints how to get more information from the log? Here’s part of my logger configuration (which doesn’t change a thing):

logger:
  default: error
  logs:
    homeassistant.components.rest.switch: debug
    homeassistant.components.rest.binary_switch: debug
    homeassistant.components.switch: debug
    homeassistant.components.binary_switch: debug

And here is one of my switch configs:

switch:
  - platform: rest
    name: sonoff_led_1
    timeout: 45
    resource: http://192.168.178.172/state.json
    method: post
    body_on: 'green=true'
    body_off: 'green=false'
    is_on_template: '{{ value_json.led }}'
    headers:
      Accept: text/json
      Content-Type: application/x-www-form-urlencoded

On POST, the device’s interface takes form-urlencoded POST parameters, and returns JSON in the response’s body. Here’s an example with curl (from within the Home Assistant container!):

bash-5.0# curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -H "Accept: text/json" -d "green=true" http://192.168.178.172/state.json

returns a reply body

{"state":"off","logicstate":"false","led":"true","blinking":"0"}

Anyone has any idea what has changed to cause this? I checked the code for RESTful switch / sensor on Github - nothing seems to have changed there.

Thanks!

Edit: for testing, I just installed a clean HA / HassOS on a Hyper-V virtual machine.

Needless to say (doh!), the same switch configuration works as intended.

Anyone has an idea what may cause the different behaviour, as described, between a year-old, organically grown RPi-based HA install vs. a fresh one with virtually no configuration at all?

Any input much appreciated.

Update: Don’t know what fixed it, and what was so special about my setup, but the update to HA 0.111.4 seems to have cured the whole thing.

Edit: It was just a one-off thing. Next reboot broke it again :frowning:

I solved it by myself - or I believe so. I ended up re-installing (and cleaning up) the whole installation on a new machine and SD card (Samsung Evo Plus - much faster than Sandisk Ultra / Extreme). The easy way - making a backup on the old machine, wipe and restore on the new one - didn’t bring the desired result.

Restoring the installation piece by piece worked. However, when I installed HACS, the trouble began again. Turns out that the installation of “HA Fritzbox Tools” (Github) seems to block / break the RESTful communication,

After deinstalling the Tools & Integration, everything seems to be working so far.