Skip to content
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

Manager.GetGroupLabel() not implemented? #19

Closed
yesyesuk opened this issue Jun 20, 2018 · 6 comments
Closed

Manager.GetGroupLabel() not implemented? #19

yesyesuk opened this issue Jun 20, 2018 · 6 comments
Assignees

Comments

@yesyesuk
Copy link

Hi,
I'm working on adding Group Associations to the ZWave port on my home automation system. I would like to display a list of groups a node supports so that the user can choose a group by name.

But it looks like Manager.GetGroupLabel() is not implemented in the .net wrapper. Is that correct? If so, is there another way to get the group names?

Thanks,
Chris

@dotMorten
Copy link
Member

Fixed! Thanks. Keep'em coming

@yesyesuk
Copy link
Author

Excellent, thanks! That was quick.

Sorry for re-opening, but how do I get this change into my project now? Can I update this vis NuGet already or do I need to wait for a new build from you?
I'm running VS2017, WinForms app, .NET4.5.2

@dotMorten
Copy link
Member

You'd have to pull the source code and rebuild it yourself. I'm not planning on updating the nuget until openzwave makes the next official release

@yesyesuk
Copy link
Author

hmmm, I might need a bit of help with that. I have never compiled someone else's DLL before. ;-)

I downloaded the source from here, found a file called "CompilingOpenZWave.aml" that said I should download the OZW dev branch and copy it to the "open-zwave" subfolder.

Then I opened \src\OpenZWaveDotNet.sln in VS2017 and did the suggested conversions. Then I tried to build with "ReleaseDLL" config. That failed in many ways. Then I build with just "Release" and that looked much better. But I still get 3 errors, all "unresolved external symbol"

Error	LNK2001	unresolved external symbol "public: void __thiscall OpenZWave::Localization::SetupCommandClass(class OpenZWave::CommandClass *)" (?SetupCommandClass@Localization@OpenZWave@@QAEXPAVCommandClass@2@@Z)	OpenZWaveDotNet	U:\temp\openzwave-dotnet-uwp-master\src\OpenZWave\OpenZWave.lib(CommandClasses.obj)	1	

Error	LNK2001	unresolved external symbol "public: static class OpenZWave::Localization * __cdecl OpenZWave::Localization::Get(void)" (?Get@Localization@OpenZWave@@SAPAV12@XZ)	OpenZWaveDotNet	U:\temp\openzwave-dotnet-uwp-master\src\OpenZWave\OpenZWave.lib(CommandClasses.obj)	1	

Error	LNK2001	unresolved external symbol "public: void __thiscall OpenZWave::Localization::SetupValue(class OpenZWave::Value *)" (?SetupValue@Localization@OpenZWave@@QAEXPAVValue@2@@Z)	OpenZWaveDotNet	U:\temp\openzwave-dotnet-uwp-master\src\OpenZWave\OpenZWave.lib(ValueStore.obj)	1	

Looks like I'm still missing something. Any idea what that might be?

@dotMorten
Copy link
Member

You only need to clone this repo, AND its submodule, and all you would need to do is open the solution and hit "build".

@yesyesuk
Copy link
Author

OK, thanks so much!
Without really knowing what exactly I'm doing I think I got it to compile properly now. ;-)
I then copied the new DLL and XML file to <my_project>\packages\OpenZWave.2.0.0-beta2\lib\net452, opened my project and then I was able to use Manager.GetGroupLabel() successfully.

By the way, there was one error left. It was in one of the samples.
in \Samples\UWP\OZWAppx\ApplicationState.cs on line 61 it was complaining about
activePorts.Remove(item.Id);
I changed it to
activePorts.Remove(item);
and then it compiled. I don't use the samples, so I'm not sure this is a proper "fix". I just thought I'd mention it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants