• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Foxi352/homebridge-smarthomeng: Homebridge plugin for SmartHomeNG

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

Foxi352/homebridge-smarthomeng

开源软件地址:

https://github.com/Foxi352/homebridge-smarthomeng

开源编程语言:

TypeScript 100.0%

开源软件介绍:

homebridge-smarthomeng

npm verified-by-homebridge npm npm npm npm

Version v2 is a complete rewrite from scratch and a breaking update.
You need to adapt your config.json !

Currently supported accessories

This plugin currently supports the following services (and characteristics):

Type Description
ContactSensor Simple contact sensor, for example for windows
Doorbell Doorbell, sends message to devices on ring
Fan Simple on/off fan, may be extended in future
GarageDoor Garage door opener
HumiditySensor Humidity sensor
Lightbulb Everything, from simple light to dimmable, RGB and RGBW
MotionSensor Detects and reports motion
OccupancySensor Detects presence in a room
Outlet Simple on/off wall outlet
SecuritySystem Intrusion alarm system
Switch Simple on/off switch
TemperatureSensor Temperature sensor
Thermostat Thermostat with temperature sensor and heating state
WindowCovering Window covering (shutters, blinds, ...)

Requirements

Installation of plugin

Use Homebridge Config UI X or install manually using npm install -g homebridge-smarthomeng

Configuration

If you already have a working homebridge installation just add the platform section into your existing config. If you are a new homebridge user you have to create a config.json file in the .homebridge directory. You'll find that directory in your home folder.

Platform configuration

The following parameters are available to configure the plugin as platform in homebridge.

Parameter Possible values Mandatory Default Description
platform Any <string> Yes Internal name of your platform
name Any <string> Yes Visible name in HomeKit
host IP address or FQDN of your SHNG server Yes Your SHNG host
port Port <number> No 2424 Listening port of websocket module.
tls <boolean> No False Should TLS encryption be used.

Example configuration:

{
    "platform": "SmartHomeNG",
    "name": "SmartHomeNG",
    "host": "smarthome.my.domain",
    "port": 2425,
    "tls": true,
}

Common accessories characteristics

The following characteristics are valid for all accessories:

Parameter Possible values Mandatory Description
type Supported <type> of accessory Yes Type from the list of supported accessories
name Any <string> Yes Visible name in HomeKit
manufacturer Any <string> No Visible manufacturer in HomeKit
model Any <string> No Visible model in HomeKit

Example:

{
    "type": "OccupancySensor",
    "name": "Presence kitchen",
    "manufacturer": "Preussen",
    "model": "Motion 360 KNX",
}

Contact sensor

This sensor shows the open / closed state of a contact (door, window, generic ...).

Characteristics in addition to common characteristics

Parameter Possible values Mandatory Description
ContactState <item> Yes SHNG item to monitor for contact

Example:

{
    "type": "ContactSensor",
    "name": "Window kitchen",
    "ContactState": "EG.Kueche.Fenster"
}

Doorbell

A doorbell is an accessory that simply sends a message to all devices enrolled in the home that someone rang the doorbell. HomeKit displays a message that "This accessory is not currently supported by the Home app.". Further investigation is needed, but for now it still works.

Characteristics in addition to common characteristics

Parameter Possible values Mandatory Description
SinglePress <item> Yes SHNG item to monitor for doorbell ring

Example:

{
    "type": "Doorbell",
    "name": "Main door",
    "SinglePress": "Technik.Asterisk.Klingel"
}

Fan

For now this accessory only supports turning the fan on and off. Further improvements are possible, but i don't have the needed hardware for testing.

Characteristics in addition to common characteristics

Parameter Possible values Mandatory Description
Active <item> Yes SHNG item to set and get the fan state.
RotationSpeed <item> No SHNG item to set and get the fan rotation speed

Example:

{
    "type": "Fan",
    "name": "Fan bathroom",
    "Active": "OG.Bad.Ventilator"
}

Garage Door

This accessory is used for opening/closing garage doors or any other automatic gate.

Characteristics in addition to common characteristics

Parameter Possible values Mandatory Description
CurrentDoorState <item> Yes SHNG item to monitor the current door state
TargetDoorState <item> Yes SHNG item to monitor and set the target position
ObstructionDetected <item> No SHNG item to monitor if the door is blocked

Additional comments

Valid values for 'CurrentDoorState':

  • OPEN = 0
  • CLOSED = 1
  • OPENING = 2
  • CLOSING = 3
  • STOPPED = 4

Valid values for 'TargetDoorState':

  • OPEN = 0
  • CLOSED = 1

'ObstructionDetected' may be set 'true' if there is any physical problem opening/closing the door.

Example

{
    "type": "GarageDoor",
    "name": "GarageRechts",
    "currentdoorstate": "garage.rechts.cds",
    "targetdoorstate": "garage.rechts.tds",
    "obstructiondetected": "garage.rechts.od"
}

Humidity sensor

This accessory shows the current relative humidity in %.

Characteristics in addition to common characteristics

Parameter Possible values Mandatory Description
CurrentHumidity <item> Yes SHNG item to monitor relative humidity in %

Example:

{
    "type": "HumiditySensor",
    "name": "Luftfeuchtigkeit Glashaus",
    "CurrentHumidity": "Glashaus.Luftfeuchtigkeit"
}

