Open user216 opened 2 years ago
running go run cmd/yeelight/yeelight.go ls
shoyuld just print a list of connected bulbs and their associated connect addresses:
$ go run . ls
E1211 15:59:50.472556 14253 discover.go:46] read udp 0.0.0.0:1982: raw-read udp4 0.0.0.0:1982: use of closed network connection
0x0000000002dfe94b [tv-ceil] 192.168.4.12:55443
...
I don't remember the exact details but you might try running with sudo because broadcast networking requires elevated privileges to work, it is probably not the case for this program but it wont hurt to try.
You need to have the hub and/or bulbs (don't remember) set into a specific mode to allow them to be controlled locally, by default they will only allow being controlled by the cloud services. The setting is somewhere in the phone app under a bunch of menus, I just set this up many years ago and I don't have the app anymore or remember how to do it.
Oh the cmd/yeelight/yeelight.go
seems to have the interface name hard coded and it's only a draft.
the yeelight-mqtt
's -if
flag should work though.
I run MQTT via :
but it allocate port that
yeelight.go
want to useAlso, I try to run:
but get this output only:
So how I can use this two components in proper way ?