• 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
  3. Posts
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

Posts

Recent Best Controversial
  • 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: 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: Passing variable from one request to another

    @strawberry-3.141 Fantastic - just needed to be nested. That now works like a charm - thank you so much :)

    posted in Troubleshooting
    M
    mongo116
    Jul 26, 2017, 9:03 PM
  • RE: Passing variable from one request to another

    This is from node_helper.js:

    	request({
    		url: "https://api-prod.bgchprod.info:443/omnia/auth/sessions",
    		headers: {
    				'Content-Type': 'application/vnd.alertme.zoo-6.1+json',
    				'Accept': 'application/vnd.alertme.zoo-6.1+json',
    				'X-Omnia-Client': 'Hive Web Dashboard',
    				'cache-control': "no-cache",
    				 },
    		method: "POST",
    		body: JSON.stringify(body),
    	}, function (error, response, body) {
    		if (!error && response.statusCode == 200) {
    			var responseJson = JSON.parse(body);
    		}
    	});
    	
    	request({
    		url: "https://api-prod.bgchprod.info:443/omnia/nodes",
    		headers: {
    				'Content-Type': 'application/vnd.alertme.zoo-6.1+json',
    				'Accept': 'application/vnd.alertme.zoo-6.1+json',
    				'X-Omnia-Client': 'Hive Web Dashboard',
    				'cache-control': "no-cache",
    				'X-Omnia-Access-Token': ,
    				 },
    		method: "GET",
    	}, function (error, response, body) {
    		if (!error && response.statusCode == 200) {
    			var responseJson = JSON.parse(body);
    		}
    	});
    

    The Session ID is part of the JSON response from the first request (responseJson.sessions[0].sessionId). Session ID needs to be put into the ‘X-Omnia-Access-Token’: , of the second request.

    Thanks

    posted in Troubleshooting
    M
    mongo116
    Jul 26, 2017, 7:50 PM
  • RE: Passing variable from one request to another

    Thanks for the reply. Sorry to be a pain, but any chance of you putting a simple example of both on here.

    posted in Troubleshooting
    M
    mongo116
    Jul 26, 2017, 2:12 PM
  • Passing variable from one request to another

    Hi,
    Hopefully a simple question.

    I am trying to pull data for my heating system, which requires two requests be made. The first request gets the sessionID, and the second logs in using the sessionID and pulls back the JSON data.

    I can see the SessionID in the first request, but how do I have this value available to the second request?

    Thanks

    posted in Troubleshooting
    M
    mongo116
    Jul 26, 2017, 12:44 PM
  • RE: Motion Detector

    @reaper81 I had the following in my config.js:

                  {
                    module: 'motiondetector',
                    config: {
                    timeout: 5*60*1000
                       }
                   },
    

    You will need to ensure that the 3 files are located in the modules/motiondetector folder.

    I ended up using a different method for motion detection though, as tvservice kept stopping working.

    posted in Utilities
    M
    mongo116
    Jul 25, 2017, 3:15 PM
  • RE: Motion Detector

    @strawberry-3.141 Thanks for that. I’ve amended this slightly so will keep an eye on it. Might also have a look at putting on some heatsinks to see if that helps.

    One (hopefully!) final question. When the monitor is turned off, is there a way to ‘freeze’ the other modules, so they stop running for the duration that the monitor is off? This would hopefully help with performance, in that the other modules are no longer running.

    posted in Utilities
    M
    mongo116
    Jul 21, 2017, 11:15 AM
  • RE: Motion Detector

    I’ve got the motion detection now working - had to add bcm2835-v4l2 to \etc\modules - restarted and screen now turns off after defined period and on when motion is detected. This is really great, and I’m nearly there - but… Now when the motiondetector is running, the RPi3 temp just goes up and up and up, until it eventually crashes/freezes and I have to pull the power as RPi is completely unresponsive. If I remove motiondetector from MagicMirror, temperature stays stable and no crashing. Is there something I can change in the config to sort out this performance issue?

    posted in Utilities
    M
    mongo116
    Jul 21, 2017, 8:30 AM
  • RE: Motion Detector

    Just to add to this, I have checked that the camera is working and motion is detected by testing with https://github.com/pageauc/motion-track. All appears to be working as expected. No motion is detected unless I move in front of the camera.

    posted in Utilities
    M
    mongo116
    Jul 21, 2017, 6:12 AM
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 6 / 7
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