Node-red-contrib-homekit-bridged: Is it possible to add support for any custom characteristic ?

Created on 6 Mar 2019  路  26Comments  路  Source: NRCHKB/node-red-contrib-homekit-bridged

I think this will be a good idea for the roadmap
just add a possibility to create any custom characteristic
like add any UUID type and name for that?
it will be allowed to add any custom characteristic to EVE app.

enhancement

Most helpful comment

All 26 comments

You can check an example of how it can be extended
that will add the possibility to create any services and any accessories
https://github.com/RavenSystem/esp-homekit-devices/blob/master/devices/common/custom_characteristics.h

Please see: https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/Characteristic.js#L21

Shouldn't be difficult to integrate, i.e. probably just setting a custom UUID.

An example of an custom characteristic AtmosphericPressureLevel can be found here: https://github.com/rxseger/homebridge-bme280/blob/master/lib/CustomCharacteristic.js#L12

@faronov @fschaefer
I finally made up my mind to look at this and add it in near future.

How do you see it to be used actually?
Is it for using Eve? Or other apps?
How do you see adding custom characteristics?
Should we add them to code or allow users to add them?

Bump. Your opinion is important for me.

Currently this available for Eve, not sure about other apps
I think we must allow a user to specify any UUID for custom characteristic and add details

Can you make an example of such? I mean details of custom characteristics.

this also a good example
https://github.com/rxseger/homebridge-bme280/blob/master/lib/CustomCharacteristic.js#L12
Apple did not support pressure for sensor
but eve support it
if you wish to add this information to show in eve app you just add eve defined UUID for that
and it will show up in eve app

this is also a good example
https://github.com/simont77/homebridge-weather-station-eve
it will not only show all weather details, but it will show graphic history
like that
https://i.imgur.com/8opO7hel.png

@Shaquu maybe some sort of config option to 'define' them on the bridge, and then have the available by pretty name on the services? (Or in the fancy UI once that gets implemented)

I'll probably also be using a few of them to map some of the stuff my Aqara zigbee sensors data so that I can view it in Eve.

Hello! A good example for custom characteristics is Samsung's air conditioner with WindFree mode.
Right now neither "thermostat" nor "coolerheater" item allows to push such a mode to the A/C and of course - this is the one I use most often :-)
Only the standard ones like: Heat / Cool / Dry / Auto are available.

Part of the device status response:
"airConditionerMode": { "supportedAcModes": { "value": [ "aIComfort", "cool", "dry", "wind", "auto", "heat"

After update of Samsung Automation Studio (v 1.0.11) my device accepts / reports following parameters:
Samsung_Avant_Windfree_1.0.11

Feature is ready to be tested on dev branch.

  1. Drag and drop new node called NRCHKB (it is an optional node, used only for changing Custom Characteristics, after you add them you can remove node from flow)
  2. Specify Characteristics in NRCHKB node editor (for example we add Characteristic called Test)
  3. Add Test to Characteristic Properties for your Service ({"Test": true} should be enough)

Heads up all, this is being built now. We are looking for feedback on the best way to handle it. Please join the discussion on discord if you have thoughts!

https://discord.gg/uvYac5u

From now on this feature is labeled as experimental.
To enable it run node-red with NRCHKB_EXPERIMENTAL=true env variable.

hi everyone, I鈥檇 like to test the functionality and with some tinkering have the newest dev version (38) running on nodered 1.2.9 (in a docker container).

The package shows up and so does the nodes relevant to this, but for some reason the NRC* node doesn鈥檛 show up in my palette:

Bookmarks

Am I missing something? Some hidden handshake to drag it to my flows?

Are you running with experimental mode as described by Shaquu in the comment just above yours? I haven't actually tried this feature yet but I'm following along a bit.

As said @CaseyRo read my previous comment :) You need to start NodeRED with special parameter.

https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/52#issuecomment-790752453

I was aware of that part - so I added it to the docker composer setup as an environment variable (and the node specific project variable too, to make sure this works):

PNG image

unfortunately, still no node showing up in my palette. I could build a separate docker image to have this env variable around when launching, would that make a difference? (I guess not, but you鈥檙e the expert here!)

First thing, add DEBUG=NRCHKB* env variable.
Start container and share the logs from boot.

Second consider using our image nrchkb/node-red-homekit

2021-03-23T17:30:39.676Z NRCHKB:HAPHostNode [CYB:7371888d.19c8e] Creating Bridge with UUID 00989278-93fe-4160-a9a0-2d8265ffef59

2021-03-23T17:30:42.303Z NRCHKB:HAPServiceNode [testkees:a177d0d.8518bb] Starting Parent Service

2021-03-23T17:30:42.314Z NRCHKB:AccessoryUtils [testkees:a177d0d.8518bb] Looking for accessory with service subtype 7504ba4e-507a-4ced-aba9-ada697d1958e ...

2021-03-23T17:30:42.315Z NRCHKB:AccessoryUtils [testkees:a177d0d.8518bb] ... didn't find it. Adding new accessory with name testkees and UUID 0c3e7fad-ad90-41f3-9d37-ea8395cd233c

2021-03-23T17:30:42.322Z NRCHKB:AccessoryUtils [testkees:a177d0d.8518bb] Bridge now has 1 accessories.

2021-03-23T17:30:42.323Z NRCHKB:ServiceUtils [testkees:a177d0d.8518bb] Looking for service with UUID 7504ba4e-507a-4ced-aba9-ada697d1958e ...

2021-03-23T17:30:42.324Z NRCHKB:ServiceUtils [testkees:a177d0d.8518bb] ... didn't find it. Adding new ServiceLabel service.

2021-03-23T17:30:47.330Z NRCHKB:HAPHostNode [CYB:7371888d.19c8e] Publishing Bridge with pin code 123-45-678 and 1 accessories

2021-03-23T17:30:47.359Z NRCHKB:BridgeUtils [testkees:a177d0d.8518bb] Bridge published

Logs filtered on NRCHKB.

Why would I use your docker image? I'm a bit cautious to simply assume that is better - happy to run a separate docker instance to test if that makes sense (for testing)

Regarding the image I would say that if you are comfortable with your own set up then there is no need to move to ours.
Thing is that sometimes people use strange images/setup like iostack which is less easy for us to debug.

Regarding logs, are you sure you did not skip some?
Check first lines after node-red starts. If you don't see what I see then probably you are not passing the experimental flag properly.

Welcome to Node-RED
===================

24 Mar 23:51:53 - [info] Node-RED version: v1.2.9-git
24 Mar 23:51:53 - [info] Node.js  version: v14.15.4
24 Mar 23:51:53 - [info] Windows_NT 10.0.19042 x64 LE
24 Mar 23:51:55 - [info] Loading palette nodes
24 Mar 23:51:57 NRCHKB-Error Experimental features enabled +0ms

Here you go @Shaquu:

CleanShot 2021-03-25 at 10 36 07

I already spotted I'm running NR on an older Node version - maybe that's a key here?

Great. I think I have found a bug so please update to latest dev.

Thanks @Shaquu! It's there! I'm testing it once my workday is over! excited

@CaseyRo just be careful and backup what you have ;)
It's called experimental for a reason.

@CaseyRo just be careful and backup what you have ;)
It's called experimental for a reason.

yes sir, especially with adding new accesoires to homekit 馃榾 (home+ is great for backups of that)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaltaberski picture michaltaberski  路  6Comments

Supergiovane picture Supergiovane  路  9Comments

djiwondee picture djiwondee  路  4Comments

Barabba11 picture Barabba11  路  3Comments

djiwondee picture djiwondee  路  11Comments