Have a look at this post How can i end the {cayenne.loop()} if there is no connection? - #5 by ahmed.blacky.xaver3