Node-RED’s cool GUI for the Internet of Things

Node-RED and a quick IRC bot flow
Node-RED and a quick IRC bot flow
The latest version, 0.5.0 of IBM’s Apache licensed, incredibly useful and very cool Node-RED has landed but before going further, I suspect a lot of readers will want to know what Node-RED is.

There’s usually a lot of connecting of things involved with making the Internet of Things do something useful. Whether it be detecting messages on Twitter, listening to IRC, watching a Websocket or grabbing a web page, each source then needs to be processed and if required make something happen. Now, you can write a lot of code to do that or you can check out Node-RED. Billing itself as a “Visual tool for connecting the Internet of Things”, Node-RED is built atop of Node.js and offers a graphical world of IoT building blocks in the browser for you to wire up as needed and test.

Those building blocks, nodes in Node-RED, start with the simple, inject to send something, function to process it using JavaScript and debug to see what is being sent. They then build up to more powerful capabilities such as Http requests, MQTT subscription and publication, WebSocket listening and writing, tcp and udp comms and sentiment analysis. To connect up to social networks, nodes for Twitter and IRC listening and publishing are included. There’s also file storage, logical switches, data manipulation and delay nodes and, for the brave, even a node which will exec a process on the system.

Each node can be placed, configured and its outputs connected to other nodes inputs in the Node-RED GUI, and with the click of the Deploy button, put into action. New nodes can be created and plugged into the system too and there’s a repository of user created extra nodes available.

But, you say, where’s the Internet of Things in this? Well, Node-RED is able to work with Arduinos (connected via USB to host computers over serial or Firmata protocols) or run directly on Raspberry Pi (with GPIO and wiring-Pi modules) and the BeagleBone Black (with BoneScript access). And, obviously, you can write your own plugin nodes to connect up whatever hardware or devices you need to access.

Node-RED is a very capable tool and worth adding to your toolkit. For example, while writing this I was also prototyping an IRC bot which did basic sentiment analysis and commented in the channel. Why not give it a go over the coming holidays? You can download Node-RED from the website or you can find it on GitHub. Documentation including a quick tutorial on creating flows, along with instructions on writing function nodes, creating new nodes, embedding Node-RED into existing applications and running it with Arduino, Raspberry Pi and BeagleBone Black.

The latest version, which we mentioned at the start, has new visuals for showing the deployment state of nodes and handles the idea of “unknown nodes” visually when importing a flow from someone who’s used nodes you haven’t got yet. There’s also new user and direct message tracking in the Twitter node, session aware TCP and WebSocket nodes, enhancements to the MQTT node for authentication and client ID, an “otherwise” option in the Switch node, selectable data delimiters for the serial node and a HTTP Request node that follows 301s. The contributed nodes now include a Snapchat node and a Phillips Hue mode.

The Node-RED developers are now looking at making new nodes installable with npm, Node.js’s package manager, and tackling the separation of the administration UI from the runtime so it’s more easily deployed into future production scenarios.

Fedora 20, Meteor 0.7.0 and hacked Linux servers examined – Snippets

snippets03

  • Fedora 20 arrives: The latest Fedora has arrived, making it into 2013 and looking pretty good. There’s oodles of changes too. Desktop users will find GNOME 3.10 is the default desktop but there’s also Cinnamon 2.0 and Enlightment available, along with the latest KDE 4.11, MATE and others. Under the hood, system administrators will find syslog gone, replaced by journald, and experimental SSD caches, while developers are getting a GUI on Fedora’s DevAssistant, updated Perl, boost, glibc and Ruby 2 with Rails 4. The full release notes will guide you around. We’ve been tracking 20 since alpha, running it on machines here and its been working well – the one thing we haven’t checked out is Fedora 20 on ARM given ARM is now a primary architecture for the distribution. Download Fedora 20 in all its forms from the project’s download page.

  • Meteor gets update smarts: The latest release of the https://www.meteor.com/ platform for web applications has moved to a smarter way of working out database changes. Meteor 0.7 changes how changes in the database are discovered, away from polling the db and creating a diff and to a technique called oplog tailing – consuming the underlying MongoDB operations log and using it to reduce the queries that have to go to the database. There are caveats, most notably, in production you’ll need a MongoDB server configured as a replica. More details on this and other changes in 0.7.0 are in the release notes.

  • Hacking Linux Servers: Ars Technica has an article on how a security researcher documented the exploitation of a Linux server with PHP holes and a perlbot. It’s a reminder that attack tools for taking on Linux servers are no longer obscure or complex things and even a script kiddie can do real damage. Old holes do persist in the wild and every old, fixed hole is ready for exploiting. Now, more than ever, keeping your servers up to date with security fixes is essential.

