Name: alfred-coworker
Owner: Le Wagon
Description: Automatically check-in people on Cobot as they connect to the Unifi Wifi
Created: 2016-04-20 17:46:11.0
Updated: 2017-03-21 11:59:57.0
Pushed: 2018-02-26 13:25:49.0
Homepage: http://lewagon.cobot.me/
Size: 43
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Some code put together to automatically check-in people on Cobot when connecting to the Unifi network.
Still a lot to refactor and extract from Rakefile
… Sorry for that!
ke -T
cobot:check_in:create[membership_id] # Check-in a member
cobot:check_in:create_for_connected_clients # 'main' rake task to check-in all connected users
cobot:check_in:list # List all today's check-ins
cobot:invoice:list[membership_id] # List invoices for a member
cobot:members # Print a list of all active Cobot members
cobot:plan:list # List plans for space
cobot:time_pass:create[membership_id] # Create a dont_charge time pass for a member
cobot:time_pass:unused[membership_id] # List unused time passes for a member
cobot:token # Generate a new Cobot access token
dotenv # Load environment settings from .env
redis:ping # PING Redis
unifi:clients # Print a list of all clients currently connected
unifi:devices # Print a list of all devices (APs) currently connected
unifi:squatters # Detect squatters
,20,30,40,50 9-11,14-16 * * * cd /home/seb/deployment/current && /usr/local/opt/rbenv/shims/bundle exec rake cobot:check_in:create_for_connected_clients unifi:squatters >> /var/log/cron.log 2>&1
You need the following environment variables (in a .env
file or directly in the environment):
I_USER
I_PASSWORD
I_CONTROLLER_ADDRESS
T_ACCESS_TOKEN
K_INCOMING_WEBHOOK_URL