Ok, update on this. If you set the url for the chat directly, it works fine. you can use this as long as the autodect is not working as expected.
$(function() {
new ZammadChat({
background: '#cedbd9',
fontSize: '12px',
chatId: 1,
host: 'ws://139.59.147.81:8082/ws',
show: false,
debug: true
});
});
Edit: http://139.59.147.81:8082/assets/chat/znuny.html
Which is a sample debug html page we use and which is available on every Zammad instance