-
Notifications
You must be signed in to change notification settings - Fork 1
Feat: Update Discover-More #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 3 commits
2232d32
073a888
9402968
87f61bd
ccb54df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,53 +1,78 @@ | ||||||||
| --- | ||||||||
| title: "Experimental" | ||||||||
| description: "NRCHKB experimental features" | ||||||||
| lead: "" | ||||||||
| description: "NRCHKB experimental features." | ||||||||
| lead: "During development, we add new features that are marked as <code>experimental</code>." | ||||||||
| date: 2021-10-11T23:29:29.943Z | ||||||||
| lastmod: 2022-01-11T16:34:39+01:00 | ||||||||
| lastmod: 2022-01-30T12:38:44.142Z | ||||||||
| draft: false | ||||||||
| images: [] | ||||||||
| menu: | ||||||||
| docs: | ||||||||
| parent: "discover-more" | ||||||||
| weight: 100 | ||||||||
| toc: true | ||||||||
| contributors: ["Shaquu","crxporter"] | ||||||||
| contributors: ["Shaquu","crxporter","GogoVega"] | ||||||||
| --- | ||||||||
|
|
||||||||
| During development, we add new features that are marked as `experimental`. | ||||||||
| These are beta versions containing possible future features. | ||||||||
| We use beta versions to test and improve our features without compromising the experience of our users. | ||||||||
|
Comment on lines
+15
to
+16
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
|
||||||||
| They can be marked that way for few reasons: | ||||||||
| {{< alert icon="‼️" text="Beta versions may contain bug fixes and improvements!" />}} | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not special version :) |
||||||||
|
|
||||||||
|
Comment on lines
+18
to
19
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| 1. Early adopting and testing, allows us to phase new features. | ||||||||
| 2. Discovering better ways to solve problems. | ||||||||
| 3. Easier to test new designs without releasing to public. | ||||||||
| ## Open Node-RED in beta mode | ||||||||
|
|
||||||||
| > **Important Notice,** any experimental feature is subject to change and might be not bug free. | ||||||||
| In order to be able to use experimental features you have to start Node-RED with `NRCHKB_EXPERIMENTAL=true` environment variable. | ||||||||
|
|
||||||||
| ## Getting started | ||||||||
| Enter this command in your terminal: | ||||||||
|
|
||||||||
| In order to be able to use experimental features you have to start Node-RED with `NRCHKB_EXPERIMENTAL=true` environment variable. | ||||||||
| ```bash | ||||||||
| sudo NRCHKB_EXPERIMENTAL=true node-red | ||||||||
| ``` | ||||||||
|
|
||||||||
| With `DEBUG` in addition: | ||||||||
|
|
||||||||
| ```bash | ||||||||
| sudo NRCHKB_EXPERIMENTAL=true DEBUG=NRCHKB* node-red | ||||||||
| ``` | ||||||||
|
|
||||||||
| {{< alert icon="💡" text="Don't forget to stop Node-RED first before launching it in beta mode." />}} | ||||||||
GogoVega marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||
|
|
||||||||
| Examples | ||||||||
|
|
||||||||
| ### Terminal | ||||||||
| ## Use of Debug | ||||||||
|
|
||||||||
| `NRCHKB_EXPERIMENTAL=true node-red` or with `DEBUG` you can use `NRCHKB_EXPERIMENTAL=true DEBUG=NRCHKB* node-red` | ||||||||
| Using debug allows you to see logs and possible errors. | ||||||||
|
|
||||||||
| ### System Service (Raspberry Pi) | ||||||||
| Below is a table with all the possible logs and their description: | ||||||||
|
|
||||||||
| If you run Node-RED using the provided system service after installing with their Raspberry Pi script, then you will need to modify the system service file. | ||||||||
| | Options | Description | | ||||||||
| |---|---| | ||||||||
| | NRCHKB* | Show all HK logs | | ||||||||
| | ServiceUtils | Show Service node logs | | ||||||||
| | BridgeUtils | Show Bridge logs | | ||||||||
| | AccessoryUtils | Show Accessory logs | | ||||||||
| | CharacteristicUtils | Show Characteristic logs | | ||||||||
| | MdnsUtils | Show Mdns logs | | ||||||||
|
|
||||||||
| ## Start automatically in beta mode | ||||||||
|
|
||||||||
| If you want to start Node-RED in beta mode when your system restarts: | ||||||||
GogoVega marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||
|
|
||||||||
| ### Raspberry Pi | ||||||||
|
|
||||||||
| The file should be located at `/lib/systemd/system/nodered.service` | ||||||||
|
|
||||||||
| ```bash | ||||||||
| sudo nano /lib/systemd/system/nodered.service | ||||||||
| ``` | ||||||||
|
|
||||||||
| Find a line starting with `Environment` and add one (or both) of the following lines. | ||||||||
|
|
||||||||
| ```bash | ||||||||
| Environment="NRCHKB_EXPERIMENTAL=true" | ||||||||
| Environment="DEBUG=NRCHKB*" | ||||||||
| ``` | ||||||||
|
|
||||||||
| **Watching these logs** after enabling the logging can be done using the `journalctl -f` command. Specifically on Raspberry Pi, run this command: | ||||||||
| **Watching these logs** after enabling the logging can be done using the `journalctl -f` command. | ||||||||
|
|
||||||||
| ```bash | ||||||||
| sudo journalctl -u nodered.service -f | ||||||||
|
|
@@ -75,23 +100,25 @@ services: | |||||||
|
|
||||||||
| ### Custom Characteristics | ||||||||
|
|
||||||||
| [NRCHKB/node-red-contrib-homekit-bridged#52](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/52) | ||||||||
| It's possible to add custom characteristics ([issues#52](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/52)). | ||||||||
|
|
||||||||
| Using nrchkb node  you can define new Characteristics. | ||||||||
| To do this: | ||||||||
|
|
||||||||
| 1. Configure the node. | ||||||||
|
|
||||||||
|  | ||||||||
|
|
||||||||
| After you add them you need to also enable them on Service node. | ||||||||
| {{< alert icon="💡" >}}You can use this [documentation](https://gist.github.com/simont77/3f4d4330fa55b83f8ca96388d9004e7d) to configure your custom characteristics based on existing characteristics.{{< /alert >}} | ||||||||
|
|
||||||||
| 2. Add your Characteristics on Service node. | ||||||||
|
|
||||||||
|  | ||||||||
|
|
||||||||
| > **Important Notice,** currently, Home.app (default Apple app for managing smart home) is not displaying Custom Characteristics. | ||||||||
| > To see them in action you have to use alternative app like Eve.app | ||||||||
| >  | ||||||||
| {{< alert icon="💡" text="Home.app does not display Custom Characteristics but you can use Eve.app" />}} | ||||||||
|
|
||||||||
| #### Example Eve Characteristics | ||||||||
|
|
||||||||
| ##### Sumary | ||||||||
|  | ||||||||
|
|
||||||||
| | name | UUID | format | description | minValue | maxValue | minStep | | ||||||||
| | ------------- | ------------------------------------ | ------ | ----------------- | -------- | ---------- | ------- | | ||||||||
|
|
@@ -101,12 +128,47 @@ After you add them you need to also enable them on Service node. | |||||||
| | Kilowatt-Hour | E863F10C-079E-48FF-8F27-9C2605A29F52 | float | Eve Kilowatt-Hour | 0 | 4294967295 | 0.01 | | ||||||||
| | Volt-Ampere | E863F110-079E-48FF-8F27-9C2605A29F52 | float | Eve Volt-Ampere | 0 | 4000 | 0.01 | | ||||||||
|
|
||||||||
| ##### `~/.node-red/nrchkb/35b973f1696b4cd60b78ca5f719b83ca` | ||||||||
| You can add the above Characteristics directly in the folder `~/.node-red/nrchkb/35b973f1696b4cd60b78ca5f719b83ca` by pasting the content below into it: | ||||||||
|
|
||||||||
| ```json | ||||||||
| {"key":"customCharacteristics","value":[{"name":"Volt","UUID":"E863F10A-079E-48FF-8F27-9C2605A29F52","format":"uint16","unit":"","perms":["pr","pw","ev","tw","wr"],"ev":"true","description":"Eve Volt","minValue":"0","maxValue":"400","minStep":"3","maxLen":"","maxDataLen":"","validValues":"","adminOnlyAccess":["0","1","2"]},{"name":"Ampere","UUID":"E863F126-079E-48FF-8F27-9C2605A29F52","format":"float","unit":"","perms":["pr","pw","ev","tw","wr"],"ev":"true","description":"Eve Ampere","minValue":"0","maxValue":"16","minStep":"0.01","maxLen":"","maxDataLen":"","validValues":"","adminOnlyAccess":["0","1","2"]},{"name":"Watt","UUID":"E863F10D-079E-48FF-8F27-9C2605A29F52","format":"uint16","unit":"","perms":["pr","pw","ev","tw","wr"],"ev":"true","description":"Eve Watt","minValue":"0","maxValue":"3500","minStep":"","maxLen":"","maxDataLen":"","validValues":"","adminOnlyAccess":["0","1","2"]},{"name":"Kilowatt-Hour","UUID":"E863F10C-079E-48FF-8F27-9C2605A29F52","format":"float","unit":"","perms":["pr","pw","ev","tw","wr"],"ev":"true","description":"Eve Kilowatt-Hour","minValue":"0","maxValue":"4294967295","minStep":"0.01","maxLen":"","maxDataLen":"","validValues":"","adminOnlyAccess":["0","1","2"]},{"name":"Volt-Ampere","UUID":"E863F110-079E-48FF-8F27-9C2605A29F52","format":"float","unit":"","perms":["pr","pw","ev","tw","wr"],"ev":"true","description":"Eve Volt-Ampere","minValue":"0","maxValue":"4000","minStep":"0.01","maxLen":"","maxDataLen":"","validValues":"","adminOnlyAccess":["0","1","2"]}]} | ||||||||
| ``` | ||||||||
|
|
||||||||
| ### Service 2 | ||||||||
|
|
||||||||
| [NRCHKB/node-red-contrib-homekit-bridged#392](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/392) | ||||||||
| Added `Get` functionality so that the node can retrieve attribute values when a refresh is requested. [issues#392](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/392) | ||||||||
|
|
||||||||
| Together with NRCHKB 2.0.0 (TBC) `onSet` and `onChange` will be merged into unified output called events. | ||||||||
|
|
||||||||
| It will output data for all event types defined below: | ||||||||
|
|
||||||||
| - set | ||||||||
| - change | ||||||||
| - subscribe | ||||||||
| - unsubscribe | ||||||||
| - characteristic-warning | ||||||||
|
|
||||||||
| Node output will look like: | ||||||||
|
|
||||||||
| ```js | ||||||||
GogoVega marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||
| type HAPServiceNodeEvent = {name: CharacteristicEventTypes, context?: any} | ||||||||
|
|
||||||||
| type HAPServiceNodeOutput = { | ||||||||
| payload: { [key: string]: any } | ||||||||
| hap: { | ||||||||
| oldValue?: any | ||||||||
| newValue?: any | ||||||||
| context?: any | ||||||||
| event: HAPServiceNodeEvent | ||||||||
| session?: { | ||||||||
| sessionID?: SessionIdentifier, | ||||||||
| username?: HAPUsername, | ||||||||
| remoteAddress?: string, | ||||||||
| localAddress?: string, | ||||||||
| httpPort?: number, | ||||||||
| } | ||||||||
| } | ||||||||
| name?: string | ||||||||
| topic: string | ||||||||
| } | ||||||||
| ``` | ||||||||
Uh oh!
There was an error while loading. Please reload this page.