Giter Site home page Giter Site logo

museumsvictoria / nodel Goto Github PK

View Code? Open in Web Editor NEW
60.0 13.0 17.0 2.69 MB

A digital media control system for museums and galleries

Home Page: nodel.io

Java 73.21% Python 1.04% HTML 0.06% JavaScript 12.37% CSS 1.21% C# 1.50% Batchfile 0.09% XSLT 5.10% Less 5.42%
java iot museum home-automation galleries

nodel's Introduction

nodellogo

Nodel is an open source digital media control system for museums and galleries.

It uses a series of nodes that perform "actions" or respond to "signals" to control various devices on a network, allowing quick and easy management of digital media devices.

Nodel is typically used to control digital media in galleries, museums, corporate meeting rooms and digital signage.

In short, Nodel can manage any programmable device across a wide range of platforms.

Why Nodel?
  • It is simple to deploy, operate and maintain
  • It runs on any operating system
  • It runs on any browser including mobile devices
  • Best of all, it is open source and free

activityroomexample

About

Nodel is comprised of two parts - the platform and the recipes.

Platform

The platform or core system is written in Java and is the communication layer that allows nodes to interact with each other.

Why Java?
  • It is one of the most portable and ubiquitous managed execution environments in the industry, running 3 billion devices worldwide
  • It allows large numbers of nodes to be efficiently hosted with the smallest footprint
  • It is a very mature and robust ecosystem

An active instance of the platform (aka. "nodehost") can manage any number of integrated media devices, or assistant tools (schedulers, monitors, groups) to form a coherent and manageable network of nodes.

These nodes are discoverable from other nodehosts on the same network, by which a series of user specified bindings allows the seamless propagation of remote actions and signals between a group of nodes.

Recipes

Recipes are scripted in Python and are programmed to perform tasks, which might involve switching on a projector or playing a certain audio or video clip.

Why Python?
  • It is equally ubiquitous in the industry with readily accessible documentation, libraries and source code
  • It excels as a scripting environment both for heavy and lightweight tasks
  • Short, succinct and neat code makes scripting a breeze

There are example available on the recipes repository.

The simple high-level nature of the Nodel protocol means aternative languages and environments can easily participate in the Nodel network as long as they come with a minimal set of networking functions.

Nodes

A node is a self-managed, self-announcing, self-describing member of the subscription-based event-network. It's generated when a recipe sits inside the /nodes/node_name folder of a nodehost.

5b4c17b046eae

A node might represent and manage:

  • A physical device
  • A virtual software component on the network
  • Sub-components

Each node features:

  • A simple high-level addressing scheme
  • A simple messaging protocol using short, well defined, human-friendly message “packets”
  • A means to fully query its behaviour points – i.e. actions and signals
  • Automatic management of connections between nodes
  • A native TCP terminal-like interface for simple low-latency programmatic control
  • An HTTP/HTML interface for high-level as well as simple programmatic control

Nodes communicate with each other using a simple, open, language independent, text-based, human readable protocol written in JSON (JavaScript Object Notation) using the principles of REST (REpresentational State Transfer). Being text-based and human readable, commonly available tools such as Telnet and Notepad can be used to test and diagnose problems on a given network.

Specifications

A node can run on any hardware which runs the Java Virtual Machine, which includes OS X, Windows and Linux based devices. As such, no proprietary hardware is required to install and run the system. This requires no complex and expensive infrastructure or servers to operate and allows a wide range of devices such as the cost-effective Raspberry Pi to be used in a control system design.

The platform-independent nature of Nodel also allows it to easily scale to suit your environment. Your organisation is not limited in the choice of hardware or software and the simplicity of the Nodel architecture makes it the ideal choice as a control system.

System requirements

  • Any operating system capable of hosting the Java 8 Runtime Environment – including OS X, Windows or Linux
  • A current web browser
  • Made for mobile

Quick start

5b4c2e9005ffc

Building and releases

Notes

  • thoroughly road tested with Java 8 (available from AdoptOpenJDK)
  • for service / daemon use, see wiki pages
  • check bootstrap files for startup config

Licenses

Credits

Nodel is a joint venture established between Museums Victoria and Automatic. It was imagined as a replacement for Museum Victoria’s gallery control system at the time.

You may find out more about the Nodel project on the White Paper.

nodel's People

Contributors

dependabot[bot] avatar justparking avatar mcartmel avatar morimoriysmoon avatar scroix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodel's Issues

Node is not reloaded after script.py change

I was upgrading our adamio nodes from the legacy recipe to the new non-modbus recipe. when I replaced the script.py file in the node folder Nodel did not refresh the script.

