@assassins Which method did you use?
Read the statement by Michael Teeuw here.
Posts made by MMRIZE
-
RE: Default Calendar & Nextcloud Calendar - CERT_HAS_EXPIRED
-
RE: Default Calendar & Nextcloud Calendar - CERT_HAS_EXPIRED
It seems to be related with this;
https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/To fix this there might be a few options;
- upgrade your node version with
--use-openssl-ca
flag. (at least node ver 16) - modify source code. Check
agentOptions.rejectUnauthorized
offetch
orrequest
(anywhich in source). I think that value or equivalent option should befalse
(to skip unauthorized request) - DANGER :
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0
This is dirty and dangerous but quick solution.
- upgrade your node version with
-
RE: Need Help Changing Background Image Based on Time
@sdetweil
First url was set in start(), so I put that next of update in recursive. -
RE: MMM-CalendarExt2 freezing MagicMirror
@sg437
I think your ICAL URL might be wrong. Check that URL with the default calendar model. (See the log - what the module said.)And, I don’t recommend putting the
upcoming
view into the horizontal region.upcoming
view has only one slot so it will not match with the horizontal layout.upcoming view
in the vertical region ordaily view
,weeks view
in the horizontal region is better.{ module: "MMM-CalendarExt2", config: { firstDrawingDelay: 10, calendars : [ { name: "Tottenham", url: "https://www.google.com/calendar/ical/ovb564thnod82u5c4njut98728%40group.calendar.google.com/public/basic.ics", icon: "emojione:chicken" }, { name: "Leeds", url: "https://www.google.com/calendar/ical/h2suh4c1iqvktk4olmfqtth4lg%40group.calendar.google.com/public/basic.ics", icon: "emojione-v1:shield" } ], views: [ { name: "Upcoming", header: "Upcoming Game", mode: "upcoming", position:"top_right", calendars: ['Tottenham'] }, { name: "Daily", mode: "daily", position: "lower_third", calendars: [], type: "row", slotCount: 7, fromNow: -2, useEventTimeRelative: true, } ], scenes: [ { name: "DEFAULT", views:[], }, ], } },
-
RE: Need Help Changing Background Image Based on Time
start: function () { this.timer = null this.targetURL = null this.setImageURL() }, getDom: function () { console.log(">", this.targetURL) var dom = document.createElement('div') dom.style.backgroundImage = `url(${this.targetURL})` dom.style.height = '100vh' // I recommend to control this through CSS, but in this example, I just hardcode it. dom.style.width = '100vw' dom.style.backgroundSize = 'cover' return dom }, notificationReceived: function (notification, payload, sender) { if (notification === 'DOM_OBJECTS_CREATED') { this.job() } }, job: function () { clearTimeout(this.timer) this.updateDom() this.setImageURL() this.timer = setTimeout(() => { this.job() }, this.config.updateInterval) }, setImageURL: function () { // do your logic for picking image. Here I pick the random unsplash image instead for example. let rand = Math.floor(Math.random() * 100000) this.targetURL = `https://source.unsplash.com/random?seed=${rand}` }
-
RE: Need Help Changing Background Image Based on Time
@tonkxy
You’ve missedthis.updateDom()
. It needs to be called when you want to redraw your module’s output.
Whenever you call “updateDom()”, your “getDom()” will be executed. -
RE: MMM-MQTTBridge not working
@gkchimz
Have you set the last line of dictionary?module.exports = { mqttHook, mqttNotiCommands};
-
RE: MMM-MQTTBridge not working
@gkchimz
It seems your mqttDictionaries wrong. -
RE: Desktop working gadgets
This is the almost same product I purchased but from a different seller. There could be a no-touch version or without a case or even without a controller. (If you select touch-version, you have to check the compatible controller). Anyway, hundreds of sellers are selling these items, so you need to invest time to find a best price.
1920X480 HSD088IPW1 might be the only panel that has this size. Usually, it seems to be able to be powered from RPI4 USB3 directly without an external power source. A bigger panel wouldn’t. That’s why I chose this.
Some LCD cased versions might have holes to fasten RPI on the backside.
Additionally, you need some accessories;
mini HDMI(Controller) - micro HDMI(RPI4) Cable
. (I recommend angled plug with ribbon cable)USB 3(RPI4) - micro USB(Controller) Cable
. (angled plug too.)- Of course, an RPI4 power source be needed. (LCD will drain the power so I recommend the original RPI4 power adapter or equivalent.)
To use with RPI, you need some modification.
- You might need to set a screen resolution profile. Default screen direction and resolution was 480x1920 vertical. So I need to find a way to rotate it.
I cannot remember what I’ve tried at this moment. :) (many trials and fails ^^) Anyway you can google it, I believe. link might be the one of them. Or, in RPI4, Just screen setting menu would be enough. (I cannot remember what I’ve done.) - (on touch version) After the success of the screen rotation, I bumped to another issue, the touchscreen coordination is not rotated. But I cannot find a way, so…
I just rotated my MM screen itself instead of above screen rotation & touch-coord rotation.
That’s all.
-
RE: Need Help Changing Background Image Based on Time
start: function () { // init your module. // Not recommended doing your real job here. Because this method is evaluated only one time on startup before all the stuff be prepared (e.g, DOM creating) this.timer = null }, notificationReceived: function (notification, payload, sender) { if (notification === 'DOM_OBJECTS_CREATED') { // This might be the best position where your real job starts. this.myJob() } }, myJob: function () { clearTimeout(this.timer) let rand = Math.floor( ... ) // random number to pick let hour = (new Date()).getHours() // select hour to pick the folder // ... Your logic for picking image by hour and rand this.timer = setTimeout(() => { // ... Your logic for displaying image picked. this.myJob() // recursive execution per updateInterval. // It would be a better habbit to use setTimeout instead of setInterval }, this.config.updateInterval) },