Giter Site home page Giter Site logo

nuimo-windows's People

Contributors

hansmbakker avatar inrego avatar larsblumberg avatar voelpa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nuimo-windows's Issues

Coding style

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?

NuimoSDK cannot be used for headless apps due to DispatchOnMainAsync

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()

Hub application for Windows IoT Core

Hi,

I created the start of a Nuimo hub application for Windows IoT Core. I started creating the following integrations:

  • Philips Hue
  • Chromecast
  • Timer (idea is to set the timer to a time with the dial ring and then press the button to start counting down)
  • A test app to fiddle around with event handling and showing Led Matrices

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 :) )

Automatic Pairing?

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();
}

Windows application

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

.NETFramework

So I'm finally about to start getting my hands dirty with this, and then I cannot add the reference because it only targets .NETCore

Reference Error

So yeah, I have little to none experience with .NETCore so I'll be making a clone in .NETFramework ๐Ÿ˜„

Keep posted for updates..

We have it!

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.