jvmahon / Homebridge-HomeSeer4

Homebridge Plugin for HomeSeer 3 and 4
29 stars 8 forks source link

GarageDoorOpener functionality #85

Closed rrman closed 4 years ago

rrman commented 4 years ago

Hi,

I just upgraded from homeseer-homebridge-plugin-2018 to homeseer-homebridge4.

I had an issue with the GarageDoorOpener functionality. Maybe this issue will just come down to a documentation resolution.

In homeseer-homebridge-plugin-2018, my virtual garage doors (which use MimoLite with open/close door sensor) were defined in my config.json as follows:

    {
      "type": "GarageDoorOpener",
      "name": "Randy's Garage Door",
      "ref": 19
    },
    {
      "type": "GarageDoorOpener",
      "name": "Linda's Garage Door",
      "ref": 30
    },

Note that my HomeSeer virtual devices only have two states: Closed (0) and Open (255). Defining Opening, Closing, and Stopped states would be too complex in terms of events, so I'm satisfied with just Open and Closed for status. Anyway, things were working fine in homeseer-homebridge-plugin-2018.

When I upgraded to homeseer-homebridge4, the homebridge service would no longer start properly. There was no indication of why it wouldn't start.

First question: where are the log files for debugging these problems?

Then, I realized that in homeseer-homebridge4, you have to explicitly state, for virtual GarageDoorOpener devices, what the values are for openValue and closeValue. I changed my config.json to be:

   {
"type": "GarageDoorOpener",
"name": "Randy's Garage Door",
    "ref": 19,
"openValue": 255,
"closedValue": 0
   },
    {
      "type": "GarageDoorOpener",
      "name": "Linda's Garage Door",
      "ref": 30,
  "openValue": 255,
  "closedValue": 0
    },

I later found somewhere in the documentation stating that for virtual garage door openers, one must specify the values for openValue, closedValue, openingValue, closingValue, and stoppedValue.

However, the documentation in https://github.com/jvmahon/Homebridge-HomeSeer4/wiki/Garage-Door-Openers , in the section titled "DIY Garage Door Opener" gives, the following as an example:

{"type":"GarageDoorOpener", "ref":1242 }

Above worked in the old version of the plugin. But with the new version of the plug-in one must also specify openValue and closedValue. So, above documentation needs to be updated.

Also, I hope that the states openingValue, closingValue, and stoppedValue are just optional (the documentation doesn't state that they are optional). I don't use them, and my Garage door openers now work fine with the new version of the plugin.

Anyway, so far, this issue (and another issue regarding the offValues array which I've opened a ticket for earlier) are the only issues I've run into.

BTW, thanks for the great plug-in!

Regards,

Randy

jvmahon commented 4 years ago

I'll double-check the code but try the following first . .. .

For the Open and the Close values, go to the Status Graphics page, and see that the "Control Use" is set to "Door Unlock" for the Open value and "Door Lock" for the Close value as shown in the following:

image

rrman commented 4 years ago

Okay, the garage door functionality works for me now. To summarize, with the 2018 version of the plug-in, I had:

{
  "type": "GarageDoorOpener",
  "name": "Randy's Garage Door",
  "ref": 19
},
{
  "type": "GarageDoorOpener",
  "name": "Linda's Garage Door",
  "ref": 30
},

My virtual devices were defined as follows:

Screen Shot 2020-06-24 at 9 05 39 PM

I had to change my config.json to be as follows:

{ "type": "GarageDoorOpener", "name": "Randy's Garage Door", "ref": 19, "openValue": 255, "closedValue": 0 }, { "type": "GarageDoorOpener", "name": "Linda's Garage Door", "ref": 30, "openValue": 255, "closedValue": 0 },

Screen Shot 2020-06-24 at 10 05 00 PM

I'm not sure if it was necessary to change the "Control Use" values from Off and On to Door Lock and Door Unlock. But, I had to change the config.json.

All good now. But I think the documentation (in https://github.com/jvmahon/Homebridge-HomeSeer4/wiki/Garage-Door-Openers) has to state that for virtual devices, the openValue and closedValue parameters must be specified (which wasn't necessary with the old plug-in).

Thanks again.