MiloSmurf wrote: Sun Oct 09, 2022 12:55 pm
Question: are you thinking about adding support for websockets at some point? I'm playing with a connected toy which I would like to integrate in a tease. It would involve sending commands over the websocket and receiving status information back from the device. I know Rhino doesn't support them, and Eos is also lacking in this department.
I'm also in contact with the firmware dev of the device, and he's probably going to add support for curl commands soon. I believe this can be reproduced in JS as well, but I don't know if Rhino will support it. Is this of any help?
I have given some thought to how we could integrate connected toys more and I would like to work more in that space. It's difficult because we have sites/apps like XToys that are very focused on toy integration and I don't want to create a duplicate of something that already exists either.
As great as websockets would be for this integration, my biggest concern is that adding websockets wouldn't be supported by Rhino as you mentioned, so I'd need to add support in Java as a part of GuideMe core. If we go down this path it would likely lead to making GuideMe core quite a mess of random toy integrations that would be difficult to maintain, test, and keep bug free as other changes are made.
In addition to websockets or HTTP APIs of some kind, devices like the ET-312, 2B, Coyote, and others all have interfaces that would be great to have integrations with. If toy integration is something there's interest in I would really prefer to make these integrations plugins. Currently GuideMe doesn't have any kind of plugin support, but that wouldn't be terribly difficult to add. This would allow the toy integrations to be isolated code that could be tested separately, and also give the integrations endless possibilities since they'd be written in Java and not hacked into the JS somehow. These could add custom XML tags, new JS functions, or anything really. Most importantly it should be pretty easy to have someone else work on a plugin, and test it locally, without needing a full development environment for GuideMe. This is going to be important because I won't personally have all of the toys involved, and I may not be able to test some of these integrations without one.
There's also the topic/concern of licensing and Terms of Use... Devices like the ET-312 that have a proprietary interface and the manufacturer won't release details about it. I've written software to interface the ErosTek devices and from reverse engineering I have a very thorough understanding of their protocol. Enough so that I can edit and flash custom firmware even. So I could write an integration for those devices without issue, but would it immediately get hit with a takedown notice on GitHub if I posted it? That's what I really don't know. And I'm also aware of other manufactures making developers sign an NDA to get access to the SDK, which likely isn't going to work well if I just open-source the result of that work.
To make a long story shorter, I like the idea of integrating toys more, and I'd like to explore that path, but I fear it'll be a long road with no shortage of hurdles.
-ED