I think a lot of this might be a combination of sluggish Rules and a limitation on the Hue bulbs/hub themselves. I’ve seen reported that Hue cannot handle sending commands at it at too fast of a rate. I wrote the Design Pattern: Gate Keeper to address this issue. Essentially the commands get put on a queue and worked off at the maximum safe rate.
On-the-other-hand, some users who have wanted to do complex stuff with lighting (e.g. rapid dimming for devices that don’t support it) find they get much better performance from JSR223 Rules over Rules DSL.
I’m not claiming these are panaceas, but they are approaches others have used to deal with the described problems.
There is a posting for people trying to get executecommandLine working at least once a month. Search and you will find lots of examples and trouble shooting examples. How to solve Exec binding problems should be useful as well.
However, I’d recommend, if you can, setting up a Python program that you can send commands to using MQTT or HTTP. This will be, in my experience, a cleaner way for OH to interact with the scripts. You don’t even need to write the program, you can use mine . This also works well for those running OH in a more constrained environment like Docker containers.
This is through sensorReporter (see link above) instead of executeCommandLine or Exec binding (I run in docker so don’t have access to the libraries or other stuff I’d need).
-
At 1 AM send the bedroom Roku to the home screen. The Roku binding is in limbo so I have a script that issues the command to the Roku. This used to be much more involved as I would use the Roku’s built in broadcast to discover the IP address of the Rokus and keep track of it which I couldn’t do from my OH in the container. But I’ve since started using statically assigned IP addresses I can move this to the HTTP binding. I’m just lazy.
-
Again, because of a limitation in the Docker container, namely the lack of ping and arp, I implemented iPhone Presence Detection with hping3 and ARP - #28 by rtvb in a script which, using sensorReporter, polls for the presence of our phones on my network even when they are asleep.
-
When I used Dash buttons, I implemented Dash button press detection in sensorReporter. This was before there was a Dash binding.
-
All of my GPIO stuff is done through either NodeMCUs running ESP Easy or on an RPi using sensorReporter. For the RPi stuff I have my garage doors controller and I’ve it wired to the sensors the previous owner’s security service left in place. The took everything else but the sensors were left.
Here is an example that will flash the lights in morse code.