• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
  1. Home
  2. mongo116
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
M
Offline
  • Profile
  • Following 0
  • Followers 1
  • Topics 9
  • Posts 65
  • Groups 1

mongo116

@mongo116

Module Developer
26
Reputation
1.8k
Profile views
65
Posts
1
Followers
0
Following
Joined Jul 18, 2017, 11:29 AM
Last Online May 19, 2024, 5:38 AM

mongo116 Unfollow Follow
Module Developer

Best posts made by mongo116

  • MMM-Hive

    Description:

    This module will display the inside and outside temperature from your British Gas Hive heating. It is fairly configurable, with some of the text and the inside icon able to be changed. The thermometer is dynamic based on the current outside temperature, and the inside icon will go red when the heating is on. The Target Temperature row will also change if the target temperature of the Hive system is 1°C or lower (I couldn’t find a specific flag for frost protect enabled, so this was the best way I could find to achieve this).

    I’ve never written code before, and this took far longer than it probably should have, but the internet is a great place and there are some great resources and assistance out there, so a massive thanks to anyone that has helped me (directly or indirectly).

    Screenshots:

    Default:
    0_1501318540374_hive1.png

    Outside temp exceeding highestTemp value, and heating on
    1_1501318540375_hive2.png

    Target temperature 1°C or lower
    4_1501318540375_hive5.png

    Text and icon changed in config.js to alternate values
    3_1501318540375_hive4.png

    Download:

    [card:flick116/MMM-Hive]

    Version 1

    • Initial Release
    posted in Utilities
    M
    mongo116
    Jul 29, 2017, 9:06 AM
  • RE: Hive current room temperature

    No code uploaded yet, but I have started on the readme!
    MMM-Hive

    posted in Requests
    M
    mongo116
    Jul 28, 2017, 9:52 AM
  • RE: sendSocketNotification not working

    Got this sorted - found there is another url that holds the information so added another request. The request I was having issues with was a post request, whereas the one I am using is a get.

    posted in Development
    M
    mongo116
    Apr 5, 2018, 3:23 PM
  • RE: MMM-forecast-io -- Localized up to the minute weather

    @jinjirosan Hi, have you made the changes available to download? Would like to give it a go as currently using a combination of the default weather and forecast-io.

    posted in Utilities
    M
    mongo116
    Nov 28, 2017, 2:35 PM
  • RE: Any MMM-Hive Users that can help, please?

    Hi Damian,

    I’d love to help, but unfortunately I moved house 2 weeks ago and didn’t bring the Hive with me so there is currently no way for me to test this.

    From what I do remember the way that Hive works is that you have to authenticate initially and then you can request the info from the hub:

    So first call is made to https://api-prod.bgchprod.info:443/omnia/auth/sessions which pulls back the session ID

    Then the session ID is used in the header for the request to https://api-prod.bgchprod.info:443/omnia/nodes

    For testing I used Postman in Chrome to make the requests etc so that way I could at least see if data was being pulled back.

    Have you enabled debug? Might be worth a go and then view the console under the browsers developer tools to check whether data is being pulled from the above urls.

    Thanks

    posted in Troubleshooting
    M
    mongo116
    Mar 6, 2018, 7:51 PM
  • RE: Hive current room temperature

    I’ve spent some time on this (well all of my spare time really since I posted my request!) seeing if I could bodge something together, and have come up with the following:

    0_1501186410475_hive.png

    I would imagine it’s totally unoptimised, but it pulls the temperature back from the hive server, which is the main thing! The thermometer also changes depending on the temperature, and the flame changes to white when the heating is on. Need to spend some more time tidying it up and will then probably submit it here.

    posted in Requests
    M
    mongo116
    Jul 27, 2017, 8:16 PM
  • RE: MMM-Hive

    @rick Thanks for that. Github has been updated :thumbs_up_light_skin_tone:

    posted in Utilities
    M
    mongo116
    Dec 14, 2020, 4:09 PM
  • RE: Any MMM-Hive Users that can help, please?

    I was just about to post about the nodeName setting as remembered that can cause issues if you have multiple Hive bits - I only ever had the hub and thermostat… Cheers randomnoise :)

    posted in Troubleshooting
    M
    mongo116
    Mar 6, 2018, 8:00 PM
  • RE: Hive current room temperature

    @Eunanibus I’m probably more worried about people reviewing my crappy code :) I will definitely put it up though.

    posted in Requests
    M
    mongo116
    Jul 27, 2017, 8:25 PM
  • RE: Any MMM-Hive Users that can help, please?

    Hi,

    The last screenshot shows Frost Protect Enabled. Is this actually active on your hive?

    posted in Troubleshooting
    M
    mongo116
    Mar 7, 2018, 7:44 PM