I then tried editing the script, pasting in the new code and hitting save. Nodel saved the file and created a backup, but did not refresh the node to accept the changes. I have to delete the node and recreate the node to get it to reprocess the script. or rename the node.

image

from the screenshot you can see the last time Main was processed was at 11am. I made the changes at 1pm.

Unable to access Bindings in some nodes at particular times

This bug is intermittent.

When a user navigates to the ‘Advanced mode’, then clicks the Actions or Events under Bindings, sometimes the menu does not drop-down
It seems to fix itself after a couple of minutes.
It affects most desktop browsers – Chrome, Safari & Firefox on both OS X and Windows.
It doesn't seem to affect mobile browsers – I have tested Safari on iOS 7.
Refreshing the webpage does not work and it will only commence working after a while.
It’s not isolated to a particular node host.
The Actions drop-down menu is not affected.
It’s a hard one to replicate as it crops up quite intermittently.

Screenshot
nodel - bindings

Bracket in group name affects UI rendering

By example, using this definition will prevent actions and events from rendering.

{ "title": "Turns on",
  "desc": "Turns this node on.",
  "group": "Power (Main)",
  "caution": "Ensure hardware is in a state to be turned on." }

DST timechange

Hi Guys.

Nodel gets its time from the machine its running on, in this case windows. windows will perform its daylight savings time change this weekend.

Will the nodel server sense the local time has changed and recalculate all the countdown timers to next event, in this case a startup event?

I know that the schedulers use a delta from the last event to the next event and decrements the countdown once per second, and there doesnt seem to be any apparent recalculation of that delta until the next event is triggered so i'm worried that a time change will go unnoticed until the next event.

Please advise.

'#' in Node names affects UI rendering

To demonstrate the problem I created two nodes with the following folder names:

  • #My special node#
  • ♯My musical node♯

The first one, "#My special node#" does not render properly in the browser whereas the last one "♯My musical node♯", works fine.

`/diagnostics` to gracefully handle offline mode

Some parts of /diagnostics cannot be shown when not offline e.g. Google Charting API. This causes other parts of the Javascript to fail.

The condition needs to be handled gracefully and include some messaging e.g. "Instrumentation charts are not shown. The charting tools require your browser have Internet access (error was 'ERROR_MSG')"

Cannot get nodel to see local nodes on osx

I just got nodel running on osx. I can view the webpage and see other nodes, however any node i create on the osx client i cannot see from either its web interface, or any other nodes web interface. I am attaching a log file which shows that it is finding the node "macminiCOMPUTER" however when i go to search it on the webpage it does not appear. It is not there. Any steps from here? I am using latest jar file 2.1.1
general_2016-02-19_10h00.log.txt

I also made another node using the web interface called test, it is created, the folder is created under nodes however i cannot find it using the web interface.
cannot find node

let me know what other steps i can take to diagnose.

Computer Nodes not responding to turnoff

I have had 2 computer nodes stop responding to TurnOff when requested from their exhibit node.
both were running nodel 2.04.

I tested the exhibit node and changed the computer off to turn off another node which worked. I could see in the computer node a received TurnOff command. I deleted and reinstalled nodel and put a fresh computer recipe on the machine. same effect.

Computer 1, renamed to a different node name other than its original and then responded to off commands. renamed back to original and did not respond.

Computer 2. upgraded to nodel 2.05, renamed node. no affect. The computer node does not receive the off command even though the exhibit node is correctly associated and is sending other commands.

image

image

I enabled logging and no logs were generated when the exhibit node was sending of off command.

the Nodel Server is running nodel 2.05.

Node remove in UI

'new' and 'rename' already present. Needs 'remove' when empty string is used with a warning indicating node will be remove. Use nodes' API /remove?confirm=true.

Date picker does not appear on Scheduler node in Safari or Firefox browsers

The date picker only appears in the Scheduler node only appears on the Chrome browser and not in Safari or Firefox in OS X.
The date picker does appear in the Safari browser in iOS.
This means users cannot select a date to filer schedules.

The date format in Safari and Firefox is different to Chrome.

Chrome
scheduler - chrome

Firefox
scheduler - firefox

Safari
scheduler - safari

Nodel FQDN

We are using a VPN which only tunnels fully qualified domain names, and not just simple ipv4 dotted quad addresses.

Is there a way to make nodel use hostnames instead of ip addresses when linking to nodes?

eg when I go to our nodel server I go to http://nodel.xxxxxx.xxx Nodel lists all the nodes and each node is hyperlinked. when I click on a node my host url changes from the fqdn above, to the ip address of the nodel machine and the path to the node such as http://10.0.3.5/sometingnode.

