Giter Site home page Giter Site logo

Comments (7)

subutux avatar subutux commented on May 30, 2024

Try this before you execute homebridge:

export NODE_TLS_REJECT_UNAUTHORIZED=0

from homebridge-homeassistant.

maddox avatar maddox commented on May 30, 2024

Yeah, it sounds like it's rejecting your self signed cert. Are you using a self signed cert, or a Let's Encrypt cert. If the former, you should consider migrating to the later.

from homebridge-homeassistant.

robbiet480 avatar robbiet480 commented on May 30, 2024

👍 for @maddox. Closing as this isn't a homebridge-homeassistant issue.

from homebridge-homeassistant.

robbiet480 avatar robbiet480 commented on May 30, 2024

Added a note about this use case to the README here.

from homebridge-homeassistant.

maddox avatar maddox commented on May 30, 2024

👏

from homebridge-homeassistant.

kolossboss avatar kolossboss commented on May 30, 2024

Hi,

I'm running into the same problem.

I have an trusted certificate valid for my DNS address but not my local HA address. HA has no issues and works great with this certificate.

What do you exactly mean with

Try this before you execute homebridge:

export NODE_TLS_REJECT_UNAUTHORIZED=0

How can I do this export NODE_TLS_REJECT_UNAUTHORIZED=0 when I autostart Homebridge with systemd.server?

I dont get it to work

from homebridge-homeassistant.

kolossboss avatar kolossboss commented on May 30, 2024

OK found a nice and easy solution.

I simply modified the homebridge executable set up file .

This file is located here:

/usr/lib/node_modules/homebridge/bin

Just added the command: process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

Then the file look like this:

#!/usr/bin/env node

//
// This executable sets up the environment and runs the HomeBridge CLI.
//

'use strict';

process.title = 'homebridge';

// Find the HomeBridge lib
var path = require('path');
var fs = require('fs');
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

// Run HomeBridge
require(lib + '/cli')();

Now restart homebridge service. And the ssl errors are gone.

NOTE: THIS DISABLES ALL KINDS OF SECURITY CHECKS

I think everything is local if I put in the local home Assistant IP in config.json, so I hope this is not a big deal.

I dont know if this is the right way but this works for me and works this autostart and systemd service.

from homebridge-homeassistant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.