Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

HC2 & iTunes on OS X integration ... any idea ?


Question

Posted

I have found several topics on HC2 and iTunes.  However there were only brief ideas and I did not find any complete, well documented solution.

 

Is there anybody who managed to integrate  iTunes running on OS X system and Fibaro HC2 box in the way that VD would be able to control iTunes ?

 

It would be great to have VD with buttoons to play, stop, select playlist, etc.  directly from HC2.

 

Any hint is highly appreciated.

 

Recommended Posts

  • 0
  • Inquirer
  • Posted

    @amatt

     

    real path and relative path are different. That is why I gave you example of my settings.

    My relative path does not have "/Sites".

     

    The content of PHP script between   /*    and    */  are just comments so I deleted this to keep PHP script more clear.

     

     

    • 0
    Posted
    8 minutes ago, gucio1234 said:

    @amatt

     

    real path and relative path are different. That is why I gave you example of my settings.

    My relative path does not have "/Sites".

     

    The content of PHP script between   /*    and    */  are just comments so I deleted this to keep PHP script more clear.

     

     

    @gucio1234

    can you tell from what I provided if anything is incorrect?

    • 0
  • Inquirer
  • Posted (edited)

    @amatt

     

    The details of make it working depends on settings of your apache and php module.

     

    Anyway I will try to help :

     

    you have line on your VD :

    Please login or register to see this code.

    I assume your settings of apache web server are similar to mine. Try replace the line with :

     

    Please login or register to see this code.

     

    Edited by gucio1234
    • 0
    Posted

    @gucio1234

     

    my actual path that the file is located on my Mac is 

     

    /Library/Server/Web/Data/itunesremote/index.php

     

    [See screenshot]

     

    so in my VD it shows as:

     

     response, status, errorCode = HC2:GET("~/Library/Server/Web/Data/itunesremote/index.php/?cmd="..command);

    Please login or register to see this attachment.

    • 0
  • Inquirer
  • Posted

    @amatt

     

    Try:

     

    1.

    Place your PHP script as :

     

    /Users/username/Sites/itunesremote/index.php

     

    2.

    Modify the path in VD as :

     

    response, status, errorCode = HC2:GET("/~username/itunesremote/?cmd="..command);

     

     

    NOTE:  Rename  username  to your actual name of user's  directory.

     

     

    • 0
    Posted

    @gucio1234

     

    now I get error code 302

    • 0
  • Inquirer
  • Posted

    @amatt

     

    It looks you have problem with configuration of your apache web server.

     

    I have followed the guide from here :

     

    Please login or register to see this link.

     

    The best if you start all over and follow the guide.

    However you may focus first on point 3.1 of this guide (' tell Apache where to serve content from ').

     

     

    • 0
    Posted

    @gucio1234

     

    after removing OS X server I was able to get some of it to work. 

     

    But there are issues.

     

    I cannot use the Vol +, Vol - and Get Info

     

    they all come back with:

     

     

    [ERROR] 21:10:48: line 18: Expected value but found invalid token at character 1

     

    Line 18 is: response = json.decode(response);

     

     

     

    also when I pull the php file in a browser I get the errors in the screenshot attached. 

    Please login or register to see this attachment.

    • 0
    Posted

    @gucio1234, @StarkJohan

     

    is there a way to have the fibaro VD slider to update the value of the current iTunes slider if the iTunes slider is changed?

    • 0
  • Inquirer
  • Posted

    Yes, I have it done using the php script running on external server (in my case iMac where the iTunes is running).

     

    It was already published and discussed on this forum.

    • 0
    Posted

    the script had current volume yes but it only updated it when the VD slider changed not when iTunes is changed.

     

    i actually figured it out today will post results later. 

    • 0
    Posted

    I woul'd be interested in a solution for iTunes on Windows :-)

     

    • 0
    Posted

    Has anyone figured out how to get this to work with MacOS Monterey since php has been deprecated?

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...