MMM-HTTPRequestDisplay


  • Module Developer

    I created this to help another member @acdacd2 but I figure it can be universally used. Many thanks to @KirAsh4

    It is available here: https://github.com/Eunanibus/MMM-HTTPRequestDisplay

    This is not only my first module, but it’s my first real venture into JavaScript, before this I’ve not really had any experience.

    The module allows a targetURL that responds with XML data to be displayed on the mirror. This hopefully supposed to be useful to anyone with any kind of home automation or sensor data that can be received via a HTTP request. In theory, one might be able to get a read out on say; all the doors that are locked in a house.

    I’m not sure. It’s very choppy, and needs some serious work. Right now it only inspects one node hierarchy down. I’d like to improve that in the future.

    Below, is an example using the OpenWeather API to make a request.

    alt text

    alt text

    alt text



  • nice! this will be very helpful when i get time to work on my home-automation (loxone) module :) Thank you!


  • Module Developer

    Thank you :wink: - I hope it’s useful to someone. It needs some work so I’ll probably revisit it soon.

    But right now I’m working on a new module to give to everyone. And it’s even cooler :stuck_out_tongue: - I actually think a lot of people will use it.


  • Module Developer

    VERY nice with this I think you have solved a few issues for me! :) I wrote a module for my joomla site and was looking for a way to use it here [NFL Scoreboard] but since this will do the httprequest I can pick apart my module and use the parts with this and it should work!! Bravo!!

    HUGE Thank you!


  • Module Developer

    OH and where can I download it from? Thank you!


  • Module Developer

    Download available here

    https://github.com/Eunanibus/MMM-HTTPRequestDisplay

    I need to make some fixes to the module so for right now consider it in Beta :)



  • Great! Should solve my problems, however I seem to have issues retrieving any data :

    this is from my config:

    {
    module: ‘MMM-HTTPRequestDisplay’,
    position: ‘top_center’,
    header: ‘Room Temp’,
    config: {
    httpRequestURL: “http://192.168.1.38/guestRoomTemp.php”,
    updateInterval: 2500
    }
    }

    The guestRoomTemp.php output an XML file format such as this
    "< root>< roomTemp>20.00< /roomTemp>< /root>" (had to add the space in the XML output example here as the editor seemed to remove the tags)…

    are there issues calling .php files? The error I get is: HTTP Request Failed. Status 0.
    Please check the request URL in the module config.

    I can call the page and get the result from a web browser so there should be no access rights issues?


  • Module Developer

    Hello guys,

    Thanks for reminding me to do this. This script has needed some work for a while now and I keep delaying it.

    There’s an issue with cross-site scripting I need to resolve (so resolving external URL’s may fail) - I also want to establish the issue with node inspections. I’m going to begin fixing these issues as soon as my exams are up (So beginning of June) - So you can expect an update then. Apologies for the inconvenience in the mean time.

    As an added bonus, I’ll be releasing a new module also :) It’s pretty cool looking and I’m looking forward to giving it to all of you.

    Thanks!



  • Cool! Quick response! I might move it to the localhost then for now until new version is out :)


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.