@hriereb just checked… nothing free there…
cheapest looked like 400 eu /year
@hriereb just checked… nothing free there…
cheapest looked like 400 eu /year
@hriereb i see… i created a new userid and see the same thing… IBM now owns this stuff and has decided not to provide free api access anymore… what a shame…
you can’t install in Desktop… its protected…
use your home folder… then make a shortcut to start the mirror
i got an api key the other day without any trouble. just have to login and go to key settings…
thanks… not a nodejs developer generally, so didn’t know about the npmjs site…
also, i run the MM on an ODROID not PI. a lot faster.
i understand how ws works… i built a custom ws server and interface in front of an api emulation platform to support software testing a couple years ago.
thanks… the image is not shown in the dom, it is shown in a separate ‘browserwindow’, floating over the dom. i just loadUrl the image into the window, after creating and positioning it.
the mirror code doesn’t know the images are there
pictorial calendar reminders.
I have tested that the helper needs to do all this window mgmt
The scheduler module does scheduling (compare db data to calendar entries), start/stop viewer(s), and provide indirect services to load images depending on their source (file, dropbox, google drive, one drive).
The viewer module just walks thru a list of urls (getNext()) and opens a window hidden, loads image, hides old window, shows new window, deletes old window. (avoid dead window during load and, minimize screen flash)
yeh, but all this notification event handling really messes up the code i have which is all angular promise based.
I want to open my own browserwindow (show image), but u can’t do that in a module, only in a helper,
but then the window handle object needs to be stored inside the object which is managing the list of images for this ‘viewer’. that object is stored in the module… so, how do I transport the window handle object to the module… is the object valid in the other context (helper vs module).
see the topic ‘what can i do in a module’. (which u already have)
do you have any pointers to examples of websockets from the module? or your “other JS code” means some OTHER library of JS code…
looks like I would have to build another js class to wrap the ws services…(run the server side in the helper) cause I can’t require() in the module itself… load those classes via the scripts…
cool… that would allow my components to communicate in a synchronous mode…
not class variable (I got that now), but shared would solve a ton of problems.
the question was, how do you KNOW that music is playing? what code tells u?
I would expect the spotify playing module to do a sendNotification(“spotify_Playing”,something);
so that other modules might know… it does not do that (looking at the code)…
you could fork the existing code and add the 2 lines (one playing, one not) of code and submit an enhancement (pull) request to the module owner…
i have a lot of code running in another node/angular mirror app and have never seen this syntax…
@brenj said in Modules again.....:
timeFormat: int 60 fadeSpeed: int 5
the json data model is if text, then the data is quoted foo:“something”, if numeric, the data is not quoted, bar:60
no ‘int’
a module to show/hide would not be hard… but, how will you KNOW that spotify is playing (or has ended)…
does the spotify playing module send notifications of these events?
what is the model being used for both module and helper?
where and how do I declare variables? either global or instance? (not method variables)
in a helper if I declare outside the NodeHelper.create(…), they are truely global, and other helpers will overwrite my variables if the names collide.
the doc also mentions sendSocketNotification, in both directions… module to helper and helper to module(s) (of same name if multiple)…
this.sendSocketNotification(notification, payload)
notification String - The notification identifier.
payload AnyType - Optional. A notification payload.
If you want to send a notification to the node_helper, use the sendSocketNotification(notification, payload). Only the node_helper of this module will receive the socket notification.
and
Each **node helper** has some handy methods which can be helpful building your module.
this.sendSocketNotification(notification, payload)
notification String - The notification identifier.
payload AnyType - Optional. A notification payload.
If you want to send a notification to all your modules, use the sendSocketNotification(notification, payload). Only the module of your module type will receive the socket notification.
and also looks like with MM.getModules(). i can get an object reference to the instances of the other components, and access their public methods…
scheduler->handler.start(viewer_config),
handler->scheduler.next(viewer)
ok, starting to migrate…
questions:
is there a way to communicate across modules? I don’t see a way to have module A request info from module B, and have B’s response only come back to module A.
in my design, only the scheduler knows about the config DB, and HOW to decide if a viewer is needed, or not.
it then tells the viewer manager to start/stop a viewer… the schedulers also is the only one that knows HOW to get the list of images (using the appropriate api of the source location, file, dropbox, etc)
the viewer makes a call to the scheduler to get the next image, and if at the end of the list, it causes another list reload. the viewer doesn’t know where the list came from. the list is just to images.
now, if someone uses the mobile app and changes the data, it MAY be cause to terminate a running viewer, as the filter would no longer cause that particular viewer to be selected…
but… the db change handler is in the viewer scheduler node_helper, and the running viewer list is in the viewer handler node_helper…
looks like I can only do sendnotification, and broadcast to all modules (ugh)
there is a bug in the electron browser that causes the black screen.
i did
npm remove electron
npm install electron@1.7.9
and it works fine now…
someone posted another solution to issue 1243