SPSync is now open source!

I know a lot of you have been waiting for it. I have decided to publish it as open source, because the tool has so much potential, but I have no time to work on it.

You can find it here on GitHub: https://github.com/mwiedemeyer/SPSync

Hopefully you do some cool stuff with it.

Note: I will not answer support questions via mail anymore. If you found a bug, please fix it on your own or file an issue on GitHub.

Raspberry Pi Jukebox für Kinder

Vor einiger Zeit habe ich von der Toniebox erfahren. Das ist die “Revolution” für das Kinderzimmer. Ein Musikspieler ohne CDs und Kassetten. Dafür mit Spielfiguren und Musik aus der Cloud.

Nach einer kurzen Recherche gibt es die Idee in ähnlicher Form schon von vielen mit Hilfe eines Raspberry Pi umgesetzt, z.B. hier die Jukebox4Kids oder hier. Das Ziel war damit klar. Wir haben eine Kiste gefunden die eine gute Größe hat und ich habe dann nach den passenden Teilen gesucht. Die Hauptkomponente bildet der Raspberry Pi 3 mit einer 6 EUR USB Soundkarte, da der Raspi Audio Ausgang nicht ansatzweise einen erträglichen Klang liefert. Außerdem hat dieser bereits WLAN integriert um ihn später leicht mit neuer Musik bestücken zu können.

WP_20160704_14_59_24_Pro_LI

Die Idee von Tonie mit den Figuren war gut, aber ganz schön kostspielig. Daher habe ich zu einem China RFID Leser von Amazon (im Bild rechts an der Seitenwand) gegriffen plus die zugehörigen RFID Karten.

WP_20160706_22_54_22_Pro_LI

Das ganze ist günstiger und simpler als NFC. Der RFID Leser (6 EUR; 50 Karten ~15 EUR) funktioniert dabei per USB wie eine Tastatur direkt am Raspi. Nach jedem Lesevorgang “tippt” er die Nummer + ENTER ein. Auf dem Raspi selbst habe ich dazu MPD installiert und Mono. Der Raspi ist so konfiguriert, dass er direkt eingeloggt startet und über ein Startskript mono mit dieser Konsolenanwendung startet. Diese wartet im Wesentlichen auf Eingabe einer Zahl (+ENTER) und verwendet dann die Telnet Schnittstelle des MPD um eine Playliste zu laden und abzuspielen. Außerdem ist sie für die Auswertung der Taster zuständig.

Die Musik wird dabei direkt auf der SD Karte des Raspi gespeichert und eine Playliste mit der 10-stelligen Seriennummer der RFID Karte erstellt. Außerdem ist das Samba Paket installiert, womit man also jederzeit im WLAN zu Hause neue Musik und Playlisten auf der SD Karte ablegen kann. Dann noch ein Sticker auf die RFID Karte geklebt, damit leicht erkennbar ist, was “darauf” gespeichert ist.

WP_20160706_22_52_16_Pro_LI

Nun fehlte noch die Audioausgabe und ein paar Eingabemöglichkeiten (Play/Pause, Vor, Zurück, Lauter, Leiser). Für die Audioausgabe verwende ich eine Platine und Lautsprecher aus einem alten Radio (Werbegeschenk).

WP_20160706_21_03_06_Pro_LI

Hier sieht man links oben den Raspi, rechts die Verstärkerplatine aus dem Radio mit angeschlossenem Lautsprecher. Unten links liegt dabei noch ein “Übertrager” um das Audiosignal galvanisch zu trennen, da ansonsten ein Brummen auf dem Lautsprecher zu hören war. Dies liegt daran, dass der Verstärker zufällig mit 5V betrieben wird und ich diesen direkt an dem 5V Output des Raspi hängen habe. Die Verstärkerplatine hat auch gleichzeitig einen Kopfhörerausgang der bei Einstecken eines Kopfhörers den Lautsprecher unterbricht. Diese wird ebenfalls einfach nach außen am Gehäuse geführt.

