0.13.8 • Published 4 years ago

homebridge-schbar v0.13.8

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Deprecated. Package moved to homebridge-zipabox-accessory.

This is a test Plugin for Homebridge link to the ZipaBox. It is just published to test on local access to a ZipaBox (Zipato TM) through the API possibilities.

It's based on many different plugin example that you can find by searching "homebridge-plugin" in all Git repository

Today, the approach is to add multiple accessory and get the base information and action through API request.

The plugin will be adapted to a Platform after programming all the accessory separately (see development route below)

The plugin didn't use the Zipato API (no success after a few try) like the homebridge-zipato plugin. The actual plugin is an alternative.

I did'nt work with javascript since a few years, so please be comprehensive.

Development route

  1. NPM diffusion
    • create structure of package - DONE
    • diffuse, pack and clear the command - DONE
    • install using homebridge-Congig UI X from oznu - DONE
    • prepare the test environnement - DONE
    • validate the Readme.md
  2. index.js - Accessory - Baseline
    • prepare the structure of index.js for accessory
    • test and validate structure of index.js
    • try to connect with Node.js library for the official Zipato REST API
    • add connection to local API of Zipabox
    • code the simple Switch function for power manager > Version 0.1.x
    • validate code of version 0.1.x
    • Manage missing online
  3. index.js - Accessory - Light >> Version 0.2.x
    • Add config for Accessory Type + light (default is switch)
    • Try to transform the switch with a lamp
    • have two accessory connected
    • Add force refresh function
  4. index.js - Accessory - Outlet >> Version 0.3.x
    • Transform to just add Characteristic
  5. index.js - Accessory - Temperature > Version 0.4.x
    • First Sensor implementation
    • StatusLowBattery
  6. index.js - Accessory - Luminance = Light Sensor > Version 0.5.x
    • Add Light Sensor
  7. index.js - Accessory - Motion > Version 0.6.x
    • Add Motion Sensor
    • Add reverse parameter
    • Add noStatus parameter
    • Adapt timePolling method to other sensor
  8. index.js - Accessory - Contact Sensor > Version 0.7.x
    • Add Contact sensor
  9. index.js - Accessory - Window > Version 0.8.x
    • Add Window State value > in fact that a sensor with a window logo...
  10. index.js - Accessory - Door > Version 0.9.x
    • Add Door based on the window implementation
    • Auto get status if put (like window)
  11. index.js - Accessory - Leak > Version 0.10.x
    • Add leak sensor and test with testValue
  12. index.js - Accessory - Battery > Version 0.11.x
    • Implemented the battery option
    • Add a double service on one accessory
  13. index.js - Accessory - CO Sensor > Version 0.12.x
    • Add CO SENSOR
  14. index.js - Accessory - Alarm = Security System > Version 0.13.x
    • Add security aspect and code
  15. index.js - Adapt to platform ? >> Version 1.x

Further To-do List

  • Add Table to parameter of plugin
  • Complete table of parameter
  • Add a DEBUG mode
  • Check if needed to @ in %40 > no need
  • Replace the Request with Fetch (use of Promise)
  • Handle reconnection after auto disconnection
  • Change the refresh rate for each Accessory
  • Explain how to find the UUID
  • Change the name of the package
  • Rewrite the parameter order to have something more clear and logic (sub division?)
  • Make a function with reconnect method
  • Bind with a graph viewer (like fakegato)
  • Config to force a device UUID (need ?)
  • Status active for sensor ?
  • Check lux scale if correct
  • Defense prog if batteryLevel requested without battery available ?
  • Get name with name device ? > first test no concluded > do we need ?
  • Adapt to non local access > if requested
  • Adapt from accessory to platform > check if need (actual multiple connection)
  • Implementation of Outlet In Use Status > if needed
  • Add Smoke Sensor > if needed

