What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Running a script on a guest network client

m83num

New Around Here
I've got a few of these smart led lightbulbs for the holidays and have them isolated onto a guest network without lan access or internet access... because security.

I'd like to run a script on my AC66 that changes the colors and turns it on and off automagically. How would I go about:
* Getting the IP address automatically
* Installing python and the appropriate library (guess this could be on a usb drive in a virtualenv?)
* Running the script

Alternatively, I can spin up a virtual host that can have the sole purpose of talking to the devices.
* How would I go about putting a vhost on the same network as my smart led bulbs?
 
1- Getting the IP address automatically

reserve the ip address on your dhcp server, so you dont have to check if it changed every time the script runs.

if you really want to have the trouble, get it with
Code:
 ip addr show
and
Code:
 grep
or
Code:
 awk

2- Installing python and the appropriate library (guess this could be on a usb drive in a virtualenv?)

Code:
 opkg install python

3- Running the script

manually?
Code:
 sh myscriptname.sh

scheduled?
Code:
 cru
 
Last edited:
Tremendous! Thank you. Any chance you could shed some light on:
* How would I go about putting a vhost on the same network?
 
One step further is once you've reserved the IP you can use the host name you assign, e.g.
kitchen.myrouter (where you assigned the bulb the host name kitchen and your router is called myrouter). I do this for my Sons CotCam so I can get to it via a browser without remembering the IP. Will make it easier to read the scripts and know which is which should you ever want to differentiate.


Sent from my iPhone using Tapatalk
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Members online

Back
Top