Read the statement by Michael Teeuw here.
SimpleLogo auto change logo not working
-
The ReadMe file shows this
cat README.mdModule: MMM-SimpleLogo
The
MMM-SimpleLogo
module is third party modules of the MagicMirror. This module simply displays logo.Using the module
To use this module, add it to the modules array in the
config/config.js
file:modules: [ { module: 'MMM-SimpleLogo', position: 'top_left', // This can be any of the regions. config: { // The config property is optional. // See 'Configuration options' for more information. } } ]
Configuration options
The following properties can be configured:
Option Description fileUrl
File url.
Possible values: Logo link form internet or path to your local files relative to MagicMirror directory
Default value: 'modules/MMM-SimpleLogo/public/logo.png'width
Set width of your logo, height is auto.
Possible values:'300px'
or'50%'
Default value:'200px'
position
Horizontal position on current container
Possible values:left
,center
, orright
Default value:left
refreshInterval
Refresh/refetch image file between interval. Only use this if your image url return different image after some interval of time, even the fileUrl
is not changed. See this case #2, awesome project by @ElYoM
Possible values:1000
,2000
, or10000
Default value:0
(disabled)text
Text above the image.
Possible values: Any text
Default value:Simple Logo
Notification Events
The MMM-SimpleLogo module supports the notification event
SIMPLE_LOGO_UPDATE
which allows the configuration to be dynamically modified. As an example, the MMM-OnScreenMenu module might be used to dynamic adjust thefileURL
parameter as follows:{ module: "MMM-OnScreenMenu", position: "top_left", config: { menuItems: { notify1: { title: "Show Cat", notification: "SIMPLE_LOGO_UPDATE", payload: { fileUrl: "cat.jpg", width: "750px" } }, notify2: { title: "Show Dog", notification: "SIMPLE_LOGO_UPDATE", payload: { fileUrl: "dog.jpg", width: "1050px" } } } } }
-
@RoadRunnr1469 right. Some external module sends a message.
I didn’t look at that code
-
@sdetweil
Based on the section “Notification Events” I added a section as called out.
this isn’t letting me paste it in here, says it is spam. -
I added this to the config.js file
{ module: "MMM-OnScreenMenu", position: "bottom_right", config: { menuItems: { notify1: { title: "Patch", notification: "SIMPLE_LOGO_UPDATE", payload: { fileUrl: "modules/MMM-SimpleLogo/public/Amc.JPG", width: "200px" }
-
}, notify2: { title: "Support", notification: "SIMPLE_LOGO_UPDATE", payload: { fileUrl: "modules/MMM-SimpleLogo/public/RedSupport.jpg", width: "150px" } },
-
@RoadRunnr1469 I won’t be able to look at this til tomorrow or Sunday.
Open the developers window ctrl-shift-i select the console tab and scroll up to see any messages sent from the on screen module
-
@RoadRunnr1469 I installed the module, and modified one of mine to send the notification, and it worked as expected.
-
@RoadRunnr1469 and you installed the “MMM-OnScreenMenu” module too, right?
-
@sdetweil yes, and the on screen option works fine changes the logo as expected.
-
@RoadRunnr1469 cool… can u mark this as resolved now?