Not Implemented Accessory (cause I'm not using them)

  • Doorbell
  • Dioxide Sensor
  • Smoke Sensor

Config Examples

Simple example

"accessories": [
        {
          "accessory": "ZipaAccessory",
          "type": "switch",
          "name": "MyZipaSwitch",
          "USERNAME": "yourUserName",
          "PASSWORD": "yourPassword",
          "server_ip": "192.168.0.0",
          "uuid": "123456789",
          "refresh": 10
        }
]

Full example

"accessories": [
        {
          "accessory": "ZipaAccessory",
          "type": "switch",
          "name": "MyZipaSwitch",
          "USERNAME": "yourUserName",
          "PASSWORD": "yourPassword",
          "server_ip": "192.168.0.0",
          "uuid": "123456789",
          "uuidB": "001256",
          "manufacturer": "mySwitchManufacturer",
          "model": "mySwitchModel",
          "serial": "mySwitchSerial",
          "debug": true,
          "refresh": 5,
          "noStatus": true,
          "reverse": true,
          "batteryLimit": 15
        }
]

Parameters information

ParameterRemarks
accessoryMUST be ZipaAccessory, will say at Homebridge to use the good plugin
typeSelect the Accessory Type. switch (default) -others see below-
nameName of your plugin, will be displayed in HomeKit (muss be unique)
USERNAMEUsername use to connect to my.zipato.com
PASSWORDPassword use to connect to my.zipato.com > never publish your Config with this infos
server_ipLocal ip of your Box : format 192.168.0.1 - do not add http or port
uuiduuid of your devices Switch (see Below)
uuidB(Optional) Specify a second uuid for a service with two implementedCharacteristic - see below -
manufacturerManufacturer of your device. No more use than info in HomeKit
modelModel of your device. No more use than info in HomeKit
serialSerial number of your device. No more use than info in HomeKit
debug(Optional) If true the console will display tests informations
refresh(Optional) Time for forced refresh of the status (in seconds)(see Remarks)
batteryLimit(Optional) Level (in percent 1 to 100) to launch the BatteryLowStatus - 0 in default (inactive)
noStatus(Optional) = true if no Status (is connected) option is available forthe device - false in default - see below-
reverse(Optional) = true if the boolean signal of the sensor need to bereversed - see below

List of implemented function

DevicetypeMethods
Switch (default)switchGet Status - Set On - Set Off - Unavailable
Light BulblightGet Status - Set On - Set Off - Unavailable
OutletoutletGet Status - Set On - Set Off - Unavailable
Temperature SensortemperatureGet Value - Battery Low Status - Unavailable
Light SensorambientGet Value - Battery Low Status - Unavailable
Motion SensormotionGet Value - Battery Low Status - Unavailable
Contact SensorcontactGet Value - Battery Low Status - Unavailable
WindowwindowCurrent Position (0 or 100 %) - Unavailable
DoordoorCurrent Position (0 or 100 %) - Unavailable
Leak SensorleakGet Value - Battery Low Status - Unavailable
BatterybatteryBattery Level - Status - Unavailable
Carbon MonoxidecoCarbon Detected - Battery Low Status - Unavailable
Security SystemalarmOngoing

Remarks

UUID of Accessory

The UUID need to be the "STATE" UUID of your Zwave Device (the lowest structure level). To be sure you can try with the Zipato API to use this UUID as parameter for attributes request. The Device UUID is find automatically by the plugin if noStatus is not specified.

Window and Doors

The plugin only get the status open or closed for door and window. It's like a contact sensor but with an other icon. If the user click on the button in HomeKit, the plugin will force the get position method.

uuidB - Second Characteristic for implemented Services

For some Accessory, two UUID are necessary to get all the needed Information.

AccessoryuuiduuidB
BatteryBatteryLevelChargingStage

Reverse a value

Some sensor work inverted as HomeKit expect. Example : a motion sensor return true if no motion are detected. If you can't change your sensor return value in his configuration or Zipato configuration, you can add the "reverse = true" parameter to reverse the returned value. Work for all "get" for attributes.

Device Status Unavailable

In case of unavailable device status you can add the parameter "noStatus": true to ask the plugin to not check the availability of the device. This can happen for wired device to the box (security module). It can help if your Status UUID have no Parent device with a "status" option.

Refresh Rate

HomeKit update the status of your device when you reopen the Home APP. If you want to force a refresh you can use the optional parameter "refresh". You do not need this to keep the connection to the Box. The plugin will reconnect if need after a long time without connection.

0.10.0

4 years ago

0.7.9

4 years ago

0.7.6

4 years ago

0.7.5

4 years ago

0.7.8

4 years ago

0.7.7

4 years ago

0.13.6

4 years ago

0.13.7

4 years ago

0.13.8

4 years ago

0.13.0

4 years ago

0.13.1

4 years ago

0.13.2

4 years ago

0.13.3

4 years ago

0.13.4

4 years ago

0.13.5

4 years ago

0.7.10

4 years ago

0.11.0

4 years ago

0.9.2

4 years ago

0.9.1

4 years ago

0.12.0

4 years ago

0.7.4

4 years ago

0.7.2

4 years ago

0.7.3

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.6

4 years ago

0.6.5

4 years ago

0.6.3

4 years ago

0.6.4

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.8

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.2.23

4 years ago

0.2.22

4 years ago

0.2.21

4 years ago

0.2.20

4 years ago

0.2.19

4 years ago

0.2.18

4 years ago

0.2.17

4 years ago

0.2.16

4 years ago

0.2.15

4 years ago

0.2.14

4 years ago

0.2.13

4 years ago

0.0.436

4 years ago

0.0.435

4 years ago

0.0.434

4 years ago

0.0.433

4 years ago

0.0.439

4 years ago

0.0.438

4 years ago

0.0.437

4 years ago

0.0.432

4 years ago

0.0.431

4 years ago

0.0.430

4 years ago

0.0.403

4 years ago

0.0.402

4 years ago

0.0.401

4 years ago

0.0.400

4 years ago

0.0.407

4 years ago

0.0.406

4 years ago

0.0.405

4 years ago

0.0.404

4 years ago

0.0.414

4 years ago

0.0.413

4 years ago

0.0.412

4 years ago

0.0.411

4 years ago

0.0.418

4 years ago

0.0.417

4 years ago

0.0.416

4 years ago

0.0.415

4 years ago

0.0.410

4 years ago

0.0.409

4 years ago

0.0.408

4 years ago

0.0.425

4 years ago

0.0.424

4 years ago

0.0.423

4 years ago

0.0.429

4 years ago

0.0.428

4 years ago

0.0.427

4 years ago

0.0.426

4 years ago

0.0.421

4 years ago

0.0.420

4 years ago

0.0.419

4 years ago

0.0.395

4 years ago

0.0.394

4 years ago

0.0.393

4 years ago

0.0.399

4 years ago

0.0.398

4 years ago

0.0.397

4 years ago

0.0.396

4 years ago

0.2.12

4 years ago

0.2.11

4 years ago

0.2.10

4 years ago

0.2.1

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.0.392

4 years ago

0.0.391

4 years ago

0.0.390

4 years ago

0.0.389

4 years ago

0.0.388

4 years ago

0.0.384

4 years ago

0.0.387

4 years ago

0.0.386

4 years ago

0.0.385

4 years ago

0.0.383

4 years ago

0.0.382

4 years ago

0.0.381

4 years ago

0.0.380

4 years ago

0.0.379

4 years ago

0.0.378

4 years ago

0.0.377

4 years ago

0.0.376

4 years ago

0.0.375

4 years ago

0.0.374

4 years ago

0.0.373

4 years ago

0.0.372

4 years ago

0.0.371

4 years ago

0.0.370

4 years ago

0.0.369

4 years ago

0.0.368

4 years ago

0.0.367

4 years ago

0.0.366

4 years ago

0.0.365

4 years ago

0.0.364

4 years ago

0.0.363

4 years ago

0.0.362

4 years ago

0.0.361

4 years ago

0.0.360

4 years ago

0.0.359

4 years ago

0.0.358

4 years ago

0.0.357

4 years ago

0.0.356

4 years ago

0.0.355

4 years ago

0.0.354

4 years ago

0.0.353

4 years ago

0.0.352

4 years ago

0.0.351

4 years ago

0.0.350

4 years ago

0.0.349

4 years ago

0.0.348

4 years ago

0.0.347

4 years ago

0.0.346

4 years ago

0.0.345

4 years ago

0.0.344

4 years ago

0.0.343

4 years ago

0.0.342

4 years ago

0.0.341

4 years ago

0.0.340

4 years ago

0.0.339

4 years ago

0.0.338

4 years ago

0.0.337

4 years ago

0.0.336

4 years ago

0.0.335

4 years ago

0.0.334

4 years ago

0.0.333

4 years ago

0.0.332

4 years ago

0.0.331

4 years ago

0.0.330

4 years ago

0.0.329

4 years ago

0.0.328

4 years ago

0.0.327

4 years ago

0.0.326

4 years ago

0.0.325

4 years ago

0.0.324

4 years ago

0.0.323

4 years ago

0.0.322

4 years ago

0.0.321

4 years ago

0.0.320

4 years ago

0.0.319

4 years ago

0.0.318

4 years ago

0.0.317

4 years ago

0.0.316

4 years ago

0.0.315

4 years ago

0.0.314

4 years ago

0.0.313

4 years ago

0.0.312

4 years ago

0.0.311

4 years ago

0.0.310

4 years ago

0.0.309

4 years ago

0.0.308

4 years ago

0.0.307

4 years ago

0.0.306

4 years ago

0.0.305

4 years ago

0.0.304

4 years ago

0.0.303

4 years ago

0.0.302

4 years ago

0.0.301

4 years ago

0.0.300

4 years ago

0.0.250

4 years ago

0.0.249

4 years ago

0.0.248

4 years ago

0.0.247

4 years ago

0.0.246

4 years ago

0.0.245

4 years ago

0.0.244

4 years ago

0.0.243

4 years ago

0.0.242

4 years ago

0.0.241

4 years ago

0.0.240

4 years ago

0.0.239

4 years ago

0.0.238

4 years ago

0.0.237

4 years ago

0.0.236

4 years ago

0.0.235

4 years ago

0.0.234

4 years ago

0.0.233

4 years ago

0.0.232

4 years ago

0.0.231

4 years ago

0.0.230

4 years ago

0.0.229

4 years ago

0.0.228

4 years ago

0.0.227

4 years ago

0.0.226

4 years ago

0.0.225

4 years ago

0.0.224

4 years ago

0.0.223

4 years ago

0.0.222

4 years ago

0.0.221

4 years ago

0.0.220

4 years ago

0.0.219

4 years ago

0.0.218

4 years ago

0.0.217

4 years ago

0.0.216

4 years ago

0.0.215

4 years ago

0.0.214

4 years ago

0.0.213

4 years ago

0.0.212

4 years ago

0.0.211

4 years ago

0.0.210

4 years ago

0.0.209

4 years ago

0.0.208

4 years ago

0.0.207

4 years ago

0.0.206

4 years ago

0.0.205

4 years ago

0.0.204

4 years ago

0.0.203

4 years ago

0.0.202

4 years ago

0.0.201

4 years ago

0.0.200

4 years ago

0.0.135

4 years ago

0.0.134

4 years ago

0.0.133

4 years ago

0.0.132

4 years ago

0.0.131

4 years ago

0.0.130

4 years ago

0.0.129

4 years ago

0.0.128

4 years ago

0.0.127

4 years ago

0.0.126

4 years ago

0.0.125

4 years ago

0.0.124

4 years ago

0.0.123

4 years ago

0.0.122

4 years ago

0.0.121

4 years ago

0.0.120

4 years ago

0.0.119

4 years ago

0.0.118

4 years ago

0.0.117

4 years ago

0.0.116

4 years ago

0.0.115

4 years ago

0.0.114

4 years ago

0.0.113

4 years ago

0.0.112

4 years ago

0.0.111

4 years ago

0.0.110

4 years ago

0.0.109

4 years ago

0.0.108

4 years ago

0.0.107

4 years ago

0.0.106

4 years ago

0.0.105

4 years ago

0.0.104

4 years ago

0.0.103

4 years ago

0.0.102

4 years ago

0.0.101

4 years ago

0.0.100

4 years ago

0.0.99

4 years ago

0.0.98

4 years ago

0.0.97

4 years ago

0.0.96

4 years ago

0.0.95

4 years ago

0.0.94

4 years ago

0.0.93

4 years ago

0.0.92

4 years ago

0.0.91

4 years ago

0.0.90

4 years ago

0.0.89

4 years ago

0.0.88

4 years ago

0.0.87

4 years ago

0.0.86

4 years ago

0.0.85

4 years ago

0.0.84

4 years ago

0.0.83

4 years ago

0.0.82

4 years ago

0.0.81

4 years ago

0.0.80

4 years ago

0.0.79

4 years ago

0.0.78

4 years ago

0.0.77

4 years ago

0.0.76

4 years ago

0.0.75

4 years ago

0.0.74

4 years ago

0.0.73

4 years ago

0.0.72

4 years ago

0.0.71

4 years ago

0.0.70

4 years ago

0.0.69

4 years ago

0.0.68

4 years ago

0.0.67

4 years ago

0.0.66

4 years ago

0.0.65

4 years ago

0.0.64

4 years ago

0.0.63

4 years ago

0.0.62

4 years ago

0.0.61

4 years ago

0.0.60

4 years ago

0.0.59

4 years ago

0.0.58

4 years ago

0.0.57

4 years ago

0.0.56

4 years ago

0.0.55

4 years ago

0.0.54

4 years ago

0.0.53

4 years ago

0.0.52

4 years ago

0.0.51

4 years ago

0.0.50

4 years ago

0.0.49

4 years ago

0.0.48

4 years ago

0.0.47

4 years ago

0.0.46

4 years ago

0.0.45

4 years ago

0.0.44

4 years ago

0.0.43

4 years ago

0.0.42

4 years ago

0.0.41

4 years ago

0.0.40

4 years ago

0.0.39

4 years ago

0.0.38

4 years ago

0.0.37

4 years ago

0.0.36

4 years ago

0.0.35

4 years ago

0.0.34

4 years ago

0.0.33

4 years ago

0.0.32

4 years ago

0.0.31

4 years ago

0.0.30

4 years ago

0.0.29

4 years ago

0.0.28

4 years ago

0.0.27

4 years ago

0.0.25

4 years ago

0.0.24

4 years ago

0.0.23

4 years ago

0.0.22

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago