Problem with tv host android

Was using TV Host on my Galaxy S7 with broken display not long ago and didnt have any Problems there. Using remote from various different devices (Android and Win10). However lately when i set up the TV Host on other Android devices (galaxy tab A, Galaxy A3, another Galaxy S7) i cant get it to work propperly. It is no problem to connect if screen is unlocked... neither when screen is locked. BUT... once the device is inactive for a while it shows them as offline :/ ... also somehow the old S7 was shown with a yellow symbol in the contact list when not been used for a while... but somehow enabled me to connect however.... i really dont know what setting it was but i cant seem to be able to reproduce this on any other device ever since. Really hope some1 knows what the problem is with my devices or what the setting was that made my old s7 rwork as i wish all my devices would.
Greetings Stefan