
Or any router with a wrt-like build installed (and entware also installed).
Moderator: Martin
Wow, it seems I know nothing about the capabilities of AutomagicDesmanto wrote:"Poison" others to use Automagic too(read: encourage). That way, when more users are using Automagic, there will be more flow sharing for useful things. I tried to translate the tasker project from the yeelight forum. It was so difficult to read the project in tasker, too many if branching and parameter passing scattered in so many tasks, that I better recreate my own flow directly from the yeelight documentation. If more users are using Automagic, we might see more flow sharing for Automagic than current condition.
Fortunately, the yeelight dev is very perfectionist in documenting the protocol. I might purchase another bulbs for the Automation purpose only. I have stored all the function into a nested map/list (very tidy, compared to the tasker version), and will create the branching input dialog for it in the next few days.
BTW, I just tried the nc from busybox no root at my non rooted phone. The flow runs properly and can turn on/off the yeelight just like my primary rooted phone. I installed the binary using method 1 and use this script for the nc part.basically, I just add the busybox binary location path to the script and use Execute Command, instead of execute root command. So nc can be alternative solution until Automagic implement this action built-in.Code: Select all
( echo -ne '{toggle}'; sleep 0.5 ) | /data/data/exa.free.bbin/files/busybox nc -w1 192.168.1.100 55443
For two way communication from phone to PC and vice versa, just use Eventghost as the server. Automagic HTTP request trigger also very lightweight, that I can't find any battery drain issue even with the flow enabled. The general concept of the eventghost usage is here : viewtopic.php?f=3&t=7866#p23548 I wish I can explain it in simpler wording
I also can't imagine my life right now without Automagic. Today, 67 active flows from 209, keep growing.![]()
Code: Select all
{"id":1,"method":"get_prop","params":["power", "bright", "ct", "rgb", "hue", "sat", "color_mode", "flowing", "delayoff", "flow_params", "music_on", "name"]}\r\n
That makes quite a lot of sense. After some experimenting and reading through here and the documentation, I could get some things done that otherwise would need much more work. In my case, I used to run every 5s the Flash Notify scene with the plugin in an Automagic flow until something changed and turned the light back to white. But with the start_cf method I could replicate something similar and in an infinite loop, so now I don't have to send multiple commandsDesmanto wrote:@ariloc : When yeelight got killed because of android default battery optimization, I still can run the flow to control the bulb. I don't want to let the yeelight running background all the time just because I want to control it from automagic. Using LAN control also have much more variable you can tweak/adjust rather than the default built-in one. The most powerful function is the color flowing and this is the part which I am working on right now. I am trying to make the flow to be able to build a working color flowing pattern that I can copy-paste as preset (just like the preset in the app). I have tried to copy the pattern from the app (candle, party, sunrise), but still can't find where it stored it. Querying the pattern while it is running also doesn't give anything. So I have to try and see which pattern that I will use.
Code: Select all
{"id":1,"method":"start_cf","params":[ 0,1 ,"500,2,4000,100,500,2,4000,1"]}\r\n
That's useful information, I was actually using two http requests: one to turn on the light and then start color flow. I just didn't use set_scene by the fact I couldn't figure out how to use it, and noticed that start_cf was better described. Now I understand that it's almost the same, but it also turns on the light.elektroinside wrote:I used that command right after buying the lights, as a quick copy paste string in packet sender to get everything i needed for later, one by one for all the lights, and matching stuff with the documentation provided by Yeelight. Then i saved what i needed in variables which i use to command the lights from the lan. I'm using "set_scene" because it will turn on the lights if they are off, or change to whatever if they are already on. I'm using my lights for different alerts as well (important calls, sms, mails etc), so i need a speedy reaction/response. I'm not querying the lights, i just tell them what to do and when. I'm getting my "don't change the lights no matter what" info from elsewhere, like wifi states, connected clients, sms received from the alarm etc.
@ariloc: i'm not sure if i understood correctly, do you need help setting up/controlling the lights from the lan?