Integrating Homebridge and Siri with IFTTT

After the iOS 10 release, it’s finally possibile to play with Siri and HomeKit!

I installed Homebridge on my Raspberry PI and create some rules to play: control some LED bulbs, check temperature and so on…

But I wanted more! I need to extend to the full features IFTTT!
The good news is that Homebridge support IFTTT with a plugin.

IF you need to install it, go to https://github.com/ilcato/homebridge-ifttt/ and install it:

npm install -g homebridge-ifttt

After then we need to create the configuration, but first we need some preparation.

For make it work properly let’s create a rule on IFTTT.

  1. Enable the Maker Channel
  2. Create a rule:
    • Choose an event name: for example “Speedy
    • Choose an action: for example send email
    • the result should be something like this:
      • If Maker Event “Speedy”, then send an email from user@domain

Now let’s go back to the config.json for the Homebridge and connect IFTTT adding the following code:

{
    "platform": "IFTTT",
    "name": "IFTTT",
    "makerkey": "INSERT YOUR MAKER KEY",
    "accessories": [
         {
          "name": "Speedy Mail",
          "buttons": [
              {
               "caption": "Speedy Mail",
               "trigger": "Speedy"
              }
            ]
          }
       ]
 }

restart Homebridge and you can send email from HomeKit.

 

Fix Maverikcs “One or more items in… can’t be changed because they are in use” error

If you’re getting  “One or more items in… can’t be changed because they are in use” error copying from external disk here the easy fix: 

launch terminal and use the following command:

xattr -d com.apple.FinderInfo <filename>

Example:

xattr -d com.apple.FinderInfo Kitesurf-Mavericks.mp4

 

 

Configurare l’IP pubblico con Fastweb e l’AirPort Extreme

la configurazione non è delle più semplici ma vediamo come fare:
Andare su questa pagina:
http://www.fastweb.it/myfastpage/abbonamento/#mConfig e scegliere configura router.

Premere “Modifica” e poi “Configurazione Manuale”.

A questo punto aggiugere il servizio inserendo la porta come in questo esempio:

Image

per il server web, ad esempio  inserire questi valori

Image

A questo punto bisogna configurare l’airport extreme, inserendo l’indirizzo IP
del server da esporre su internet, in questo caso 10.0.1.17

Image

premere ora su port mappings e configurare le porte in questo modo:

Image

Riavviare l’airport e a questo punto il vostro server sarà visibile su internet.

Fix Lion slow TimeMachine backups

After upgrading to Lion, my TimeMachine Backups takes FOREVER to complete.

after 2 days of googling, I discover the solution:

  1. Be sure to disable TimeMachine using System Preferences
  2. Mount TimeMachine disk
  3. Launch a terminal and go to the TimeMachine Disk
  4. now rm -r .Spotlight-V100
  5. Now go to the Startup Disk
  6. rm -r .Spotlight-V100
  7. At this point restart your Mac

 

Learning iPhone UI application

I don’t like to use Interface Builder for creating a UI prototype for my apps.
I prefer the old way: draw it on paper and then implement the code.

But…
It takes a lot of time, needs a lot of fixing and every major modification of the UI takes a huge amount of energy.

I just read an interesting post on Cocoa with Love, and I discover an interesting tool to make my life easier:
Now I can create my UI with IB, and the tool will convert it to a .m file.
GREAT!!!

The tool is called nib2objc and it can be found on Github. Github, is a site that allows developers to share their code with the rest of the world. Another great site!!

The link for nib2objc is here, and don’t forget to thanks its author kosmaczewski

Happy coding!!