~jojo/jojos-hue

6956c9a7579a3192480d5a0500c4ed86309e110d — JoJo 2 years ago b241cb5 master
Clients connect to LAN domain hue.home.arpa instead of hardcoded IP

This way, I can change which server or VM hosts the application, or
which network address range I use, without having to re-flash the
clients.

Only dependency is a local DNS server where the hue.home.arpa target
IP can be published. Right now I've got that set up no problem, but
it's something to keep in mind.
2 files changed, 3 insertions(+), 3 deletions(-)

M client/client.ino
M server/deploy.sh
M client/client.ino => client/client.ino +2 -2
@@ 4,7 4,7 @@
// #define ESP32_WS2801 // Around bookcase
// #define ESP32_WS2813 // Below bedside window
// #define ESP32_WS2812B // Behind secondary desk
#define ESP32_WS2812B_2 // Bed - painting - doorway corner
// #define ESP32_WS2812B_2 // Bed - painting - doorway corner

#define BRIGHTNESS 255



@@ 78,7 78,7 @@ WiFiUDP udp;
#endif

#ifdef NET
#define SERVER_IP "10.30.0.11"
#define SERVER_IP "hue.home.arpa"
#define SERVER_PORT 7017
#define LOCAL_PORT 7711
#endif

M server/deploy.sh => server/deploy.sh +1 -1
@@ 1,1 1,1 @@
rsync -r target/release/jojos-hue-server static arangar:hue/
rsync -r target/release/jojos-hue-server static hue.home.arpa:hue/