Um das Gerät nicht nur anschalten zu können (was “hart” durch einen Einrastenden Taster mit LED Beleuchtung direkt in der USB Zuleitung passiert), sondern auch die anderen Funktionen verfügbar zu machen, habe ich "Arcade" Taster von eBay bestellt.

WP_20160706_21_01_38_Pro_LI WP_20160706_21_03_15_Pro_LI WP_20160706_21_02_26_Pro_LI

Die verfügbaren IO Ports am Raspi reichen um die 5 Taster aufzunehmen und die Verstärkerplatine und Power LED mit Strom zu versorgen.

Durch eine Powerbank kann das Gerät nicht nur im Kinderzimmer sondern auch im Auto und unterwegs verwendet werden. In Kürze kommt oben noch ein Griff dran und eine Markierung an die Seite an der der RFID Leser angebracht ist.

Lync Box for the team

In my last vacation, I built a Lync Box for me and my team at work with a Raspberry Pi Model 2 and 15 LEDs.

The idea came from Jon Gallant who already built the same thing for a single user. He called it beakn, the Lync Status Light and tried not only a Raspi but also some other hardware. I took the idea and made a thing for the whole team (5 people)

Hardware

First of all: How does it look like?

WP_20151020_17_07_20_Pro

It is very simple and the inside and the box is not very nice. Maybe I should build one with a 3D printer. However, it is working and we will install it in front of our space. To connect the LEDs I have used an old IDE cable which perfectly fits on the IO ports of the Raspi (after cutting one of the sides).

WP_20151020_17_07_39_Pro

Software

I’m not using Windows 10 on the Raspi because as I started the project, Windows 10 IoT had no Wifi. It is using the default Raspian Linux Image with Mono. I’m running a .NET console app on it which actually checks an Azure queue every few seconds for new messages. On the clients I’m using a plain old WinForms app without a window and the Lync SDK. It checks for Lync status changes and then sends a message to the Azure queue.

You can find the software on Github here.

SPSync 0.9.8

Ok, here we go. The sync engine got a major refactoring. It is now a lot faster to get the changes from SharePoint and to iterate over the local files. That means it is now just a matter of seconds to “analyze” the changes even for more than 1000 files and 1 GB. It should therefore also be able to sync your libraries with thousands of files in a reasonable time.

The other big news is the complete new setup experience. Just click here to download and execute the setup. It takes just a few seconds and SPSync should start. That’s it. No “Next”, “Next”, “Finish”, nearly no time and no local admin rights required. Even better: Updates gets automatically installed in the background and on next restart of the app you are up-to-date.

Please report all bugs to support@spsync.net

SPSync 0.9.7 including CLI

SPSync is approaching version 1.0. Today I’m happy to announce that SPSync now works more stable and also includes a new command-line interface.

It should work now with all SharePoint 2013 on-prem and Office 365 sites without any issues during connecting or displaying the “select folder” dialog. As the “SharePoint Url” you can now use more formats and SPSync will try to figure out the site, the library and the authentication method automatically. For example, these formats are all fine:

  • https://YourOnPremisesSharePointOrYourOnlineTenant.com/sites/teamsite1/_layouts/15/start.aspx#/Documents/Forms/AllItems.aspx
  • https://YourOnPremisesSharePointOrYourOnlineTenant.com/sites/teamsite1/Documents/Forms/AllItems.aspx

The most requested new feature is the command-line interface. You can find SPSyncCli.exe in the install folder.
It accepts two parameters. The local folder and a “preview” mode parameter.

You have to configure a sync connection like before with the GUI. After that, you can sync a folder with the following command:

SPSyncCli.exe “C:\Your\Sync\Folder”

If you just want to see, which files will be modified (but don’t want to do it now) you can sync in a “what if” or “preview” mode:

SPSyncCli.exe “C:\Your\Sync\Folder” true

The result looks like this:

image

SPSync now uses a different location for the metadata. It is now directly within the local folder under “\.spsync”. Therefore you might get a conflict message the first time you sync with the new version.

Download the new version here: http://spsync.net

