After having some difficulty getting one of the hue lights from the ER, I decided it was probably better anyway to go with a more practical application of this week’s learning objective, since I don’t have the cash to blow on fancy consumer smart lights. What I do have are some shelves in my new apartment that have WS8211 LED strips connected to a fadecandy running off of a raspberry pi. Previously, I was controlling them with a very dodgy button interface that rarely worked and constantly required resetting, so I knew I wanted to redesign the interface to make it a little more hands-off, user-friendly (for guests), and accessible from anywhere in my house.
So for this project, I started with the following design plan:
I want to build a website/server that guests of my home can pull up when connected to my home WiFi that will allow them to change the colors and/or patterns of the shelf lights, perhaps even with a canvas so that they can draw directly onto the wall. The client-side interface would be based on p5.js sending requests to the node server running on the raspberry pi, with each request corresponding to a different light-controlling script directed via OPC at the fadecandy server. I’m going to see if this flow is the most effective, or if it would be better to simply build the client so that the buttons on the page send the request directly to the fadecandy server.
1) How do I know what the raspi’s IP is on the local network without having to reconnect it to a display to run ifconfig? I tried arp but I’m not sure that would even work. I thought it wouldn’t change since there are so few devices connected, but today it was different than yesterday. I suppose most of the time it will stay on, so it may only be an issue if I’m resetting it.
2) Sometimes when I try and ssh into the pi from my linux laptop, the terminal will freeze. This hasn’t happened before with any other ssh attempts to other devices, and I’m wondering if there’s something wrong with this pi?
3) What is it about p5 on mobile that registers every touch as double? I come across this issue every time I try and implement a sketch on mobile, and it’s always a hassle.
4) When two users connect at the same time, the lights flicker, which is what I imagined would happen. I wonder what it would have to be like in order for only one to be able to connect at a time (not an issue I think I’ll have often though).