Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Firmware updates#43

georgeinva2004 started this conversation inGeneral
Oct 19, 2023· 3 comments· 3 replies
Discussion options

TheZwave Firmware Update project implies that all ZwaveJS projects already have an API key. Does that apply to ZwaveJS.Net? Does the PSI file embed that key somewhere so we don't have to request one for ourselves?

You must be logged in to vote

Replies: 3 comments 3 replies

Comment options

Hi@georgeinva2004,

Whilst the projects are all under the ZWaveJS ORG on GitHub - the projects are owned by their respective developer as individuals - we don't get perks 😒

I founded the Node RED plugin, and of course the NET lib. I acquired a license for my Node RED project - as it's open source, so was free, but i allow users who use it in a corporate setting to enter a key (to override the embedded one)

The .NET lib will take on a similar approach (thank you for reminding me, I need to ask for one).

You can request one with no fuss as it's a home project viainfo@zwave-js.io

But one will be embedded before release, for non commercial-use

You must be logged in to vote
0 replies
Comment options

I should note:

Once the non-commercial key is embedded, the requirement for a key will become optional when using the method.

You must be logged in to vote
2 replies
@georgeinva2004
Comment options

I figured it would be something like that. Thanks for letting us know!

@marcus-j-davies
Comment options

I now have my key - I'll get it implemented soon 👍

Comment options

Working on implementing the Firmware update functionality. I was able to secure a key. The NET Lib is throwing an exception in Controller.GetAvailableFirmwareUpdates(..). It looks like NewtonSoft is having a problem deserializing the result.updates token when there are no updates. Exception details below. Assuming that the return value is an array, I made the following change to line that deserializes the result.updates token:

List<FirmwareUpdateInfo> FUI = JsonConvert.DeserializeObject<List<FirmwareUpdateInfo>>(JO.SelectToken("result.updates").ToString());

As you can see, I just made the result a List and it appears to be working. Unfortunately, I don't have any devices that are reporting as needing a firmware update, so I can't fully test the functionality. I hope this helps...

Newtonsoft.Json.JsonSerializationException: 'Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'ZWaveJS.NET.FirmwareUpdateInfo' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path '', line 1, position 1.'

This exception was originally thrown at this call stack:
[External Code]
ZWaveJS.NET.Controller.GetAvailableFirmwareUpdates.AnonymousMethod__0(Newtonsoft.Json.Linq.JObject) in Controller.cs
ZWaveJS.NET.Driver.WebsocketClient_MessageReceived(object, Websocket.Client.ResponseMessage) in Driver.cs

You must be logged in to vote
1 reply
@marcus-j-davies
Comment options

Thanks@georgeinva2004 I'll get it patched over the weekend (when I implement the embedded key) 👍

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
General
Labels
None yet
2 participants
@georgeinva2004@marcus-j-davies

[8]ページ先頭

©2009-2025 Movatter.jp