@frode shouldn’t have to wait…
do (on MM screen)
ctrl-shift-i
or start MM in debug mode
npm start dev
select the console tab of the developers window
scroll back up and see if there are any errors shown (red text)
@frode shouldn’t have to wait…
do (on MM screen)
ctrl-shift-i
or start MM in debug mode
npm start dev
select the console tab of the developers window
scroll back up and see if there are any errors shown (red text)
@maestro82 I see a lot of other users using MMM-DarkSkyForecast
I use @Mykle1 's MMM-BMW-DS
weather underground has been canceling the keys for the free service which it stopped a year a go now.
no free keys are available anymore…
there are other weather modules (which require different keys) available.
that error is typically cause NPM is downlevel…
do
npm i -g npm
to update
@Anthony interesting… neither of my systems has forgotten the screen saver setting, been running for over 2 years now…
@Anthony when the screen went to sleep was the developer window hidden too?
when my MMM-SleepWake hides all the modules, the Developers console is still on the screen
@costascontis edit the node_helper and change the code
@teitlebot yeh, no idea either myself.
Maybe a web service on the Arduino callable from mm module
https://www.survivingwithandroid.com/2016/05/arduino-rest-api-iot.html/amp
another example, thinner, more local, esp8266 wifi…
https://mancusoa74.blogspot.com/2018/02/simple-http-rest-server-on-esp8266.html
using this second set of info, I was able to add a web server to my arduino ESP8266 sketch in 10 minutes…
@BryceTalbot I solved that problem a while back…
need to use an onload() handler to process after the image is loaded but before shown.
the key is to minimize the total change to the dom, to reduce screen flash and dead space showing thru
so I load the images hidden and when loaded, calculate the size to make it fit on the screen without any stretch or clip. contain and cover styles both alter the image display.
then in the module dom contribution i append the image… (there might already be one being displayed)
and mark the image to be shown, with fade in
then I check if there are two, and if so, hide the 1st (with fade out) and then delete it from the dom contribution, leaving one image.
m here is a variable holding the size of the top margin
var m = window.getComputedStyle(document.body,null).getPropertyValue(‘margin-top’);
// set the onload event handler
// the loadurl request will happen when the html is returned to MM and inserted into the dom.
img.onload= function (evt) {
// get the image of the event
var img = evt.currentTarget;
//Log.log("image loaded="+img.src+" size="+img.width+":"+img.height);
// what's the size of this image and it's parent
var w = img.width;
var h = img.height;
var tw = document.body.clientWidth+(parseInt(this.m)*2);
var th = document.body.clientHeight+(parseInt(this.m)*2);
// compute the new size and offsets
var result = this.self.ScaleImage(w, h, tw, th, true);
// adjust the image size
img.width = result.width;
img.height = result.height;
//Log.log("image setting size to "+result.width+":"+result.height);
//Log.log("image setting top to "+result.targetleft+":"+result.targettop);
// adjust the image position
img.style.left = result.targetleft+"px";
img.style.top = result.targettop+"px";
img.style.opacity = this.self.config.opacity;
img.style.transition = "opacity 1.25s";
// if another image was already displayed
if( this.self.wrapper.firstChild!=this.self.wrapper.lastChild)
{
// hide it
this.self.wrapper.firstChild.style.opacity=0;
// remove the image element from the div
this.self.wrapper.removeChild(this.self.wrapper.firstChild);
}
}.bind({self: this, m:m});
I use this same methodology in a photo based calendar display module. it loads photos from google_drive, dropbox, and local file systems. But you cannot tell how big the image is (or its orientation) until AFTER it loaded.
@teitlebot you would have to do the same for google photos download… he could have worked out the horizontal vs vertical alignment of the picture…
google search for the stepper motor , A4988 Stepper