ChessMasterRiley
Member
Hello all!
I have a question about using Game Maker Studio to connect to the Yeelight WLAN connected smart lights.
For reference, here's the developer page for Yeelights: https://www.yeelight.com/en_US/developer
And here is the reference manual for their communication standards: https://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf
Here is my code for the server object:
Creation:
Destroy:
Networking:
Key Pressed <Space>
Ostensibly, when I send the search request using the Spacebar, the light should send a response buffer to the server (per the Operaction Specs PDF) that starts with "HTTP/1.1 200 OK". But, I am getting no response. I'm thinking my limited knowledge of UDP networking might mean I'm setting the server up incorrectly, but I'm having difficulty finding resources to help with this.
Before you ask, I have enabled developer mode on the light and verified my computer CAN control the light as the windows example worked just fine.
Thanks for your help
I have a question about using Game Maker Studio to connect to the Yeelight WLAN connected smart lights.
For reference, here's the developer page for Yeelights: https://www.yeelight.com/en_US/developer
And here is the reference manual for their communication standards: https://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf
Here is my code for the server object:
Creation:
Code:
///Setup UDP Server
server = network_create_server_raw(network_socket_udp,43210,100);
send_buffer = buffer_create(1024,buffer_fixed,1);
Code:
///Releasing Memory
network_destroy(server);
buffer_delete(send_buffer);
Code:
///Server Networking
var buffer = async_load[? "buffer"];
buffer_seek(buffer, buffer_seek_start,0);
var txt = buffer_read(buffer,buffer_text);
show_message(string(txt))
Code:
///Send Search Request
buffer_seek(send_buffer, buffer_seek_start,0);
buffer_write(send_buffer, buffer_text,'M-SEARCH * HTTP/1.1\r\n
HOST: 239.255.255.250:1982\r\n
MAN: "ssdp:discover"\r\n
ST: wifi_bulb')
network_send_udp_raw(server,"239.255.255.250",1982,send_buffer,buffer_tell(send_buffer));
Before you ask, I have enabled developer mode on the light and verified my computer CAN control the light as the windows example worked just fine.
Thanks for your help
Last edited: