Code Monkey home page Code Monkey logo

Comments (10)

Pltnorwich avatar Pltnorwich commented on September 26, 2024 1

Ahhhh thats really helpful thank you

I will get the app and have a look, I may ask more questions later.

Ive been googling bluetooth lock json files to see what i could find.

Much appreciated

from homebridge-bluetooth.

vojtamolda avatar vojtamolda commented on September 26, 2024

Hello Phil,

Thanks for your question and for your interest in the plugin.

  1. I think the reason why Homebridge won't start is that you didn't update your ~/.homebridge/config.json configuration file. See the example for inspiration.

  2. I'm assuming you're using SmartThings hub to control your ZWave lock. If that's the case homebridge-smartthings plugin might be your best bet to make it talk to HomeKit.

from homebridge-bluetooth.

Pltnorwich avatar Pltnorwich commented on September 26, 2024

Hi Vojtamolda,

Im using a raspberry pi, with bluetooth dongle an UZB 1 stick, i was using the zway-homebridge plugin, but found the lock drain 30% in a few weeks, using bluetooth its lasted about 18months. So I would like to use the bluetooth of the lock to talk to the raspberry pi, then home bridge.

Im unsure of what data I would need in the json file for a lock.

Thanks

from homebridge-bluetooth.

vojtamolda avatar vojtamolda commented on September 26, 2024

You'd need BLE service and characteristics UUIDs of the lock. You can get these, for instance, by using the LightBlue Explorer iOS app.

I'm not sure what communication protocol does the lock use, but it needs to match the HomeKit LockMechanism service (full description is here) and all of it's mandatory characteristics.

The config.json would look something like this (snippet from the Lock example config.json file):

"name": "ZWave Lock",
"address": "01:23:45:67:89:AB",
"services": [ {
    "name": "Lock",
    "type": "LockMechanism",
    "UUID": "LOCK-MECHANISM-SERV-UUID-HERE",
    "characteristics": [ {
        "type": "LockTargetState",
        "UUID": "LOCK-TAGET-STATE-CHAR-UUID-HERE"
      }, {
        "type": "LockCurrentState",
        "UUID": "LOCK-CURRENT-STATE-CHAR-UUID-HERE"
      } ]
   } ]

from homebridge-bluetooth.

Pltnorwich avatar Pltnorwich commented on September 26, 2024

Hi,
This is my json file - it has no errors on checker; I want to use the bluetooth of the lock and will disable zwave in the server

{
	"bridge": {
		"name": "Homebridge",
		"username": "CC:22:3D:E3:CE:30",
		"port": 51826,
		"pin": "xxx"
	},

	"description": "Thermostat",

	"accessories": [{
		"accessory": "TADO",
		"name": "Tado",
		"homeID": "xxx",
		"username": "xxx",
		"password": "xxx"
	}, {


		"address": "CB:D3:D9:EC:4D:C5",
		"services": [{
			"name": "Front Door",
			"type": "LockMechanism",
			"UUID": "DCFF0001xxx",
			"characteristics": [{
				"type": "LockTargetState",
				"UUID": "DCFF0003xxx"
			}, {

				"type": "LockCurrentState",
				"UUID": "DCFF0002xxx"
			}, {




				"platforms": [{
					"platform": "ZWayServer",
					"url": "http://xxx:8083/",
					"login": "xx",
					"password": "xxxxx"
				}]
			}]
		}]
	}]
}

I have bluetooth driver installed and is running but get the following error when running homebridge;

 hci onSocketError: Operation not permitted +5ms
  hci read bd addr - writing: 01091000 +8ms
[4/22/2017, 12:27:52 PM] Registering platform 'homebridge-bluetooth.Bluetooth'
[4/22/2017, 12:27:52 PM] ---
[4/22/2017, 12:27:53 PM] Loaded plugin: homebridge-tadoheating
[4/22/2017, 12:27:53 PM] Registering accessory 'homebridge-tado.TADO'
[4/22/2017, 12:27:53 PM] ---
[4/22/2017, 12:27:59 PM] Loaded plugin: homebridge-zway
[4/22/2017, 12:27:59 PM] Registering accessory 'homebridge-zway.ZWayServer'
[4/22/2017, 12:27:59 PM] Registering platform 'homebridge-zway.ZWayServer'
[4/22/2017, 12:27:59 PM] ---
[4/22/2017, 12:27:59 PM] Loaded config.json with 2 accessories and 0 platforms.
[4/22/2017, 12:27:59 PM] ---
[4/22/2017, 12:27:59 PM] Loading 2 accessories...
[4/22/2017, 12:27:59 PM] [Tado] Initializing TADO accessory...
  hci set scan enabled - writing: 010c20020001 +7s
  hci onSocketError: Operation not permitted +6ms
/usr/local/lib/node_modules/homebridge/lib/api.js:46
  if (name.indexOf('.') == -1) {
          ^

TypeError: Cannot read property 'indexOf' of undefined
    at API.accessory (/usr/local/lib/node_modules/homebridge/lib/api.js:46:11)
    at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:254:42)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:81:38)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

I thought homebridge would just use the info provided in the json file (lock address) to then display it.

from homebridge-bluetooth.

Pltnorwich avatar Pltnorwich commented on September 26, 2024

Ive ran it as sudo and get less errors (ran in debug mode before).

[4/22/2017, 1:39:53 PM] [Tado] Initializing TADO accessory...
  hci set scan enabled - writing: 010c20020001 +7s
/usr/local/lib/node_modules/homebridge/lib/api.js:60
      throw new Error("The requested accessory '" + name + "' was not registered by any plugin.");
      ^

Error: The requested accessory 'Danalock' was not registered by any plugin.
    at API.accessory (/usr/local/lib/node_modules/homebridge/lib/api.js:60:13)
    at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:254:42)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:81:38)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

Surely with the homebridge-bluetooth I don't need to add a plugin?

from homebridge-bluetooth.

vojtamolda avatar vojtamolda commented on September 26, 2024

I think the problem above is caused by an error in the config.json file not related to this plugin. Homebridge couldn't find the TADO plugin that would be able to access an accessory defined in the config file.

Besides the problem above, I think you can't run both homebridge-zwave and homebridge-bluetooth plugin at the same time. Both require access to the BLE hardware on the Raspberry and will almost certainly run into a conflict.

from homebridge-bluetooth.

Pltnorwich avatar Pltnorwich commented on September 26, 2024

Hi vojtamolda,
Without the Bluetooth plugin homebridge works fine including tado.
Maybe you are correct that zwave and Bluetooth on homebridge can not run, how can I disable homebridge-zwave?
The zway server was using the zway stick (separate from Bluetooth) but I can give it a go without zwave if you know how I can disable zway server starting and homebridge-zway with uninstalling it all....?

Thanks

from homebridge-bluetooth.

vojtamolda avatar vojtamolda commented on September 26, 2024

Sorry. No idea. I don't use zway.

from homebridge-bluetooth.

Pltnorwich avatar Pltnorwich commented on September 26, 2024

Ok, maybe I should try a new install of just homebridge the Bluetooth plugin and report back.

from homebridge-bluetooth.

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.