Selective folder sync for SPSync

I’m happy to announce that the top requested feature on UserVoice is now available for testing.

Now you can select which folders in your document library you want to sync. Just click “Edit” on your configuration and then “Save & Select Folders”:

image image

Download version 0.9.6 here: http://spsync.net

SPSync - The OneDrive for Business alternative

I know, the last update is almost a year old... But yes, I’m trying to work on it when I find some free time. So this update brings some important changes.

What's new?

First of all, to add a new sync configuration, the dialog has only a few fields left. SPSync will try to find every other setting automatically for you. Here is the new dialog:

image

As you can see, the advanced configuration dialog can be opened via the link. The automatic detection will only work if you are using NTLM/Basic (On-Premises) authentication or Office 365. For ADFS you need to enter some more info on the advanced dialog.

Another new feature is that you can now configure, whether you want to sync in both directions or only one of them (Local->Remote or Remote->Local) which was a suggestion on UserVoice with a high vote. Also deleted files (local or remote) are now always send to the recycle bin and never get automatically deleted for ever.

With this new version I’ve decided to drop the support for SharePoint 2010 (and before), because of some missing features for the upload/download handling. This is to make the development much easier and better to maintain. That’s also why SPSync requires now .NET 4.5.1.

Last but not least, a lot of bugs are now hopefully fixed. If you find something, please send me an error report and attach the DebugLog.txt from C:\Users\%username%\AppData\Local\SPSync

Download the new version 0.9.5 here: http://spsync.net and leave a comment or drop me a line at: support (at) spsync(dot) net

PS: The next new feature will be to be able to sync sub-folders within a document library as it has already 20 votes on UserVoice.

SharePoint 2013: Timeout on ClientContext.ExecuteQuery

Ok, this one is a strange issue.

I have created a console app with Visual Studio 2013. Added the "App for SharePoint Web Toolkit" NuGet package to get the SharePoint.Client.dll
Then wrote just a few lines to test if it works:

        static void Main(string[] args)
        {
            ClientContext context = new ClientContext("https://sharepoint/sites/test1");
            var web = context.Web;
            context.Load(web);
            context.ExecuteQuery();
            Console.WriteLine("Title: " + web.Title);
        }

This is against an on premises installation with Kerberos authentication (NTLM and Basic are also enabled). On the line context.ExeucteQuery(); it just waits a long time and then gives me a timeout and 400 error.

The weird thing: If Fiddler is open during the execution, everything works as expected. No timeout, no error.

Solution

The solution is fairly simple:

Just attach a handler to the ExecutingWebRequest event and set the WebRequest.PreAuthenticate to true:

        static void Main(string[] args)
        {
            ClientContext context = new ClientContext("https://sharepoint/sites/test1");
            context.ExecutingWebRequest += context_ExecutingWebRequest;
            var web = context.Web;
            context.Load(web);
            context.ExecuteQuery();
            Console.WriteLine("Title: " + web.Title);
        }

        static void context_ExecutingWebRequest(object sender, WebRequestEventArgs e)
        {
            e.WebRequestExecutor.WebRequest.PreAuthenticate = true;
        }

SPSync v0.9 is now available

Ok, the last version is almost 9 month old, but now I finally had some time to look through all comments on uservoice and now proudly present the new version.

What's new?

The major change is: SPSync now supports Office 365 authentication which means, you can finally use SPSync with SharePoint Online and SkyDrive Pro. Just select "Office365" from the authentication list and enter your username (user@customdomain.com or user@customdomainpart.onmicrosoft.com) and your password. Domain is not required.

image

Also an issue with creating folders is now fixed and it doesn't matter anymore whether the title of a document library is not the same as the URL of the document library.

A reminder: The "Conflict Handling" is a setting just for conflicts. If you select "Overwrite local changes" it does not mean that a full sync is done. A conflict is if a file is modified locally and remotely. All other files are sync'ing independently from this setting.

Download the new version here: http://spsync.net and leave a comment or drop me a line at
support (at) spsync(dot) net