I have other ways to get to the host, but would be nice if the links used the hostname we came to the nodel site on, instead of changing it to the dotted quad address of the machine.

Thanks

Nodel 2.1.1 non functioning node issues

tried the new release of nodel 2.1.1 today on our main nodel server.

  1. gallery nodes no longer had actions
  2. schedule nodes only displayed the nodel logo and no node information.
  3. the nodel diagnostic console complained verbosely about deadlocks

16-02-04 08:18:27 [nodeloneoff_31] [org.nodel.jyhost.PyNode_30_MinidomePower] The interlocked initialisation sequence of the scripting engines is slow or dead-locked. A new lock has been created to hopefully release any potential dead-lock. 16-02-04 08:18:38 [nodeloneoff_48] [org.nodel.jyhost.PyNode_47_HaloPower] The interlocked initialisation sequence of the scripting engines is slow or dead-locked. A new lock has been created to hopefully release any potential dead-lock. 16-02-04 08:18:48 [nodeloneoff_69] [org.nodel.jyhost.PyNode_66_2ndCirculationGallery] The interlocked initialisation sequence of the scripting engines is slow or dead-locked. A new lock has been created to hopefully release any potential dead-lock. 16-02-04 08:19:25 [nodeloneoff_156] [org.nodel.jyhost.PyNode_155_AlpineRacerWOL] The interlocked initialisation sequence of the scripting engines is slow or dead-locked. A new lock has been created to hopefully release any potential dead-lock. 16-02-04 08:19:36 [nodeloneoff_160] [org.nodel.jyhost.PyNode_159_OurWorldConveyorBeltExhibit] The interlocked initialisation sequence of the scripting engines is slow or dead-locked. A new lock has been created to hopefully release any potential dead-lock

I have rolled back my nodel build.

Creation of bindings via REST API

Currently, a binding can only be declared by the node script. We need to add the ability to add an on-demand node binding using the REST API (for use by the UI).

Discovery information sharing via hard links

Sometimes Nodel hosts find themselves in multi-subnet environments that restrict multicast traffic between them. This is often due to incomplete network configuration but it's a common reality. This can make it difficult for Nodel hosts to discover each other. The new hard-links feature (see #37) assists with that however, it could go even further.

