Comments (3)
I haven't used iOS shortcuts, so my guess is the following:
- the command ends in an amperand & which directs the shell to run a process in the background
- the iOS "Run script over SSH" probably strips the ampersand from the command (I would)
- The command will run for 3600 seconds and then return, at which point the iOS action will terminate as you might expect.
When the blynclight package finishes a "session" using the light, by default it turns the light off and zeros all the various color values and feature switches. This is to avoid weird behavior when the light is activated again (flashing, bleeps and bloops that the user didn't initiate).
One way to fix the iOS problem is to allow blync
to return and leave the light in it's currently configured state (on, shining red). This will lose the ability to run for an interval and then turn off. I guess you could have another action that turns the light off explicitly? Not sure.
Another way to get the desired behavior (iOS action terminates normally, light stays lit red for 1 hour and then turns off) would be to add a 'daemon' switch that would run the command in the background (without requiring the ampersand). The command would run in the background and turn off after an hour while allow the iOS action complete as expected.
from blynclight.
I tired a lot of options, including a simple "/home/pi/.local/bin/blync -r 255" or even "/home/pi/.local/bin/rainbow" and it's the same... really strange ... I also tried to embed the command in a shell script but it's the same...
"/home/pi/.local/bin/blync -a" is working correctly and give the proper output
So yes a daemon could be a solution, it start and run for 1 hour ( or the parameter I could pass) ... I will have to look this week-end how I can do
from blynclight.
The latest version (0.7.1) has an updated driver script that may do some of what you are looking for; now when the blync
tool exits, it DOES NOT clear the state of the light (turning it off and zeroing all the commands issued while the script was running). So maybe now you can get some of the features to work via the iOS Shortcut application:
$ ssh <yourhost> blync # will turn the light on with a green color and the light stays on.
$ ssh <yourhost> blync --off. # turns the light off
Effects that constantly update the state of the light will continue to disappoint I think; e.g. fli
, throbber
and rainbow
.
Having those sorts of effects persist after a script runs will probably need a client/server architecture that sounds like fun to write, but I don't have plans to do it soon. I hope some of this helps.
Edit:
Created an iOS ssh shortcut that worked. After installing blynclight, had to use the full path to blync
in order for it to work: /usr/local/bin/blync
in my case.
from blynclight.
Related Issues (20)
- Commands to Light Not Processing HOT 17
- Support PyUSB & HIDAPI
- ear HOT 1
- pip3 install in editable mode doesn't work HOT 1
- Flash not working HOT 3
- Installing on a Raspberry Pi HOT 20
- ImportError: failed to locate hidapi shared object on macOS Catalina HOT 4
- "No such device" error with blync CLI HOT 15
- ImportError after Pip update to v0.8.0 HOT 9
- ship a command line interface and driver script HOT 1
- [QUESTION] Source of COMMAND_LENGTH HOT 3
- RFE: add a udev rule to docs HOT 6
- Candle flicker effect command-line interface.
- Light not recognized. HOT 5
- MacOSX - usb.core.NoBackendError: No backend available when calling BlyncLight.available_lights() HOT 14
- Add an effects package. HOT 1
- Create a simple API server and ship in scripts directory.
- Python version testing with tox
- Relax version requirements for Python from only 3.7 to 3.5 or better HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blynclight.