MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    1. Home
    2. Dimonic
    D
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 2
    • Best 0
    • Controversial 0
    • Groups 0

    Dimonic

    @Dimonic

    0
    Reputation
    578
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Dimonic Unfollow Follow

    Latest posts made by Dimonic

    • position from config.js conversion to main.css

      Hello anybody,

      could anyone explain me how the mgic mirror converts the position from config.js to the
      css Styles from main.css?

      position: ‘top_center’ in config.js finds
      .region
      .region.top
      .region.top.center
      in main.css but how is this done?

      Thanks
      Fried

      posted in Development
      D
      Dimonic
    • show ICLOUD ToDo's on Mirror

      On mir first version of the MagicMirror i’ve created a php file witch loads ICLOUD ToDo’s and shows it on the Mirror. Now i’ve updated to MagicMirror² an i have to create a Module witch loads the ToDo’s from the ICLOUD too.
      In the fist Version i used CURL to create the request for the ICLOUD, now i have to use something else to realize the request in JavaScript.

      Is there anyone who could help me with this?

      I’ve tried already NPM REQUEST but i have no Solution for CURLOPT_CUSTOMREQUEST, “REPORT”); and CURLOPT_RETURNTRANSFER, 1);

      This was my old php / CURL Request:
      // Do CalDAV request to iCloud
      $request_body = ‘’;
      $request_body .= ‘<c:calendar-query xmlns:d=“DAV:” xmlns:c=“urn:ietf:params:xml:ns:caldav”>’;
      $request_body .= ’ <d:prop>‘;
      $request_body .= ’ <c:calendar-data>’;
      $request_body .= ’ </c:calendar-data>‘;
      $request_body .= ’ </d:prop>’;
      $request_body .= ’ <c:filter>‘;
      $request_body .= ’ <c:comp-filter name=“VCALENDAR”>’;
      $request_body .= ’ <c:comp-filter name=“VTODO”>‘;
      $request_body .= ’ </c:comp-filter>’;
      $request_body .= ’ </c:comp-filter>‘;
      $request_body .= ’ </c:filter>’;
      $request_body .= ‘</c:calendar-query>’;
      $request_body = sprintf($request_body);

      $url = ‘https://’.$my_icloud_server.‘-caldav.icloud.com/’.$my_user_id.‘/calendars/’.$my_calendar_id.‘/’;
      $c = curl_init($url);
      curl_setopt($c, CURLOPT_HTTPHEADER, array( “Depth: 1”,
      “Content-Type: text/xml; charset=‘UTF-8’”,
      “User-Agent: DAVKit/4.0.1 (730); CalendarStore/4.0.1 (973); iCal/4.0.1 (1374); Mac OS X/10.6.2 (10C540)”
      ));
      curl_setopt($c, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
      curl_setopt($c, CURLOPT_USERPWD, $my_icloud_username.“:”.$my_icloud_password);
      curl_setopt($c, CURLOPT_CUSTOMREQUEST, “REPORT”);
      curl_setopt($c, CURLOPT_POSTFIELDS, $request_body);
      curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
      $caldav_answer = curl_exec($c);
      curl_close($c);

      $caldav_answer_object = simplexml_load_string($caldav_answer, ‘SimpleXMLElement’, LIBXML_NOCDATA);
      $caldav_answer_array = @json_decode(@json_encode($caldav_answer_object),1);;

      posted in Development
      D
      Dimonic