Filipowicz251 / mijia-1080P-hacks

436 stars 66 forks source link

Feature - Disable LED #35

Open lenisko opened 6 years ago

lenisko commented 6 years ago

This can be done by running two commands on ledctl tool (which is used by hack-script already), I think I would add it as an simple switch on PHP, it's here anyway so worth using.

As before, if no-one will take care of it I'll add it myself soon.

willthrom commented 6 years ago

Normally you can disable it using the Xiaomi App. Or just disable in the script.

I cannot remember who did it, but in the latest release I included the light web server (I think). If not, it should be in someone's fork on this project

lenisko commented 6 years ago

@willthrom normally ;-) I wish to disable cloud and app though so... https://github.com/Filipowicz251/mijia-1080P-hacks/blob/master/sdcard/tools/www/index.php there's PHP index file in this repo, I was thinking about adding api.php endpoint with this things like that.

willthrom commented 6 years ago

Sure. Add it, I am sure it will be found useful

GreyEarl commented 6 years ago

Is this the correct way to disable the blue led? /mnt/data/miot/ledctl 0 0 0 0 0 2 It does turn off, but wanted to check if this is the proper manner. Thanks!

Edit: after a short while it turns back on again.

lenisko commented 6 years ago

@GreyEarl

# /mnt/data/miot/ledctl
./ledctl reset
        reset priority
or
./ledctl led brightness cmd onms offms priority
        led: 0 or 1
        brightness: between 0 and 100
        cmd: 0, 1 or 2
        onms: on time (ms), only meaningful when BLINK
        offms: off time (ms), only meaningful when BLINK
        priority: can be 1, 2; higher with more privilege
#

and experiment with that ;-)

willthrom commented 6 years ago

cmd: 0, 1 or 2 is the important.

Off, ON, BLINK

GreyEarl commented 6 years ago

Thanks! Now I know what cmd is for :)

GreyEarl commented 6 years ago

For some reason the led never stays off when I block internet access. Also when using the app to disable the led.