Right now a "hard link" from one host to an other would only reveal nodes hosted specifically on the other host. It would be handy if the rest of its discovery information (all the other hosts' information) could be passed on too meaning there's effectively a bridge between the networks the two "hard linked" nodes reside on i.e. they share their discovery information.

Originally and for good reason, this feature was left out of the discovery design to keep things simple, reliable and accurate on a given network (zero config; no second hand information to be relied upon, etc.). Because of that, it should remain an opt-in feature through the use of "hard links".

Latest version of Nodel not showing

Even though I have updated to the latest version of Nodel v2.0.5-rc1, when I browse to a node and mouseover the Nodel logo, it still appears as v.2.0.3.

gallery v2 0 3

Opt-out multihomed operation

The current network discovery system binds only to a single IP interface. If multiple interfaces are detected Nodel will insist one is explicitly chosen so as to keep multicasting simple and reliable. In those environments, ideally it should run regardless and function on all interfaces but with the option to opt-out, but still functioning in a safe, reliable and efficient manner.

The ADAM node is stuck and does not respond to inputs or relays

Console
10-10 08:59:31 - These functions are stuck - local_action_Relay3On_4 (23h 1m ago)
The Console reported this error multiple times, with a gap of around 30s between errors.
I was somewhat confused as it reported the error just for Relay 3; however none of the inputs or relays of the ADAM was responding.

Screenshots
Node error
smio01 node error

Node log
smio01 node log

Actions taken
Power-cycled the ADAM – did not fix

Resolution
Disable (rename with _ prefix), then re-enable the node

Scheduler sometimes misses events

Error that appears on console -
WARNING:apscheduler.scheduler:Run time of job "callevent (trigger: cron[month='', day='', day_of_week='*', hour='9', minute='0'], next run at: 2014-10-23 09:00:00)" was missed by 0:00:11.240000

If you manually trigger the event via Signals, it works.

This issue is quite rare in occurrence; however, it has affected all the Scheduler nodes hosted on the same machine, but running different Node hosts.

The fix is to disable then enable the Scheduler node.

Distribute Javascript charting load in /diagnostics

The /diagnostics page graphs everything on one Javascript event cycle. Depending on the browser client speed and large node counts, browsing may not be perfectly smooth. Graphing on separate clock bases might result in a smoother experience.

Schedules Broadcasting

Seems like we have a weird case where schedules seem to be affecting Exhibit nodes that are not associated to a gallery or a schedule or associated to a different schedule.

Issue 1. We had some galleries scheduled with exceptions to not turn off at 6pm and to turn off at 11pm. The gallery turned off at 6pm.

I can see the weekend scheduled for AllOff had an exception for the day in question and then a corresponding new schedule to turn it off at 11.

Issue 2. I added a new exhibit and didnt associate it to a gallery or schedule for its enable and disable events. The exhibit powered up this morning at 9 and turned off at 5 which is the normal gallery on/off time for the rest of the building.

image

Its almost like all exhibit nodes are listening to the schedule even if the exhibit isnt associated to it.

Exhbit Recipe on/off actions

The on/off actions in the default exhibit recipe had duplicated ON actions and no OFF actions

this is what it should be

Remote actions this Node requires

remote_action_PowerOnComputer = RemoteAction()
remote_action_PowerOnProjector = RemoteAction()

remote_action_PowerOffComputer = RemoteAction()
remote_action_PowerOffProjector = RemoteAction()

OS X Install process fail or unclear

I'm following this guide

https://github.com/museumvictoria/nodel/wiki/Install-Nodel-as-an-OS-X-process

I'm up to "Run on the console(for testing):"

When I run sudo /Library/Nodel/jsvc -server -cwd /Library/Nodel -home /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home -pidfile /var/run/jsvc.pid -cp /Library/Nodel/nodel.jar org.nodel.nodelhost.Service

It returns without any output to the terminal so it's hard to tell if it succeeded or failed and as far as I can tell nothing is running the the background.

Also you mention

"After running this test, you should be able to view Nodel in a browser."

But don't say on what port to expect the interface.

Schedule exception throws exception

There seems to be no input time validation on the exception date field. The user has no way of knowing if there is a text syntax issue until the schedule fires and then throws an exception causing a miss of the schedule completely.

Scheduled Exception:
image

Error:
12-11 17:00:00 - ERROR:apscheduler.scheduler:Job "callevent (trigger: cron[month='', day='', day_of_week='1-4', hour='17', minute='0'], next run at: 2014-12-12 17:00:00)" raised an exception
12-11 17:00:00 - Traceback (most recent call last):
12-11 17:00:00 - File "C:\Nodel.\nodes\OurWorldSchedule\apscheduler\scheduler.py", line 510, in _run_job
12-11 17:00:00 - retval = job.func(_job.args, _job.kwargs)
12-11 17:00:00 - File "C:\Nodel.\nodes\OurWorldSchedule\script.py", line 41, in callevent
12-11 17:00:00 - dates = [date(
[int(y) for y in x.split('-')]) for x in dateexcept if x]
12-11 17:00:00 - ValueError: invalid literal for int() with base 10: 12/16/2014

As an aside, there used to be a date picker and mm/dd/yyyy prompt so these values were ok at input time.

we should have syntax valudation so as to not have to wait until it fails to know something didn't work.

Issues with cron syntax in scheduler

Cron supports days of the week in the form of 1-7, 1 representing Monday. The implementation of the days of the week in Nodel is 0-6 which differs from wikipedia documentation

Additionally, the verbose readout of the cron supports more cron syntax then nodel is happy with. if I want a schedule to apply on tuesday - friday I'd use a day of the week range such as 1-4 or if I wanted saturday sunday monday I might use 0,5-6.

When I hit save with these comma or dash seperated values the console reports a syntax error in the cron. The only work around that I know of right now is to make one cron entry per day of the week.

image

More feedback when multihoming detected

Nodel already displays some feedback when multihoming is detected, however with 'hard links' now an additional option, feedback could be expanded and made very user friendly.

Runnable JAR release missing entry-point declaration for console use

If using the "java -jar" method to start Nodel, the current release will report:

> java -jar nodelhost-2.0.4-rc.jar
no main manifest attribute, in nodelhost-2.0.4-rc3.jar

In the mean time the entry-point can be explicitly specified like this:

> java -cp nodelhost-2.0.4-rc3.jar org.nodel.jyhost.Launch
Nodel started, etc...

For some reason Eclipse is not performing the "Export runnable JAR" task correctly.

Note: service entry-points (for Windows and OSX) are specified outside the .JAR itself so are unaffected by this issue,

Multiple actions and events triggered

Node seems to be triggering multiple instances of actions or signals on some nodes, even though they are scripted to only send an action or signal just once.
I have noticed this on multiple node hosts, running on different computers and attached some example screenshots from some tests I conducted on a couple of galleries.
All the recipes are the same, and the latest version of Nodel 2.04 is running on the node hosts.

Gallery 1 - sent the signal via the Scheduler node
Scheduler - triggered AllOn signal at 1.20pm
bt scheduler

Gallery - received two AllOn signals at 1.20pm
bt gallery

Exhibit - received four Enable signals and sent four Enable actions at 1.20pm
bt exhibit

Device - sent four PowerOn actions at 1.20pm, with two successes
bt device

Gallery 2 - sent the action via the Gallery node
Gallery - triggered AllOn signal at 1.49pm
mb gallery

Exhibit - received two AllOn signals and sent two Enable actions at 1.49pm
mb exhibit

Device 1 - sent one PowerOn action at 1.49pm
mb device 1

Device 2 - sent four PowerOn actions at 1.49pm
mb device 2

Streamline OS X service installation

Currently, it takes an involved and likely error-prone procedure to install Nodel hosts as background processes on OS X (see guide).

Is it possible to cut down the number of steps involved, say by precompiling, etc.?

ADAM IO Input6 does not respond

Input6 (DI 5) on the ADAM-6060 unit does not respond when triggered. The rest of the inputs are OK.
The ADAM firmware is v4.20 B00.

"title" schema attribute ignored for actions and events

By example, these action and event definitions don't display as expected:

def local_action_PowerOn(arg = None):
  """{"title":"On","desc":"Turns this node on.","group":"Power","caution":"Ensure hardware is in a state to be turned on."}"""
local_event_Triggered = \
    LocalEvent('{"title":"Sensor is triggered","desc":"When this sensor is triggered.","group":"General"}')

The UI currently shows PowerOn and Triggered for the action and event buttons respectively, when they should be On and Sensor is triggered.

It would be nice to be able to use more decorative text (spaces, punctuation, etc.), but more importantly, where large numbers of buttons are visible, being able to manage the titles could mean much cleaner interfaces.

For example, "group":"Input" already provides context, this list could be cleaned up from:

  • InputVideo1
  • InputVideo2
  • InputVideo3
  • InputVideo4
  • InputDVD
  • InputTape
  • InputCD
  • InputFM
  • InputAM
  • InputTuner
  • InputMultiCh
  • InputXM
  • InputSirius

To:

  • Video 1
  • Video 2
  • Video 3
  • Video 4
  • DVD
  • Tape
  • CD
  • FM
  • AM
  • Tuner
  • MultiCh
  • XM
  • Sirius

Recipe encoding errors - "SyntaxError: Non-ASCII character in file"

Recipes straight from GIT seems to upset Python because of misinterpreted byte-encoding.

For example:

SyntaxError: Non-ASCII character in file 'C:\____\.\nodes\pjlink\script.py', but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

Workaround

Add the following to the affected .py file:

# -*- coding: iso-8859-15 -*-

schedule effective date and expiry date

When scheduling into the future there are times when you might change seasonality and need to expire a schedule, and then set up a new schedule with a new effective date.

Specifically...

tuesday to friday we close at 5pm. During Christmas and the Summer we close at 6pm. We'd like to be able to schedule the normal 5pm closing of tuesday to friday closing at 5pm and then expire it on december 22nd. On december 23rd onwards we'd like to be able to have a new schedule for tuesday to friday that closes at 6pm.

We understand that there are exceptions, but if your exception is the norm not an exception we'd like to be able to shift from one schedule to another. The only apparent method right now is to intervene on the morning of the 23rd and modify the schedule that's existing. this opens up opportunities for human error or forgetting to change the schedule the day of.

Thanks

J

"Description" schema attribute is inconsistent or not always reflected in UI

(Based on the auto-generated script)

Both "desc" and "description" are ineffective here (never shown in the UI):

param_ipAddress = Parameter('{"desc":"The IP address to connect to.","schema":{"type":"string"},"value":"192.168.100.1"}')

For argument schema, "desc" is ineffective here i.e. "A cool description" float-over does not show in UI:

def local_action_AdjustLevel(arg = None):
  """{"title":"Adjust level","desc":"Adjusts a level.","schema":{"desc":"A cool description", "title":"Level","type":"integer"},"group":"General"}"""
  print 'Action AdjustLevel requested'

... but as "description" it is effective here:

def local_action_AdjustLevel(arg = None):
  """{"title":"Adjust level","desc":"Adjusts a level.","schema":{"description":"A cool description", "title":"Level","type":"integer"},"group":"General"}"""
  print 'Action AdjustLevel requested'

Consistency-wise, they should all be "desc".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.