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


Search the Community

Showing results for tags 'youtube'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • FIBARO Community
    • FIBARO Portal and Forum policy
    • FIBARO
    • Say hello!
    • Off-topics
  • FIBARO Update
    • FIBARO System Update
    • FIBARO Mobile Update
  • FIBARO Community Support
    • Scenes and Interface
    • FIBARO Products
    • FIBARO Mobile
    • FIBARO HomeKit
    • FIBARO Assistant Integrations
    • Other Devices / Third-party devices
    • Tutorials and Guides
    • Home Automation
    • Suggestions
  • FIBARO Społeczność
    • FIBARO
    • Przywitaj się!
    • Off-topic
  • FIBARO Aktualizacja
    • FIBARO System Aktualizacja
    • FIBARO Mobile Aktualizacja
  • FIBARO Wsparcie Społeczności
    • Sceny i Interfejs
    • FIBARO Urządzenia
    • FIBARO Mobilnie
    • FIBARO HomeKit
    • Integracja z Amazon Alexa i Google Home
    • Urządzenia Firm Trzecich
    • Poradniki
    • Automatyka Domowa
    • Sugestie

Categories

  • Scenes
  • Virtual Devices
  • Quick Apps
  • Icons

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Facebook


Google+


Skype


Website URL


WhatsApp


Country


Gateway/s


Interests

Found 1 result

  1. Hello, I need your help guys;) I want to display the data from YT in vd: the amount of views on a particular channel and the total number of videos I have a direct link that displays information in JSON: https://www.googleapis.com/youtube/v3/channels?part=statistics&id={CHANNEL_ID}&key={YOUR_API_KEY} If I put it in web browser, I see the following information: // 20170117085953 // https://www.googleapis.com/youtube/v3/channels?part=statistics&id={CHANNEL_ID}&key={MY_API_KEY} { "kind": "youtube#channelListResponse", "etag": "\"gMxXHe-zin558lTnzKu8vjcmDI/2Qud556x4kgLe-969qH7-65gh7t\"", "pageInfo": { "totalResults": 1, "resultsPerPage": 1 }, "items": [ { "kind": "youtube#channel", "etag": "\"gMxXHe-zinKdE9TTEzKu8vjcmDI/q3O415qUconyEsljnEa554j5mM\"", "id": "{CHANNEL_ID}", "statistics": { "viewCount": "34315", "commentCount": "0", "subscriberCount": "76", "hiddenSubscriberCount": false, "videoCount": "74" } } ] } I want to import from the above data to VD following information: viewCount": videoCount": I know that the connection to the data is encrypted (via https), so I created a php script and put it on my server: <?php $url = fopen( ‚https://www.googleapis.com/youtube/v3/channels?part=statistics&id={CHANNEL_ID}&key={MY_API_KEY}’, ‚r’ ); $wynik = ”; while (!feof($url)) { $wynik .= fread($url, 8192); } fclose( $url ); header(‚Content-Type: application/json’); print_r($wynik); ?> Then I created of virtual device on the Home Center: HC2 = Net.FHttp(„ADDRESS_OF_MY_HOSTING”,80); dane ,status, errorCode = HC2:GET(„/PHPFILE.php”); ajson=json.decode(dane) view=ajson.items[1].statistics.viewCount fibaro:call(195,’setProperty’,’ui.Label1.value’,tostring(view)) video=ajson.items[1].statistics.videoCount fibaro:call(195,’setProperty’,’ui.Label2.value’,tostring(video)) The problem is that it does not collect any data from YouTube. In main look I see: line 2: unexpected symbol near '�' If anyone has any idea where I made a mistake or how I can accomplish in a different way?
×
×
  • Create New...