Close

Building a better server

A project log for LUMOS

1m 12w RGB LED WiFi Artnet Controlled Cubes

charles-yarnoldCharles Yarnold 06/22/2016 at 14:540 Comments

I'm one of those people who doesn't seem to like the same programming languages as my mates, python frustrates me, C# has enough differences to confuse my C and C++ knowledge and I've only just managed to really feel at home with object orientated programming. (my first language other than html was PHP).

So what did I write my command an control server in? Node js of cause! I first played with node a year and half ago and quite liked it. I'm not really using it for managing lots of simultaneous connections in and out, I just found it really fun to program in and I wanted a webui for controlling the nodes to allow for cross platform support. (I know there are other options, but hey, this is a passion project, I need to enjoy making it)

The main things I wanted to hit with it were, see all nodes health at a glance, more detailed logging available, control of disabling nodes from outside control to allow for fault finding.

As its node js I can easily output json for control programs to see what nodes are available to them as well as accept json from colour control programs. You can also receive and craft network packets with node, allowing the server to send out the artnet packets itself to the lumos nodes and receive json in udp packet form as well.

Also, while it's likely only going to be me using the admin console at emf, I really enjoy socket.io, all calls with the admin interface use it so that all connected admin pages sync up when I take an action with no refreshes needed, it really helps with grabbing any device I have to hand to see what's up. (it's also fun to watch my ipad screen auto update while I'm changeing stuff with my laptop)

In that vein too I used bootstrap to design the ui to easily adapt to laptop, ipad and phone when I'm (literally) out in the field.

I'm still adding extra tools like setting all lumos nodes to enabled/disabled and I need to make the server settings tab to allow me to change settings without editing the servers files, but its main goals are done and tested, time to build the remaining 35 nodes electronics and build their housing too!

Discussions