Latest posts made by mongo116

  • RE: MMM-Hive

    Not sure whether many are using this module but figured I’d provide an update on the changes I made today. I’ve now updated the module so that it works again! I have updated to include the new login process and from testing it all appears to work - would welcome any feedback though :)

    posted in Utilities
    M
    mongo116
    Apr 2, 2021, 7:53 PM
  • MMM-atHome

    This is pretty niche, but I wanted to show my next rubbish collections as we have multiple that are on different weeks. My local council doesn’t appear have an API and the website to view the next collections isn’t the easiest to pull data from. They do however use the @HOME app, and from this I have pulled back the relevant JSON.

    More details can be found at: MMM-atHome

    screenshot.png

    posted in Utilities
    M
    mongo116
    Jan 12, 2021, 10:30 AM
  • RE: MMM-Hive

    @rick Thanks for that. Github has been updated :thumbs_up_light_skin_tone:

    posted in Utilities
    M
    mongo116
    Dec 14, 2020, 4:09 PM
  • RE: MMM-Hive

    @rick Cheers for the details. I’ve updated and added some config options in case this changes again, so you only then need to update the config.

    posted in Utilities
    M
    mongo116
    Oct 17, 2020, 2:48 PM
  • MMM-qnapDownloadStation

    I’ve created a module, MMM-qnapDownloadStation, that will show the current downloads from Download Station running under a QNAP NAS.

    example.png

    posted in Utilities
    M
    mongo116
    Sep 18, 2020, 7:03 AM
  • RE: Convert bytes to megabytes - JSON

    Thanks for the replies :thumbs_up_light_skin_tone:

    I’ve got the bytes string converting to a number, so that’s all good. Now the next question, @Bugsounet how do I use your function within the JSON.parse function?

                    var payload = JSON.parse(payload, function (key, value) {
                        if ( key === 'down_rate' ) {
                        var num = Number(value);
                        return (num/(1024*1024)).toFixed(2);
                        }
    

    Just to add, I had tried the following and receive a this.convert is not a function

                        var downrate = this.convert(value,0);
                        return downrate;
    
    posted in Development
    M
    mongo116
    Sep 17, 2020, 6:40 AM
  • RE: Convert bytes to megabytes - JSON

    I figured this out in the end, with the help of google :) I used the JSON.parse() reviver function to take the down_rate and up_rate from the payload and divide it by 1024 (and again by 1024) to convert the bytes to megabytes. What confused me at first was I was trying to do this in the node_helper.js, which didn’t work. It needed to be in the socketNotificationReceived of the .js file.

                    var payload = JSON.parse(payload, function (key, value) {
                        if ( key === 'down_rate' ) {
                        return (value / 1024 / 1024).toFixed(2);
                        }
                        else if ( key === 'up_rate' ) {
                        return (value / 1024 / 1024).toFixed(2);
                        }
                        else {
                        return value;
                        }
                    });
    

    I’m sure there is a proper way of doing this, but for my needs this is now working as needed.

    posted in Development
    M
    mongo116
    Sep 16, 2020, 6:54 PM
  • RE: Convert bytes to megabytes - JSON

    @sdetweil Thanks for the reply.

    basically t.data[i].down_rate / 1024 for kilobytes

    posted in Development
    M
    mongo116
    Sep 16, 2020, 11:45 AM
  • Convert bytes to megabytes - JSON

    I’m creating a module that connects to my QNAP NAS and shows the current downloads (DownloadStation). It’s mostly working, but the download rate is in bytes and I’d like to display it in megabytes (or possibly kilobytes).

    The download list is in JSON format and I currently display the download name and download rate in a table as follows ( t being the JSON data):

                for (var i = 0; i < t.data.length; i++)
            {
                var row = document.createElement("tr");
                var name = document.createElement("td");
                name.innerHTML = t.data[i].source;
                var downrate = document.createElement("td");
                downrate.innerHTML = t.data[i].down_rate;
                row.appendChild(name);
                row.appendChild(downrate);
                table.appendChild(row);
            }
            wrapper.appendChild(table);
    
    		return wrapper;
    
    posted in Development
    M
    mongo116
    Sep 16, 2020, 6:46 AM
  • RE: Any MMM-Hive Users that can help, please?

    @Damian Hi, glad that it’s now working. I’m still going to work on it when I can, but at least no urgency now :)

    For the outside temperature thermometer, check the readme on the github page (https://github.com/flick116/MMM-Hive), specifically the following settings:

    highestTemp - Set the highest temperature value, which when reached will use the ‘full thermometer’ icon, plus turn the icon red

    highTemp - Set the high temperature value, which when reached will use the ‘three quarters full thermometer’ icon

    lowTemp - Set the low temperature value, which when reached will use the ‘half full thermometer’ icon

    lowestTemp - Set the lowest temperature value, which when reached will use the ‘quarter full thermometer’ icon
    (anything below this temperature will use the ‘empty thermometer’ icon)

    Only when the temperature equals or is greater than the highestTemp value will the icon turn red.

    posted in Troubleshooting
    M
    mongo116
    Apr 10, 2018, 9:16 PM
Enjoying MagicMirror? Please consider a donation!
MagicMirror created by Michael Teeuw.
Forum managed by Sam, technical setup by Karsten.
This forum is using NodeBB as its core | Contributors
Contact | Privacy Policy