Shelly plug S gen2, disconnects if shelly or device is controlled via REST API

Hi!

I installed shelly plugs to HomeAssistant and they work fine.
However, if I control shellys or connected device (radiators) with my python code REST-API (self-created add-on in home assistant or via my computer) shellys stop sending data (power metering data) to home assistant. All devices are on, and I can query shelly data via API but it stops data stream to HA. This did not happened with old zway plugins that I replaced with shellys. Any ideas to solve this?

Couple things I tested:

  • Shelly data stream come back to HA if I adjust radiator control or reboot shelly
  • Shelly does not save latest data before disconnecting from HA
  • Shelly data stream does not connect back to HA without taking actions, I have waited over 30 mins
  • This happens with all shellys
  • Controlling in HA does not cause problems, and data flows normally, only controlling via rest API cause problems
  • Same happens either I control shelly (on/off) or radiator target temperature

Thank you for helping!