homebridge-schbar v0.13.8
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
- 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
- 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
- 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
- index.js - Accessory - Outlet >> Version 0.3.x
- Transform to just add Characteristic
- index.js - Accessory - Temperature > Version 0.4.x
- First Sensor implementation
- StatusLowBattery
- index.js - Accessory - Luminance = Light Sensor > Version 0.5.x
- Add Light Sensor
- index.js - Accessory - Motion > Version 0.6.x
- Add Motion Sensor
- Add reverse parameter
- Add noStatus parameter
- Adapt timePolling method to other sensor
- index.js - Accessory - Contact Sensor > Version 0.7.x
- Add Contact sensor
- index.js - Accessory - Window > Version 0.8.x
- Add Window State value > in fact that a sensor with a window logo...
- index.js - Accessory - Door > Version 0.9.x
- Add Door based on the window implementation
- Auto get status if put (like window)
- index.js - Accessory - Leak > Version 0.10.x
- Add leak sensor and test with testValue
- index.js - Accessory - Battery > Version 0.11.x
- Implemented the battery option
- Add a double service on one accessory
- index.js - Accessory - CO Sensor > Version 0.12.x
- Add CO SENSOR
- index.js - Accessory - Alarm = Security System > Version 0.13.x
- Add security aspect and code
- 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
Parameter | Remarks |
---|---|
accessory | MUST be ZipaAccessory, will say at Homebridge to use the good plugin |
type | Select the Accessory Type. switch (default) -others see below- |
name | Name of your plugin, will be displayed in HomeKit (muss be unique) |
USERNAME | Username use to connect to my.zipato.com |
PASSWORD | Password use to connect to my.zipato.com > never publish your Config with this infos |
server_ip | Local ip of your Box : format 192.168.0.1 - do not add http or port |
uuid | uuid of your devices Switch (see Below) |
uuidB | (Optional) Specify a second uuid for a service with two implementedCharacteristic - see below - |
manufacturer | Manufacturer of your device. No more use than info in HomeKit |
model | Model of your device. No more use than info in HomeKit |
serial | Serial 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
Device | type | Methods |
---|---|---|
Switch (default) | switch | Get Status - Set On - Set Off - Unavailable |
Light Bulb | light | Get Status - Set On - Set Off - Unavailable |
Outlet | outlet | Get Status - Set On - Set Off - Unavailable |
Temperature Sensor | temperature | Get Value - Battery Low Status - Unavailable |
Light Sensor | ambient | Get Value - Battery Low Status - Unavailable |
Motion Sensor | motion | Get Value - Battery Low Status - Unavailable |
Contact Sensor | contact | Get Value - Battery Low Status - Unavailable |
Window | window | Current Position (0 or 100 %) - Unavailable |
Door | door | Current Position (0 or 100 %) - Unavailable |
Leak Sensor | leak | Get Value - Battery Low Status - Unavailable |
Battery | battery | Battery Level - Status - Unavailable |
Carbon Monoxide | co | Carbon Detected - Battery Low Status - Unavailable |
Security System | alarm | Ongoing |
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.
Accessory | uuid | uuidB |
---|---|---|
Battery | BatteryLevel | ChargingStage |
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.
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago