The release event is more likely intended to be used as a pair with the press event, allowing you to indicate a duration. My dimmable lightwave-rf lamp control overloads up/down buttons as both on/off, and increase/decrease brightness.
A short press is identified as a switch action, a long press starts a increment/decrement process which is ended by the ...
Per request I'll try to give an example on how I would tackle it (with bash shell jobs handling):
When turning on a lamp X for 30 seconds and lamp Y for 5 minutes:
echo "Switch on lamp_x" && sleep 30s && echo "Switch off lamp_x" &
echo "Switch on lamp_y" && sleep 5m && echo "Switch off lamp_y" &
Due to ...
The rated range of Z-Wave devices in general is designed for indoor "perfect conditions" so if the max range of a device is 100 ft. that assumes no noise and no interference. If you have any other devices on similar frequencies or objects that may attenuate the signal, it most likely will never achieve that range. In an environment with a lot of devices (not ...
Neither IRC nor HTTP are really optimised for usage as IoT protocols (though they could, in theory, be used).
What makes a protocol suitable for usage in the Internet of Things?
It's difficult to say something meaningful about a huge class of devices, but many IoT devices are small, power-constrained microcontrollers. In order to reduce resource usage (power,...
I've found another way quite expensive yet working with external processes such as PHP's system : screen
First, install it :
sudo apt-get install screen
Then call your function
screen -dm -S taskid bash -c 'sleep 20 && command'
-dm : detach process
-S : identify screen by name
To list your tasks
ls /var/run/screen/S-www-data (or S-...
If you want to use an online service for this, you should be able to use https://www.stringify.com They support sequences and variables (and timers). I've not used their service in anger, but it looks like you should be able to use a timer to decrement a variable (which determines the remaining on time), and the various trigger events can force the variable ...
Yes, it is possible. I have done it before, and there are a few (but not many) situations where using IRC is a good idea.
An example deployment I have done many years ago was a monitoring system for an old factory (nothing critical though). Around 30 sensors were installed and deployed across the buildings, and each sensor was simply dumping the data into a ...
You can send commands to a Google Home device on the same network to play a MP3 from a URL. With this you can have the Home Device play arbitrary messages.
There are libraries to do this e.g. for nodejs google-home-notify that takes a string, sends it to Google's Text to Speech API and then has the Google Home play the output.
The example code for this ...
To generalise a little more, IoT has a few general constraints/characteristics which will apply to many but not all use cases:
Potentially many endpoints
Communicate over an insecure or snoopable transport layer
Need to handle deployment and firmware upgrades
Often handling valuable/sensitive data
Automated messaging, frequently small and rapid payloads