Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
== trigger_switch_d
== LICENSE
See link:LICENSE.txt
== REQUIREMENTS
Mac OSX
== DESCRIPTION
Scheduled (tsd) is run as a daemon without any need for user interaction. It sends commands to remote triggered devices such as lamps and switches, to activate/deactive them at scheduled times.
== INSTALLATION
Get source
git clone git://github.com/pfspontus/trigger_switch_d.git
install gem:
sudo gem install trigger_switch_d
== USAGE
Before running tsd you need to do a few things.
Setup required folders and files (home or system) by running
ts_setup (home|system)
make the necessary adjustments in environment.rb
--- - name: "yttertrapp" switches: - unit_code: "5" house_code: A model_name: plain_tex
Create a schedule in a file called scheduled_actions using the following format:
tänd yttertrapp klockan 08:15
where "tänd" is the action, yttertrapp is the device etc. Available actions are "tänd" and "släck". Device names are the ones from step 1.
Copy the files devices and scheduled_actions to the sub-directory db
run tsd
== COMMUNICATING WITH TSD WHEN IT IS RUNNING
Start IRB from a terminal and use UNIXSocket.open("/tmp/com.adhocskill.trigger_switch_d") to open a socket. Strings that tsd will respond to are:
The list of strings (commands) will get longer with time.
Here's an example session:
bq. >> sock = UNIXSocket.open("/tmp/com.adhocskill.trigger_switch_d")
=> #UNIXSocket:0x1017ede78
sock.send("list_schedule",0)
=> 13
puts sock.recvfrom(1000)[0]
---
sock.send("bye",0)
=> 3
puts sock.recvfrom(1000)[0]
bye
=> nil
== SUNRISE AND SUNSET
You can schedule an action to occur at sunrise or sunset by typing "vid soluppgång" or "vid solnedgång" instead of "klockan HH:MM" when you schedule your actions. As and example:
släck yttertrapp vid soluppgång
== LOCALE
The file lookup.dsl in the config folder, contains words associated with the actions. The file is pretty much self explanatory feel free to set the words to the language of your choice.
== FILE STRUCTURE
bin executable scripts config environment files db files used by tsd doc rdoc documentation of the whole project feature cucumber feature/step files lib project source log scheduled puts a running log here sample some sample files to put in db or config spec rspec bdd files
FAQs
Unknown package
We found that trigger_switch_d demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.