toddaustin07 / webrequestor

Web Requestor Edge Driver
Apache License 2.0
21 stars 8 forks source link

UDP support #6

Open wtesler opened 1 year ago

wtesler commented 1 year ago

I'm trying to get very similar behavior but have it send a UDP message instead of a GET/POST request. How much modification of this code do you think would be necessary to achieve that? Where would the new code likely go?

toddaustin07 commented 1 year ago

Can you tell me a bit more about the specific content format of the UDP message to be sent? Is it text or binary? This might determine if it’s worth trying to start with webrequestor’s HTTP-based design.

Depending on what you want to do, we could also consider using my HTTP Devices driver as a base to start from.

wtesler commented 1 year ago

I'm attempting to add some basic support for Govee lights which follow this UDP API: https://app-h5.govee.com/user-manual/wlan-guide which looks like udp:sendto('{"msg": {"cmd": "turn","data": { "value": 1 }}}', "10.0.0.98", 4001) . I was actually able to create a basic edge driver with some hard-coded udp commands that is working for the lights in my room. Check it out here: https://github.com/wtesler/UdpEdgeDriver