API Compatible with MIJIA smart LED desk lamp?

#1

Is the published API compatible with the MIJIA smart LED desk lamp? If so, are there new properties for the different modes of the desk lamp?

Thanks,
Sam

0 Likes

#2

Hi Sam,

MIJIA smart LED desk lamp doesn’t support the published API and we have no plan to support it in future due to some policy issue.

sorry for that.

-weiwei

0 Likes

#3

On the website is said clearly that it supports Open API?

0 Likes

#4

It’s an error, will remove this icon for Mijia desk lamp

0 Likes

#5

Okey. Is there anyway to talk to it other then the yeelight app?

0 Likes

#6

IFTTT or Echo in future.

0 Likes

#7

It seems that a new firmare allows now to control this lamp using the API.

0 Likes

#8

Yes, the latest firmware support open API.

0 Likes

#9

Hi,

can you please clarify (from) which firmware version ?

0 Likes

#10

I can confirm i succeeded to update to 1.3.0_49 today, by switching to China mainland and developer mode is enabled;
Sample python code seems is not compatible;

python YeelightWifiBulbLanCtrl.py
Welcome to Yeelight WifiBulb Lan controller
Enter a command: h
Usage:
  q|quit: quit bulb manager
  h|help: print this message
  t|toggle <idx>: toggle bulb indicated by idx
  b|bright <idx> <bright>: set brightness of bulb with label <idx>
  r|refresh: refresh bulb list
  l|list: lsit all managed bulbs
Enter a command: l
1 managed bulbs
1: ip=192.168.X.Y,model=desklamp,power=on,bright=100,rgb=0
Enter a command: t 1
connect  192.168.X.Y 55443 ...
Enter a command: b 1 20
idx 1
bright 20
connect  192.168.X.Y 55443 ...
0 Likes

#11

what do you mean by incompatible?

0 Likes

#12

for example

python YeelightWifiBulbLanCtrl.py
Welcome to Yeelight WifiBulb Lan controller
bulbs_detection_loop running
send search request
invalid data received: M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1982
MAN: "ssdp:discover"
ST: wifi_bulb
Enter a command: l
command_line=l
1 managed bulbs
1: ip=192.168.X.Y,model=desklamp,power=on,bright=100,rgb=0
Enter a command: t 1
command_line=t 1
connect  192.168.X.Y 55443 ...

has no effect (lamp doesn’t switch on/or/off)

0 Likes

#13

it’s not a communication issue; i have tested https://gitlab.com/stavros/yeecli/ for example, there are lots of errors, probably need to debug a lot but turn off / on; toggle; brightness (sometimes) works

0 Likes

#14

@weiwei, are sure 100% sure about this? I can definetely control my desk lamp with JSON api (in Developer Mode)! :confused:

Are going to remove API (Developer Mode) support in future? (I will get very disappoint) :confused:

0 Likes

#15

@lightmaster it was in Sep 2016.
I just got one yesterday and stock firmware didn’t had developer-mode. I’ve updated to 1.3.0_49 and i have it.
No-one is going to remove it :slight_smile:

What library do you use for controlling it ?
What functions work ?

0 Likes

#16

I wrote my own library for HomeAssistant. All documented features work: on/off, brightness, colour temperature, etc… :slight_smile:

0 Likes

#17

Yeah sorry, didn’t notice date for the post. :slightly_smiling_face: It’s OK now.

0 Likes

#18

do you have it somewhere on github ?
looking to do exactly the same thing.

0 Likes

#19

I have uploaded it here: http://git.s-ko.net/muchweb/yeelight-lan

0 Likes