-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add support for environment variables in characteristic properties #217
Comments
This has been discussed twice that I remember - having homekit inside of a subflow. Up to now it’s been recommended as “probably don’t do this” But I do see benefit of it for example if one has 15 identical switches around their house they can set up one flow and just put it in 15 times with different names for each switch. |
Okay, I see an option to make it work for us. We would have to abandon current node id system in favor of our internal id generator in NRCHKB. Th�en every service node would generate random id on first flow save but it would persist even in sub flows I guess? I have to look at this closer. |
Hmm yeah I hadn’t gotten to the part yet where that might still cause trouble :(
But I do thing somehow being able to use them in sub flows is a good thing.
I also discovered ${MY_VAR} seems to work for most fields but not the characteristic field.
Seems fine to fix this when the other one gets tackled.
~ sjorge
… On 1 Mar 2020, at 23:48, Shaq ***@***.***> wrote:
Okay, I see an option to make it work for us. We would have to abandon current node id system in favor of our internal id generator in NRCHKB.
Th�en every service node would generate random id on first flow save but it would persist even in sub flows I guess? I have to look at this closer.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Standard fields are node-red fields. And characteristic field is JSON field so I guess it is the thing. I will look at this and see if it's ease to add it. |
They are supported in |
@Shaquu is this request covered by the new “Wait for setup” feature? |
I have tested in the subflow (with 1.4.0-dev.7). {
"Brigthness": {
"description": "${test}"
}
}
|
@sjorge please test solution on dev branch |
Doesn't look available yet in the current release? But that is not showing 1.4.0 for me though. |
To install newest dev release from today:
|
Not sure it's working for number values
I had this on a bulb and I set ctMin=250,ctMax=454 What I expected and got with:
Edit: I tested with 'Service' I also noticed there was a 'Service 2' should I test with that one instead? |
@sjorge would you mind coming to our discord (NRCHKB)? I would have a question in a different topic, but I can reach out to you only this way. thank you |
I don't really use discord, but we could use the github discussion page? |
I have tested using latest dev.
Known issue. For some Characteristics value must be a number type. |
I would say to go prod with that issue. Reasons:
|
### Fixed - Fixed customCharacteristics incorrect refresh in UI - Implemented static accessoryUUIDs for subflows Enables the use of nrchkb nodes in subflows with backwards compatibility #393 - thanks @kevinkub - Fixed Custom MDNS Configuration not showing in UI for Standalone Accessory - Stop components from clearing other component's node.status call - Add missing advertiser selector in UI for Standalone Accessory - Not naming the host node causes a crash #424 - Do not output oldValue for onSet as it does not have access to old value ### Added - Notice during app launch: Node.js 10 will be deprecated in Node-RED 2.0.0 - Event output in Service 2 which is available in NRCHKB_EXPERIMENTAL #392 #437 - Status node to fetch Serialized Service #210 - Support for environment variables in characteristic properties #217 ### Changed - Updated hap-nodejs to 0.9.5 (added new iOS 15 Services and Characteristics) - Updated dependencies to latest versions - Changed `BatteryService` to `Battery` in demo examples as `BatteryService` is deprecated #381 - thanks @crxporter - Readme rework - thanks @crxporter - More descriptive error when incorrect Characteristic has been used in msg.payload - Add msg.hap.allChars to service nodes #438
It would be nice to have support for environment variables inside the characteristic properties section too. That way you can embed a service inside a subflow and configure it via some subflow variables.
https://nodered.org/docs/user-guide/environment-variables
The text was updated successfully, but these errors were encountered: