-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Bump schema and embedded socket client #66
Conversation
@marcus-j-davies I will test tomorrow. I build it though, and there is now a lot of compilation warnings caused by the fact that the nullable context is now enabled for the whole project. I think it is a bit dangerous to enable it for the whole project because now all reference type variables in the ZWaveJS.NET code are considered non nullable whereas they were previously nullable. So instead, I would keep the nullable setting as disabled at the project level, and I would add preprocessor directives at the beginning of each file of the Websocket.Client code https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references#nullable-contexts Thanks for the long range support, we plan to add that soon too. |
Thanks @spudwebb Have removed the global setting, and switched them were needed
|
@spudwebb The new targets are : No modification on Socket source code (the last commit before v5) was needed (tested with a .NET 4.8 console app) I have included a test console app, to demo LR - LR can only be achieved with Smart Start. ZWaveJS.NET.ZWaveOptions ZWO = new ZWaveJS.NET.ZWaveOptions();
ZWO.securityKeys.S0_Legacy = "c84de525ba1382374615f93427a18138";
ZWO.securityKeys.S2_AccessControl = "3d18628e80743ebaf96d97707cffb139";
ZWO.securityKeys.S2_Authenticated = "c2da28bc56ad5484fcf10efd2a1ed1c1";
ZWO.securityKeys.S2_Unauthenticated = "69ded77863e0b64401f1ac12c4d15c86";
ZWO.securityKeysLongRange.S2_AccessControl = "1e76388da0674c6d799e6f1f6bef0c91";
ZWO.securityKeysLongRange.S2_Authenticated = "6b948cf3ea8679e57b7f89cce47bcb18";
ZWO.logConfig.logToFile = false;
ZWO.logConfig.enabled = true;
ZWO.enableSoftReset = false;
ZWaveJS.NET.Driver D = new ZWaveJS.NET.Driver("COM3", ZWO);
D.DriverReady += () => {
D.Utils.ParseQRCodeString("900143047006000000000000000000000000000000000000000000100025800002022000004000050000601800080201").ContinueWith((R1) =>
{
QRProvisioningInformation QRI = R1.Result.ResultPayload as QRProvisioningInformation;
// Modify based on users choice (Protoccol)
// Then...
// D.Controller.ProvisionSmartStartNode(QRI).ContinueWith((R2) => { ... });
});
};
D.Start();
Console.ReadLine(); Let me know if this PR (more so the recent commit to it -> 23c58fb) is working for you |
Everything is working as expected. Thanks a lot! |
@spudwebb
Do you want to pull this code?
Adds Support for Long Range (there are extra keys in the settings class to support this)
Testing this may be difficult (impossible) as devices are still being surfaced.
The controller now has a property called
supportsLongRange
+ theZWaveNode
class now has a property calledprotocol
Adds a
Utils
class to theDriver
This provides access to
ParseQRCodeString
as The ZWA insist in users being provided a choice, as to use ZWave LR or classic (and the result in the CMD payload isQRProvisioningInformation
)This can then be modified before passing to
ProvisionSmartStartNode
(and importantly, allowing users to switch to LR if supported/detected in the QR Code)ProvisionSmartStartNode
now has an overload to provide aQRProvisioningInformation
instance (to aid the above)Bump Scheme to 35
Embeds the Socket Lib (4.7.0)- right before it got bumped to v5 (removing NS2.0)
and this contains the stack overflow fix
Have tested the lib, and all seems to be fine.