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


oldman

Member
  • Posts

    4
  • Joined

  • Last visited

About oldman

Profile information

  • Country
    Polska
  • Gateway/s
    Home Center 2

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

oldman's Achievements

Newbie

Newbie (1/8)

0

Reputation

  1. @10der, don't you think, that you are asking for supporting devices which are clearly a not-so-very-sophisticated bogus? I know, that Fibaro promises that it is opened to the third party devices, but this it like bringing this car to Land Rover's service station and ask for a repair: I don't think Fibaro will support those devices.
  2. Hello, @AutoFrank could you share VD of Alarm Status?
  3. 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...