LightBulb

Lightbulb can be as simple as a generic on/off light, but can also be as complex as a full RGBW led strip.

Characteristics in addition to common characteristics

Parameter Possible values Mandatory Default Description
On <item> Yes SHNG item to switch the lightbuld on or off
Brightness <item> No SHNG item to monitor and set the brigtness for a dimmable light
BrightnessMin <number> No 0 Your device's minimum value for brightness
BrightnessMax <number> No 100 Your device's maximum value for brightness
Hue <item> No SHNG item to get and set the HUE in case of a HSB light
Saturation <item> No SHNG item to get and set the saturation in case of a HSB light
R <item> No SHNG item for the RED color in case of RGB(W) light
RMin <number> No 0 Your device's minimum value for the RED color
RMax <number> No 100 Your device's maximum value for RED color
G <item> No SHNG item for the GREEN color in case of RGB(W) light
GMin <number> No 0 Your device's minimum value for the GREEN color
GMax <number> No 100 Your device's maximum value for GREEN color
B <item> No SHNG item for the BLUE color in case of RGB(W) light
BMin <number> No 0 Your device's minimum value for the BLUE color
BMax <number> No 100 Your device's maximum value for BLUE color

Additional comments

HomeKit works with values between 0 and 100 where 0 is completely dim and 100 is maximum brightness.
My KNX installation, as example, needs values between 0 and 255.
The above optional min and max parameters allow you to specify the neede range for your device. The plugin then transposes the values in both directions.

Example (used for my KNX RGBW strip):

{
    "type": "Lightbulb",
    "name": "RGBW strip living room",
    "On": "EG.Stube.Ledleiste",
    "Brightness": "EG.Stube.Ledleiste.dimmen",
    "BrightnessMin": 0,
    "BrightnessMax": 255,
    "R": "EG.Stube.Ledleiste.R.dimmen",
    "RMin": 0,
    "RMax": 255,
    "G": "EG.Stube.Ledleiste.G.dimmen",
    "GMin": 0,
    "GMax": 255,
    "B": "EG.Stube.Ledleiste.B.dimmen",
    "BMin": 0,
    "BMax": 255,
    "W": "EG.Stube.Ledleiste.W.dimmen",
    "WMin": 0,
    "WMax": 255
}

Motion sensor

This sensor is tripped if it detects motion in a room.

Characteristics in addition to common characteristics

Parameter Possible values Mandatory Description
MotionDetected <item> Yes SHNG item to monitor for motion

Example:

{
    "type": "MotionSensor",
    "name": "Movement hallway",
    "MotionDetected": "EG.Flur.Bewegung"
}

Occupancy sensor

This sensor is tripped if it detects presence in a room.

Characteristics in addition to common characteristics

Parameter Possible values Mandatory Description
OccupancyDetected <item> Yes SHNG item to monitor for presence

Example:

{
    "type": "OccupancySensor",
    "name": "Presence bathroom",
    "manufacturer": "Preussen",
    "model": "Motion 360 KNX",
    "OccupancyDetected": "OG.Bad.Praesenz"
}

Outlet

This accessory can monitor and change the on/off state of a wall outlet. The outlet can be generic, a light, a fan, ...

Characteristics in addition to common characteristics

Parameter Possible values Mandatory Description
On <item> Yes SHNG item to switch outlet on or off

Example:

{
    "type": "Outlet",
    "name": "Christmas tree",
    "On": "EG.Esszimmer.Steckdose"
}

Security system

This accessory can pilote your intrusion security system. That system can be a physical one operated via SHNG, or a SHNG native logic.

Characteristics in addition to common characteristics

Parameter Possible values Mandatory Description
CurrentState <item> Yes SHNG item to monitor for the current alarm state
TargetState <item> Yes SHNG item to set or get the target state

Additional comments

Valid values for 'CurrentState':

  • STAY_ARM = 0
  • AWAY_ARM = 1
  • NIGHT_ARM = 2
  • DISARMED = 3
  • ALARM_TRIGGERED = 4

Valid values for 'TargetState':

  • STAY_ARM = 0
  • AWAY_ARM = 1
  • NIGHT_ARM = 2
  • DISARMED = 3

Example:

{
    "type": "SecuritySystem",
    "name": "Intrusion alarm",
    "currentState": "Technik.Alarmanlage.Status.Ist",
    "targetState": "Technik.Alarmanlage.Status.Soll"
}

Switch

This accessory can monitor and change the on/off state of something. It is very similar to an outlet.

Characteristics in addition to common characteristics

Parameter Possible values Mandatory Description
On <item> Yes SHNG item to switch something on or off

Example:

{
    "type": "Switch",
    "name": "Music living-room",
    "On": "EG.Stube.Radio"
}

Temperature sensor

This sensor shows the actual temperature.

Characteristics in addition to common characteristics

Parameter Possible values Mandatory Description
CurrentTemperature <item> Yes SHNG item to monitor for temperature

Example:

{
    "type": "TemperatureSensor",
    "name": "Temperature WC",
    "CurrentTemperature": "EG.WC.Temperatur"
}


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Homebrew/homebrew-cask-fonts: 发布时间:2022-06-17
下一篇:
skyline-emu/skyline: Run Nintendo Switch homebrew &amp; games on your Android de ...发布时间:2022-06-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap