getsenic / nuimo-windows Goto Github PK
View Code? Open in Web Editor NEWLibrary for Windows 10 platforms to connect and communicate with Nuimo controllers made by Senic
License: MIT License
Library for Windows 10 platforms to connect and communicate with Nuimo controllers made by Senic
License: MIT License
In a "real" app you wouldn't look for Nuimos only during startup (using ListPairedNuimosAsync()
). Instead you would need to keep watching the Nuimos and connect them when they become available.
I created an example in https://github.com/wind-rider/nuimo-windows/tree/deviceWatcher.
It doesn't work properly yet so I didn't make a pull request yet.
I hope you can continue here or give feedback how you think it should be done.
It would be nice to have a coding style guideline that would be easy to check for before committing. This would let people make less mistakes so that PRs can be merged quicker. I believe in other languages this is called linting.
One way how to do that is to use StyleCop (free) or ReSharper (paid) to enforce these rules.
A settings file for such a tool, much like a file for CI settings or gitignore settings, can be put in the repo to let everybody use the same rules.
One start could be to use the default StyleCop rules.
What do you think?
I want to create a smart home application and I'm doing that using Windows 10 IoT Core.
I'm developing a Background app. Such apps are headless (so they do not have a CoreApplication.MainView
).
When calling INuimoController.ConnectAsync()
, the NuimoSDK uses DispatchOnMainAsync()
to perform some tasks. However, headless apps do not have a MainView
and the DispatchOnMainAsync()
function causes a COMException
when ConnectionState
is set to Connecting
.
This means that I cannot use the NuimoSDK for my app because after discovering an INuimoController
I cannot connect to it.
private async void DispatchOnMainAsync(DispatchedHandler dispatchedHandler)
{
await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, dispatchedHandler);
}
System.Runtime.InteropServices.COMException
A method was called at an unexpected time.
Could not create a new view because the main window has not yet been created
Stacktrace:
at Windows.ApplicationModel.Core.CoreApplication.get_MainView()
at NuimoSDK.NuimoBluetoothController.<DispatchOnMainAsync>d__43.MoveNext()
Hi,
I created the start of a Nuimo hub application for Windows IoT Core. I started creating the following integrations:
It needs a forked version (PR #16) of the Nuimo SDK (because for example I needed a way to accumulate the rotation events not to flood the program with triggers, and I wanted to try to improve the connection / reconnection stability).
It is not a Windows desktop application as you might have been looking for, but still you might find it interesting. @soffer @Vittel @Inrego @NeilvdM @voelpade tagging you here since you showed interest in the NuimoSDK in the past (I assume @larsblumberg gets notifications automatically :) )
Hey there.
About a month ago, I slowly started making the steps for developing my own SDK, until I heard you were already making one. The first thing I did, was make sure I could connect to the Nuimo programmatically, without the user having to pair it first. And so I did. I'll post some snippets of the code here, so you can implement it into the SDK if you want. If not, I'll just keep that part in my own application. It could definitely use some polish, but it was just a proof of concept to make sure I could connect it programmatically.
static void Main(string[] arg)
{
var aqsFilter = "System.Devices.Aep.ProtocolId:=\"{bb7bb05e-5972-42b5-94fc-76eaa7084d49}\"";
var deviceWatcher = DeviceInformation.CreateWatcher(aqsFilter, new[] {"System.Devices.Aep.IsPaired"},
DeviceInformationKind.AssociationEndpoint);
deviceWatcher.Added += DeviceWatcher_Added;
deviceWatcher.Updated += DeviceWatcher_Updated;
deviceWatcher.Start();
Console.ReadLine();
});
private static void DeviceWatcher_Updated(DeviceWatcher sender, DeviceInformationUpdate args)
{
}
private static async void DeviceWatcher_Added(DeviceWatcher sender, DeviceInformation args)
{
if (args.Name != "Nuimo")
return;
sender.Stop();
Console.WriteLine(args.Name);
foreach (var keyValuePair in args.Properties)
{
Console.WriteLine($"{keyValuePair.Key}: {keyValuePair.Value}");
}
if (!args.Pairing.IsPaired)
{
DevicePairingKinds ceremoniesSelected = DevicePairingKinds.ConfirmOnly | DevicePairingKinds.DisplayPin | DevicePairingKinds.ProvidePin | DevicePairingKinds.ConfirmPinMatch;
DevicePairingProtectionLevel protectionLevel = DevicePairingProtectionLevel.Default;
// Specify custom pairing with all ceremony types and protection level EncryptionAndAuthentication
DeviceInformationCustomPairing customPairing = args.Pairing.Custom;
customPairing.PairingRequested += PairingRequestedHandler;
var result = await customPairing.PairAsync(ceremoniesSelected, protectionLevel);
customPairing.PairingRequested -= PairingRequestedHandler;
if (result.Status == DevicePairingResultStatus.Paired)
{
Console.WriteLine("Successfully paired! :D");
}
else
{
Console.WriteLine("Pairing Failed " + result.Status);
return;
}
}
}
private static void PairingRequestedHandler(DeviceInformationCustomPairing sender, DevicePairingRequestedEventArgs args)
{
args.Accept();
}
Hi all,
I have Nuimo I would love to use with my windows PC, which is my media server. I was quite disappointed to find out that there is no Windows app.
I would like to know if there is any working windows app.
Thank you in advance!
Neil
It would be helpful if you would supply the source code and debugging symbols in the NuGet package.
Probably this is a good start.
Guys - we've worked for the last few months to build a simple nuimo-windows app and we have it!
I'll upload it and send you guys a link and will provide a short video as well.
I can tell you that it's working and allows for mapping of the different nuimo actions to keyboard and mouse actions on a Win machine.
Will to try to upload soon.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.