Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
NebzHB authored Jan 24, 2024
1 parent 97ee08e commit acf4a7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ function JeedomPlatform(logger, config, api) {
this.api = api;
this.api.on('didFinishLaunching',function(){
/** Listen **/
this.server = this.app.listen(0, '0.0.0.0', () => {
let port=0;
if(fs.existsSync('/homebridge/')) { port=8582; } // if docker, use the port next to homebridge-config-ui
this.server = this.app.listen(port, '0.0.0.0', () => {
this.log('info',"On écoute les messages sur le port "+this.server.address().port);
this.jeedomClient.daemonIsReady(this.server.address().port);
});
Expand Down

0 comments on commit acf4a7d

Please sign in to comment.