LetMeIn Project – Particle

Come anticipato nel post iniziale, mi sono avventurato nell’utilizzo di Particle.

E’ una piattaforma IoT che ho trovato molto semplice, intuitiva e completa, soprattutto per gli esperimenti che stavo facendo.
Sostanzialmente quello che mette a disposizione è un ecosistema già predisposto con un chip HW a basso costo per poter:

  • Programmare la logica di gestione e controllare 8 porte digitali e 8 analogiche
  • Una connessione WiFi, che permette al dispositivo di essere sempre connesso e gestito tutto remotamente
  • La possibilità di esporre le funzioni del codice applicativo tramite REST API
  • Un modello di sicurezza e autenticazione definito
  • Un ambiente integrato con il cloud che fornisce un IDE di sviluppo WEB e la possibilità di controllare il device tramite internet (anche di reinviargli una immagine aggiornata del sw

Con queste presupposti ho sostanzialmente realizzato un primo prototipo per la gestione remota del cancello di casa e del cancello  🙂

Il primo passo è stato di prendere confidenza con l’IDE e con la logica di programmazione, che è C++ (reminiscenze degli studi al’Elis
J)

Sostanzialmente è il classico approccio a Setup e Loop, dove il loop continua ad eseguire ciclicamente una routine di codice, controllando lo stato di variabili, input digitali o analogici e decidendo cosa eseguire

void setup () {

}

void loop() {

}

E’ inutile che spieghi io come si utilizza Proton (il chip particle): è possibile trovare una descrizione estremamente esaustiva e aggiornata sul suo sito
https://docs.particle.io/guide/getting-started/intro/photon/

Tornando a noi, parallelamente ho iniziato a prototipare il mio circuito di gestione che doveva:

  • Controllare un sensore di contatto per il garage
    per controllare apertura e chiusura
  • Comandare alcuni rele per controllare l’apertura di cancello e garage
  • Integrare un display LCD per poter visualizzare dei messaggi distatus

Ho ordinato praticamente tutti i componenti da Adafruit, che ha uno store fantastico e dei tutorial molto utili.
Dove quindi ho ordinato i componenti base (oltre ovviamente al particle)

Descrizione Product ID
Magnetic contact switch (door sensor) PID: 375
Full sized breadboard PID: 239
Monochrome 128×32 I2C OLED graphic display PID: 931
Terminal Block – 2-pin 3.5mm – pack of 5! PID: 724
Breadboarding wire bundle PID: 153
Particle Photon with Headers PID: 2721

L’unico piccolo problema, è che i costi di spedizione dagli stati uniti sono comunque abbastanza rilevanti e incidono (circa €20) quindi alla fine uno esce a comprare una serie di altre cose inexpensive ma di diverso tipo, ad es:

product id product name
64 Half-size breadboard
153 Breadboarding wire bundle
157 IR (Infrared) Receiver Sensor
160 Piezo Buzzer
165 TMP36 – Analog Temperature sensor
258 Lithium Ion Polymer Battery – 3.7v 1200mAh
373 Breadboard-friendly 2.1mm DC barrel jack
387 Super-bright 5mm IR LED
400 Extra-long break-away 0.1″ 16-pin strip male header (5 pieces)
434 Large Modular Snap Box – SMD component storage
725 Terminal Block – 3-pin 3.5mm – pack of 5!
848 Diffused RGB (tri-color) 10mm LED (10 pack)
1603 BMP180 Barometric Pressure/Temperature/Altitude Sensor- 5V ready
1608 Adafruit Perma-Proto Quarter-sized Breadboard PCB – Single
1739 Large Enclosed Piezo Element w/Wires

[Update]

Un altro sito di ecommerce italiano dove comprare componenti è Robot Italy, ha praticamente tutto quello che serve, importato dagli US e China, ma in magazzino italiano, quindi con costi e tempi di spedizione accettabili

[/Update]

 

In ogni caso, alla fine ho assemblato il mio circuito in una breadboard creando il prototipo. Come si vede nella prossima figura

Per il codice, ovviamente mi sono basato su uno dei molti sample disponibili online su particle.io, l’SDK è ben descritto e si riesce a iniziare rapidamente.
In sintesi tutto il gioco è stato nell’esporre end-point REST da poter invocare remotamente, i quali secondo una logica di controllo andavano a comandare il relè.
La cosa carina di Particle, è che con veramente qualche riga di codice, è possibile dire al firmware che una particolare funzione, va esposta come REST end-point; quindi voi scrivere la vostra funzione c++, e poi gli direte: questa esponimela rest J

Un piccolo esempio estratto dal mio codice:

const int pinRelayGarage = D3;

void setup() {
	// Initialize Screen
	SetupScreen();

	//pin initializations
	pinMode(pinRelayGarage, OUTPUT);
	digitalWrite(pinRelayGarage, LOW);


	// Initialize GateOp function as REST endpoint named GateOpen
	Spark.function("GateOp", GateOpen);

}



int GateOp(String args) {
	int status_code = -1;

	if (args == "OPEN" ) {
		UpdateScreen("Opening,Garage...");

		digitalWrite(pinRelayGarage, HIGH);
		delay(doorButtonDelay);
		digitalWrite(pinRelayGarage, LOW);

        	Particle.publish("Letmein","GarageOpen,Alberto");

	status_code = 1;

	}
}

La cosa  interessante che si nota è la funzione Particle.publish, che permette di alzare un evento dalla piattaforma particle. Questa può essere intercettata da un qualsiasi WebHook per essere notificato dell’evento.
Nel mio caso, ho intercettato questo evento tramite IFTTT, e tramite una mia custom receipt ho salvato in un file excel una entry ogni volta che viene aperto il garage, in modo da avere anche un log fisico di quando veniva aperta

Intrigante anche che Particle è aperta all’integrazione con diversi altri mondi, incluso Microsoft Azure 🙂

Questo era già chiaro dagli annunci di qualche anno fa, ma ora è disponibile

Insomma, solo con questa parte devo dire che mi sono affascinato a questo mondo dell’IoT, e sono riuscito a creare in veramente poco tempo e con competenze di base i elettronica e reminiscenze di C++ una circuito funzionante.

Alla prox puntata
Alberto

Articoli della serie:

Xbox One e VodafoneStation2

XboxLogoHo appena completato il passaggio verso Vodafone della mia linea telefonica di casa.
Tutta la procedura è andata a buon fine senza problemi tranne la connessione a Xbox Live.

Il problema risiede su una procedura automatica che la Vodafone Station fa partire ai dispositivi connessi tramite cavo ethernet.
Infatti mi ero accorto di questa modalità durante la prima configurazione, dove una volta collegato il computer via cavo, il browser si era aperto su una pagina di configurazione della VS.

Per risolvere il problema sulla Xbox, è sufficiente aprire Internet Explorer dalla console, e navigare verso un sito qualsiasi. Il browser della Xbox viene rediretto verso la procedura di configurazione della VodafoneStation così come avviene per il pc. E’ necessario annullare la procedura e uscire dal wizard di configurazione.

Una volta effettuato questo piccolo passagio, xbox riesce a collegarsi correttamente al servizio xbox live.

Per maggiori info, segnalo questo thread nel forum Vodafone

http://lab.vodafone.it/forum/viewtopic.php?f=25&t=42125&start=15&sid=762bc803751c9a2d2d8e815ec6dfbf1b

HTH,
Alberto

SharePoint 2010 Organization Profiles

As I reported on one of my first posts about SP2010, one nice thing that has been implemented within the new User Profile Service Application, is the presence of the Organization Profiles.

I was browsing for some info about it (since today I was discussing on the usage of this component with Marco Rizzi); there is not yet much information around this topic and I came across this post by Peter Gerritsen which reports some nice information.

The whole idea is to have a new type of Profile for “Organizational” needs: Using the Organization Profile (and also beeing able to extend it using Using Sub-types) this feature can be used in order to create several type of organizational aggregations, depending on your company needs. In example: Divisions, Departments or even Legal-Entities (in case of a multi-company group).

image

 

Main issue when you were implementing this using Moss2007 is that all your hierarchy logic was build around the “Manager” property of users, but: what happen if your manager change job, and your office or department do not have a new manager assigned in time? Or what if a manger have two different role inside two organizations? You’ll end up having a broken/unclear hierarchy.

This component try to address this need.

 

image

Every organization can have defined who is the “leader” of this organization and who are the members.

Members can be included also by automatically include direct reports of the leader so based on the company hierarchy.

The members could also be associated by ActiveDirectory groups.

image

 

The nice nice thing about it is… that you will need to develop all the UI and end-user functionality by yourself 🙂

As far as I found so far, currently there is no any impact on the User Profile page and this information, although present, won’t be displayed. Peter in his post refer that MS did not make it to complete this feature since it has many different interesting approaches and evolution path.

As always, what we can do is to leverage on this infrastructure to build our logic if we need to include this type of information. The Object Model exposes all information from the class Microsoft.Office.Server.UserProfiles.OrganizationProfile 

As far as I analyzed it. It is currently not that stable yet: some components do not work 100% correctly, but we know it has not been release yet (so there is always time for some bugfixing)

HTH

Alberto

Live Online SharePoint Saturday EMEA

image As far as I know, this will be the first SharePoint Saturday held in EMEA Region.
This formula of events held on Saturday, is pretty famous in the US, but not as much in Europe. We’ll see how it goes.
This version is an online one. It wouldn’t have been possible to organize an in presence event like it is for the SPSatrurday in the US.

Though, It would be nice to have one in italy too. Claudio Brotto, one of the italian mvp, is already a speker of the current emea chapter.

Follow the buzz on twitter: #SPSEMEA

I’ll be joining online sometime on Jannuary 23rd, 2010 (there’s a conflict with the italian UGIAL.NET 5th conference, which for the second time is on my own company’s offices).

We’ll see how it goes.

Graffiti CMS – Remove Google Analytics tracking for selected users

As I posted on this “warm-up” post I am running my personal blog using Telligent Graffiti CMS, main reason: I like telligent’s products and approach, and I wanted to test this product of them on my shoulder.

I am very happy about it, set it ip and customezed it very quickly; the bad thing is that its future is not clear yet (is it sometime it is not updated). Anyhow, for the time been, I keep using it and sometime I need to implement some changes.

 

This time I wanted to stop Google analytics, which I implemented on the site, to track my own site access (or generally speaking, any access from an administrator)

To accomplish this, I found this article by google “How do I exclude my internal traffic from reports?” , which reports how to set-up a custom filter to exclude traffic coming with special conditions.

Among this, there is the option to set a variable, using a JavaScript call

pageTracker._setVar(‘siteadmin_access’);

This variable is set within the Analytics cookie, which last for some time (but since cookie can be reset, I wanted to be set for all admin sessions)

Having understood that, I then needed to define how, within Graffiti CMS, to execute this javascript call: it needs to be executed only from the users which I wanted to exclude.
I then went through the “Graffiti CMS” official documentation (read: I went through someone else code to find out stuff similar to mine 🙂

The result is the following: to modify the layout page of the theme you are using (in my case SleepyBlue) which can be found here: Home > files >themes > SleepyBlue > layout.view

On the bottom of the page, befor the </html> closure, I added the following code:

#if ($macros.IsNotNull($user))
#if($macros.CanViewControlPanel($user))
<script type="text/javascript">pageTracker._setVar(‘siteadmin_access’);</script>
#end  
#end

Note: Since this call needs the pageTracker object to be instantiated, it require the Analytics call to he executed before.
Within Graffitics CMS, there is a specific call to include a generic analytics plug in, which is:

$!data.Site.WebStatistics

This call, in my customized-theme case, is called within the <head> section of the page.
(if you’re wondering where the Goolge js need to be defined in graffiti: go to the “Control Panel > Site Options > Settings > Web Statistics”)

 

 

Now all I needed to to, is from the Analytics Settings to create a filter:

From the Analytics Profile, add a new Filter.

 

image

 

Using IE8 Developer Toolbar, I verified that the cookie was corretly setup

image

 

As you can see, the cookie expires is in two year 🙂

HTH,
Alberto

Speaking at MS SharePoint & Office Conference – Milan March 2010

Microsoft SharePoint & Office Conference 2010This year ended with a good news: I will be speaking at the #SPOC2010 Microsoft SharePoint & Office Conference, scheduled for 9-11 March 2010.
It is a real pleasure to be there among the twenty speakers of the conference.

I will be presenting a session dedicated to the new social features, which are pervasive within many of the new functionality of the next version of SharePoint; my session’s mate will be Marco Rizzi with whom I am sure we will bring a lot of knowledge on this.
 

Nowadays you don’t develop “social applications” in the enterprise just because it is fancy or it is fun (even though it is more fun than developing standard applications 🙂 ). Most of the application that are currently been developed, or that are already in use, can leverage social functionality to connect people to people, colleague to colleague or employee to partners, so that the interaction between people is more effective and productive, and produce more relevant shared information.

More details to come 🙂

This is the official site: http://www.sharepointconference.it/

See you there!

Letterina a Babbo Natale – Riccardo

Lettera scritta da Riccardo (5 anni) a Babbo Natale.

 

Caro Babbo Natale,

Come stai? Stai bene o stai male?

Sarai tanto impegnato per preparare tutti i regali da dare a tutti i bambini, se non arrivi prima da me… va beh, non importa aspetterò nel mio letto.

Io mi chiamo Riccardo Casu, dall’ultima volta che ti ho scritto (lo scorso anno) sono stato abbastanza bravo, ogni tanto faccio il monellino, ma scusa… è perchè mi dimentico sempre di fare il bravo!!

A questo punto ti dico i miei regali (Con relativa foto per non sbagliare)

  1. Bacugan
  2. Mario Giochi invernali – WII
  3. Action Figure deluxe con veicolo superaccessoriato di materia grigia e 2×2
  4. Laserset di Ben10
  5. Pulmino di Ben10
  6. Navicella trasformabile di pungilione
  7. UP – WII

Lo so che sono tante cose, per me tutte vanno bene… per te, decidi te.

Per favore Babbo Natale, le porti orecchini e collana alla mamma? E al papà no!

Per favore Babbo Natale, al papà gli porti una statua?

Per Andrea Pannolini!

Ricordati della mia Nonna e dei Nonni, x loro decidi quello che vuoi.

Ti allego un mio disegno

 

Tanti Baci,
Riccardo

 

Pg1

letterinababbonatale 001

 

Pg2

letterinababbonatale 002

 

 

[NDR: ma che sarà mai questa statua… mah!]

My POV on MS SharePoint Conference 09

I am trying to reorganize my mind after this full-immersion of brand new contents that have been presented during MS SharePoint Conference 2009 in Las Vegas.

It’s not so easy during these tough economic days to be able to participate to conferences like this. Fortunately I was able to make it.

The overall comment about SharePoint 2010 is that it really rocks!! I think MS included most of the highly demanded missing feature to bring the SharePoint platform to the next level. I currently like most of the architecture and new feature implemented. Though I would need some time (quite a lot to be honest), to evaluate them fully since the platform is even more huge.

I also noticed some things that I already do not like, but let stay positive in this post (they might even decide to complete them on next builds 🙂
 

I tried to put down some of the things I appreciated most, but it started to be a very log list and a long post. This then won’t be a fully comprehensive post of all of the new enhancements, but only some of the stuff I liked most.

For a full list of feature, I forward to some official sources [1]
Below you can see the map of all the main features:

MS SharePoint 2010 Features

 

SharePoint Foundation

The overall architecture of the product has been enhanced. The most evident feature which to me bring benefits are:

  • Revised and more Fluent UI
    all the UI has been reviewed, making the platform far more intuitive than the previous one. Now the interface make use of Ribbons (like for Office), overlay windows and inline editing which provide a very consistent user experience
     
  • Wiki edit mode EveryWhere
    Wiki is implemented in every web page, making it possible to edit on the fly a page, like it to others using the [[ ]] sintax, which now implement an autolookup mechanism in order to reference pages and objects.
    This also allow selection and reference of all the content present on a site, allowing for instance to include on a webspace a chart image coming from another report page
     
  • MetaData EveryWhere
    Now it’s possible to define several type of MetaData, which can be use to implement taxonomies or folksonomies, navigations, and further enhance social feature around interests and experts.
    MetaData can be defined at Enterprise level using the EMM (Enterprise Managed Metadata), in order to provide a common way to structure information architecture; this can be defined to provide specific tag-set on specific sitecollection, webapplication or also to be shared among different Farms.
    The use of personal tags is available.
    Automatic Tagging is also possible through the definition of specific rules on libraries
     
  • Cross Browser support, Multilingual interface and WCAG 2.0 support
    this should further facilitate development of SharePoint application, which in some circumstances weren’t just worth it due to the complexity of implementation  of those function. Now they are build in on the platform.
     
  • Office WebApp
    Be able to open a word document online, without the need of downloading it first; or also edit it online simultaneously with other colleagues, it’s just tremendous.
    Excel Services also looks promising, and better implemented this time 🙂 Most importantly, their information can be easily be used as source for web content or to be integrated within other processes
     
  • Document Management
    Also this part of the product has been enhanced; most important feature include the new type of item, the Document Set: this allow to create a group of document as a single consolidated atomic work product. This allow to mange the Document Set with all of the other feature (tag, comments, move, approve, etc). Enhanced Record Management and Document routing feature are also provided

 

Social Feature

  • Tagging, Commenting, SocialBookmark and Rating
    This was one of the most awaited feature (and one of the most implemented custom on Moss 2007) It fully leverage on the Metadata Infrastructure and provide tagging and commenting of both SharePoint content and also external web site comments.
    It can be used to track content both for personal future retrieval and for sharing the content with colleagues which can both track a single colleague (and see what he is tracking) and follow directly a tag (hence seeing everything  is tagged using that specific term).
    This widen so much the possible implementation of solution leveraging these features.
     
  • Colleague Activity Feed
    It is now possible to track activities which our colleagues do within the platform; this includes tagging and commenting of content. More importantly, this can be customized to implement custom activity tracking (i.e.: within a workflow, when a user approve a procedure this can be published to his colleagues or a specific audience). 
     
  • People and Expertise Social Search
    The overall Search implementation looks very good. New filter by focus, expertise and other user property are automatically provided and can be customized in order to enhance experts look-up.
    Social feedback is now included in the result relevance computation, meaning the a document with tags or rating gets better visibility on search results
    Phonetic search has been included, so that the platform try to search terms misspelled (this is most important on English speaking implementations)
     
  • User Profile and Organization Profile
    The overall user profile has been enhanced; but most importantly a Organization Profile is now been implemented, making it possible to define profile information for Corporate Company or Company Departments (depending on the type of implementation).
    The overall navigation of the organization hierarchy has been enhanced as you can see on the screenshot below

     

Development

On the development side, in my opinion the two most important point are:

  • Customization/Development model
    The overall customization model can be re-organized in my opinion. Now the use of SharePoint Designer as customization tool can be fully embraced, since this now implement a way by which export any customization to a wsp package, which can be further enhance later-on using VisualStudio 2010.
    This can now allow quick implementation of customizations and changes on the platform, which can then be managed using an enterprise approach, deploying them properly, storing them on a Software Lifecycle platform (as TFS)
     
  • Platform Extensibility
    Now the SharePoint platform seems to be a real application development platform which has been designed to be extended in the future and from customization (in the past, some classes or component were not open to customization, and that made it more difficult or simply time expensive also for some easy changes).
    Now the platform implement a comprehensive set of API, which are exposed through webservices and rest api
     

Also this topic has been enhanced

  • Form/Process Services
    I quickly sow some examples of how new SharePoint Designer, along with Visio and Infopath can now be used together to implement human based workflows.
    I will need to better deep down on this point, but as far as I sow, this push ahead the need of adopting a platform like K2 or Nintext (which of course implement fully the BPM approach).

 

There’s a lot to be better analyzed and understood (including some component which I didn’t had the opportunity to follow like: Composite application, Business Connectivity Services and Mobility support).

I hope to be able to share my findings in the future.

HTH
Alberto

 

[1] Source of further information:

Last E-MBA day @MIP

image Wow, that was tougher then expected.

Today is my last day @MIP for an Executive MBA with specialization on ICT which I started in September 2007.

A two year long journey, where I’ve learned so many new subjects, each one of them not part of a common training path for who like me started with technical background in information technology.

All the subjects, lectures and testimonials resulted very interesting and relevant for my daily work, having the opportunity to formalize many concept you are surrounded with during your work; this also allow to see things with a different/wider prospective.

I must admit that, having changed job right after deciding to start the emba, was not one of the best choice: a consulting company really need 110% of your time and effort (and I’m using a conservative figure); but in my case both changes were very needed.

Anywhow, this is not the end yet: still a couple of exam to finish plus the final project work. Good thing is that I will start to accumulate again holidays (while during the last years I was using them for the master) and be able to give some time back to my family.

 

Finally, I will definitely recommend a path like mine to everybody who’s looking to improve management skills, which are definitely needed if we want to have a competitive advantage to perform well on our job, and why not: to improve our career as well.

HTH,
Alberto