Firefox 26, Netflix’s Suro, Vagrants and Dockers and Websockets for all – Snippets

snippets03

  • Firefox 26 digs in: Today we’ll see the release of Firefox 26, latest in the overly regular Firefox release cycle. From the (currently beta) release notes, we can see the big changes. All but the Flash plug-in are now click-to-play by default, Windows users can update their Firefox without having to write into the Firefox folders, the password manager can handle password fields generated by scripts and on Linux, if the installed gstreamer can handle h264, so can Firefox. A couple of fixes, some developer enhancements and thats about it. There’s also a Firefox for Android update due today. The release notes note some performance improvements, the same password manager enhancement and some fixes. The developer page for Firefox 26 covers changes of interest to developers in more detail. Firefox 26 will be turning up in updates and for download later today.

  • Netfix’s Suro goes open: From the people who brought you a cloud full of monkeys… Netflix’s latest open source release is Suro, an application monitoring system used by the video stream vendor to track the behaviour of their Amazon AWS deployed applications. Originally based on Apache Chukwa and adapted to fit Netflix’s demands, Suro pulls the company’s monitoring data from the various app clusters and pushes it to S3 (for Hadoop based analytics), to Apache Kafka (and on to Storm, Amazon ElasticSearch and Druid and to other event processors. There’s a lot more detail in the announcement including in production stats and how the pipeline is used to analyse errors.

  • Vagrant meets Docker: The latest update to Vagrant, version 1.4 has been announced and the big improvement in system that has traditionally been used to create automatically reproducible development environment is the addition of Docker support. The Docker provisioner can install Docker and then lets Vagrant cirtual machine pull and configure Docker containers within it. There’s also some enhancements to the scriptability of Vagrant itself, the ability to require a particular version of Vagrant and support for standalone file sync plugins.

  • websocketd: And finally, have you wanted to make a shell script or other app into a WebSocket server but lacked a library or access to the code to do it? Websocketd might be the answer as it turns anything with console I/O into a WebSocket server in a style rather reminiscent of CGI. Remember, most command line applications are not suitable for being exposed to the raw web, but the app could get you out of a hole when prototyping.

And, for reference, everything mentioned today is open source software.

IDEA 13, Java crypto, FreeBSD 10 beta 4, Rails update, Go 1.2 – Snippets

snippets03

  • IntelliJ IDEA 13: Jetbrains has rolled out the latest version of its IntelliJ IDEA Java IDE. Version 13 gets a big refresh on the user interface with new light look and feel on Windows and Linux and toolbars hidden by default, better visualisation of errors and warnings with “lens mode”, comment/string only searching, built in SSH terminal, Java 8 support and a presentation mode for talking about coding. All those features, along with enhancements to Android, Gradle, Groovy, Scala and version control support are in the community version. The commercial Ultimate edition includes JSF 2.2 support, batch job code assistance, JAX-RS 2.0 annotation handling, more app server support, Spring context configuration and MVC view, improved JavaScript debugger, CSS extract refactorings, DART support and many enhancements to the database viewing and support. Full details are in the What’s New page for the new release. The open source Community version and a 30 day trial of the commercial version are both available to download.

  • Bouncy Castle Crypto update: Adding support for client side TLS 1.2 and DTLS 1.2, along with ECDH and ECDSA for the OpenPGP library and many other cryptography options, the splendidly named Legion of the Bouncy Castle have updated their Java Crypto libraries to version 1.5.0 – further details in the release notes.

  • FreeBSD 10 beta 4: The announcement of FreeBSD 10 Beta 4 has also seen the gentle push of the scheduled release date to 2 January 2014 with a December full of release candidates. The in-development release notes give an idea of what to expect as will this article from September.

  • Rails updates for security: There’s updated Rails with the release of 3.2.16 and 4.0.2 which address four or five CVE-numbered vulnerabilities. The problems fixed include various XSS vulnerabilities, a denial of service hole and fixes for a previous incomplete security fix.

  • Go 1.2 is go: Go 1.2 is now official with the announcement that, after 7 months, the latest modifications to the language, library and toolchain are now available. Full details in the release notes. Updates are expected to come on something closer to the 7 month cycle in future.

Docker for all Linux distros, DPorts and more for DragonFlyBSD and advice for coders – Snippets

snippets03

  • Docker 0.7 unloading: With Docker 0.7, the Docker developers have made a big leap in Linux coverage. (If you are new to Docker, read the introduction to it I did for the Linux Foundation). Under the covers, Docker has used storage drivers to maintain images on disk, but up till now they’d needed a patched Linux kernel for that to work. A patch from Red Hat has changed that though and adds “DEVICEMAPPER”, a storage driver which used copy-on-write LVM snapshots and doesn’t need a patched kernel, to the list of storage drivers. The selection of the driver needed is done automagically and the resultant images are interchangable between different drivers so there’s no driver lock-in. That all means that Docker now runs on Fedora, RHEL, Ubuntu, Debian, SUSE, Arch, Gentoo and others. More drivers are coming too, for BtrFS, ZFS, Gluster and Ceph. Other additions, merged in the 0.6 cycle include offline image transfer, better port redirection, linkable containers and descriptive names for containers.

  • DragonFlyBSD updated: Version 3.6 of DragonFlyBSD – the now ten year old BSD project that sets out to give BSD native optimised clustering capabilities – has been released. The update standardises on Dports and pkg for installation tools, making around 20,000 packages available, and the process of building those 20,000 packages in parallel has allowed for the testing and near elimination of kernel contention with more cores scaling up the improvements made. There’s also i915 and KMS support, albeit experimental, and updated localisation. DragonFlyBSD is still using its HAMMER filesystem with work on HAMMER2 carrying on into DragonFlyBSD 3.7.

  • Coding Advice: Whether your learning or experienced, this article offers sage advice on how to approach coding. While we’re on the subject of advice, here’s some false things that programmers believe are true about geography, addresses, names and time.

Python 3.4 beta, Neo4J 2.0 RC1 and Redis 2.8.0 released – Snippets

Snippets

  • Python 3.4’s beta days: The first beta of Python 3.4 has arrived and it has got the good stuff. Pathlib lets coders work with pure paths or filesystem dependent paths with the selection of the latter taken care of for them. There’s a standardised enum module along with new statistics, asyncio and tracemalloc modules. Throw in a new pickling protocol, new string and binary hashing algorithms, a C API for custom memory allocators and standardise on pip as a packaging format and you are talking a tasty new Python due to land at the end of February 2014.

  • Neo4J 2.0 goes RC: The Neo4J graph database is heading into the home straight with a 2.0.0 release candidate and a warning that if you’ve been tracking their version 2.0 milestones you will need to perform a manual update on your database before using 2.0.0RC1. Now tagged as feature complete, the new RC will be bringing matching with properties, optional matches, relationship merges and more simplified syntax to Neo4J’s Cypher query language. That’s in addition to the Neo4J browser and other changes made over the five other milestones (5, 4,3, 2, 1).

  • Redis 2.8.0: Salvatore Sanfilippo has announced that, after almost a year of development, Redis 2.8.0 is done. If you don’t know it, Redis is a key/value store which can also handle hashes, lists and sets. The new version include a partial resync for slaves option, iterable collections, a rewritten config system, IPv6 suppport, pub/sub keyspace notifications and better consistency support and key expiration. Actually 2.8.1 is out for download too – see the release notes for more on the BSD licensed key/value store.

RHEL 6.5 and Docker, Ruby Fixes and Epic Node.js Bugfixing – Snippets

Snippets.png

  • RHEL 6.5 docks?: Red Hat Enterprise Linux 6.5 has been released and as is usual for the point releases of RHEL, has a number of enhancements like Precision Time Protocol support (for microsecond synchronisation accuracy), better network data for admins, GlusterFS integration for KVM and NVMe (PCI SSD) support. Mentioned in the announcement is Docker, the container deployment platform, but oddly there appears to be no mention of it in the technical notes or release notes. LXC (Linux Containers) is also still on the Technology Preview list. Still, it’s a Red Hat update and the timer is now running for the equivalent CentOS, Scientific Linux and Oracle Linux updates to appear.

  • Ruby security update: There’s updates for Ruby 1.9.3 and Ruby 2.0.0 which both address a security problem, namely a heap overflow when parsing floating point numbers. The same issue is also fixed in the new preview2 of Ruby 2.1.0, just released.

  • Epic Node.js Bugfixing: There’s nothing like a good detailed walkthrough of the debugging hell someone’s been through to offer a chance to say (a) good work, (b) glad I didn’t have to do that and (c) you found what where? In the spirit of this, Joyent have documented the Walmart Node.js Memory Leak from identification to final elimination, in text and three video talks. The leak itself (in file closing) was subtle and the hunt hard – The fix is in the latest Node.js releases.