diff --git a/main.js b/main.js index 51e4884..e3ee858 100755 --- a/main.js +++ b/main.js @@ -195,7 +195,12 @@ function findInterfaces() { }; } }); + + log.debug('config ready'); + ipcRpc.send('config-ready'); + initRpcClients(); + if (regaPresent) { rega = new Rega({ host: config.ccuAddress, @@ -356,7 +361,7 @@ function initRpcClients() { } function setServiceMessage(daemon, channel, datapoint, value) { - console.log('setServiceMessage', daemon, channel, datapoint, value); + log.debug('setServiceMessage', daemon, channel, datapoint, value); if (value) { if (!localServiceMessages[daemon]) { localServiceMessages[daemon] = {}; diff --git a/www/js/homematic-manager.js b/www/js/homematic-manager.js index b94df2b..e61ad75 100755 --- a/www/js/homematic-manager.js +++ b/www/js/homematic-manager.js @@ -170,8 +170,10 @@ $('#qr-enable').change(() => { }); -// Entrypoint -getConfig(); +ipcRpc.on('config-ready', () => { + // Entrypoint + getConfig(); +}); ipcRpc.on('disconnect', () => { $dialogDisconnect.dialog('open');