HomeKit Integration with Homebridge-Garadget Plugin

I’ve got homebridge running on an RPi. I copy the script in verbatim and get “Config Syntax Error”

“accessories”: [
{
“accessory”: “Garadget”,
“name”: “Garage Door”,
“cloudURL”: “https://api.particle.io/v1/devices/”,
“deviceID”: “<>”,
“access_token”: “<>”
}
]
{
“platform”: “mqtt”,
“name”: “mqtt”
}

What am I doing wrong? I can fill in the deviceID or access_token, doesn’t work either way, still get the syntax error.
Thanks
Rob

Could be the book style quotes “”. In the programming when it comes to double quotes, only the flat version is used ".

Try what garadget suggested and make sure to use

"

quotes

here is a valid one to test without the mqtt platform

{
"bridge": {
	"name": "Homebridge Pi",
	"username": "some-username",
	"port": 51414,
	"pin": "111-22-333"
},
"accessories": [{
	"accessory": "Garadget",
	"name": "Garage Door",
	"cloudURL": "https://api.particle.io/v1/devices/",
	"deviceID": "<>",
	"access_token": "<>"
}]}

Thanks both, I copied and pasted xNinjas script and it worked. NFI what I was doing wrong, nor how to do normal double quotations! It’s not just shift of the single???

Anyway, I’m now getting error messages in the log which just repeat. How do I pause and copy what’s in the log?

Progress but not there yet…

Thanks again,
Rob

Did a screen shot, this is a typed out log:

[date, time] [mqtt] on.close
[date, time] ]mqtt] on.reconnect
[date, time] [mqtt] on.error Error: connect ECONNREFUSED 127.9.0.1:1883 at TCPConnectWrap.afterConnect [as concomplete] (net.js:1141.16) {
errno: ‘ECONNREFUSED’,
code: ‘ECONNREFUSED’,
syscall: ‘connect’,
address: ‘127.0.0.1’,
port:1883
}

Any clues to what to do next. Is the port 1883 correct?

To view the homebridge UI, I use 8581 but in the Config it says 51617

Thanks,
Rob

I am sorry but i didnt write mqtt. You’ll have to check his thread or github. Heres a link to his npm homebridge-garadget-mqtt - npm

These are two different plugins.

Does homebridge rely on mqtt to get the Garadget to work?

Homebridge is a framework used to bridge non apple homekit. Homebridge runs plugins. I am the original creator of the homebridge-garadget plugin for homebridge. There are two different implementations of garadget on homebridge and the other is that mqtt. These two plugins do not interact with each other. I use nodejs and call a couple of dependencies. I use garadget’s api. His uses a open source language and uses login credentials and i think you also need to setup a mqtt server. Doesnt matter which one you choose. I would choose only one if you dont want duplicate garage devices to show up on your home app.

1 Like

Hi xNinjas,

It was my rubbish scripting that was the problem. I moved it’s location and it’s now working a treat =)

Definitely a case of ‘replace user’ to solve the problem! Thanks for creating and sharing the plug in, can’t wait to be able to just tell siri to open and close the garage door in the car.

Thanks,
Rob

Glad you got it to work. Again mqtt is not mine and i cant help support it. If you are using my version then i can help.

In regards to using siri, if you get a security message that you have to accept and wish to bypass it then you can create a second accessory with the bypass switch in config and rename the accessories to a specific name like “castle gate” and siri will see it that name and open with out security message to by pass it.

I use carplay with mine and i can open the garage from my car through my alpine deck.

1 Like

Sorry for the delay, just now came across the post from @Robindra. It doesn’t appear that he’s using the homebridge-garadget-mqtt project. I’m actually not sure which project he’s using.

There are no port options in the config in the homebridge-garadget-mqtt project. The only settings that are required are the mqtt server address and the MQTT channels that are set up in the Garadget UI configuration.

The login credentials are optional. Most MQTT servers like Mosquitto come with it disabled by default. It’s true you need to have an MQTT server but it should be noted there are tons of projects on how to get one of these running quite easily using something like a raspberry pi.

The primary motivation of my project was to have a local cloudless solution because internet outages are very frequent where I live. Your project is suitable for people that want a turn-key solution that works “out of the box”.

Both projects give users a way to interact with their Garadget via Apple devices. I do hope you don’t see the projects as competition but supplement each other very nicely.

@bugs181 no worries. I think the user got confused and thought they needed both plugins. They choose to just use the one with out the mqtt

1 Like

Hey xNinjas,

I’ve been using your garadget plugin for a couple years now and it’s been flawless. I just upgrade HOOBs to 4.1.13 today. During the migration, the Garadget plugin config did not transfer. Basically looks like when the plugin is first installed. I pulled up my backup copy of the config file and re-added the plugin details but every time I click to Save, the config file will not update.

Any ideas?

I haven’t used HOOBs before. I am using Homebridge.io
I see the plugin shows up probably because HOOBs is based on homebridge.

Sounds like some permissions issues on your end. Maybe you can’t save because the file is in read-only mode?

Does this happen with other config files?

To my understanding the config file is consolidated so every one of your plugins should have something written in one place. So maybe the new HOOBs no longer let you write directly to the config file? maybe they want you to use their interface to update the file?

I added the Daikin One+ plugin (Thermostat plugin) today and it saved fine, however the Daikin plugin, unlike the Garadget plugin, uses the HOOBs config user interface for configuration. That said, I copied everything perfectly into the config page, tried/failed more than once. I’ll keep at it. If I resolve it I’ll let you know.

can you send me a copy of your config excluding Device ID & Access Token
and then sending me what the daikin one+ config looks like?
dont include anything thats suppose to be secret

Hey xNinjas,

Looks like I “figured” it out (more like by trial and error). I’m not sure exactly where my earlier error(s) was/were in the config but it looks like it was possibly the bracketing. Seems the new HOOBs 4 version just rejects updates if there is an error. Which is unfortunate for newbs and near newbs like me, as the past versions notified the user there was a syntax error etc. without dumping the work and returning with a blank config screen.

Nevertheless, all good. And thanks for following up, I appreciate it!!

happy its resolved. I feel like there was a new standard that came out for syntax out there for javascript.

Heya, first of all thanks for working on this!

I’m a bit of a noob with this stuff, and can’t quite get the plugin working.

I’ve got the Homebridge Garadget plugin installed on homebridge, config:

{
“description”: “Garadget as an accessory.”,
“accessories”: [
{
“accessory”: “Garadget”,
“name”: “Garage Door”,
“cloudURL”: “https://api.particle.io/v1/devices/”,
“deviceID”: “redacted”,
“access_token”: “redacted”
}
],
“name”: “Garage Door”,
“accessory”: “Garadget”
}

I’m getting the following in my homebridge log:

[Garage Door] This means your access token expired. Replace in config.json

I got the token by following instructions from another thread here. The token does return information if i use postman suggesting it’s OK. Any idea where i may have gone wrong here?

Thanks in advance!

This means your access token expired or your device id is wrong
also missing some config

{
  "bridge": {
    "name": "Homebridge",
    "username": "CC:22:3D:E3:CE:39",
    "port": 51826,
    "pin": "031-45-154"
  },

  "description": "Garadget as an accessory.",
  "accessories": [{
    "accessory": "Garadget",
    "name": "Garage Door",
    "cloudURL": "https://api.particle.io/v1/devices/",
    "deviceID": "<<Device ID>>",
    "access_token": "<<Access Token>>",
	"bypass": "0",
	"args": "{STATE}"
  }],
  "platforms": [

  ]
}
1 Like