Hacker News new | ask | show | jobs
by CharlesW 976 days ago
> Is there a SIMPLE way to have a small python or go program act as a "switch" that shows up in Google home?

You can create virtual devices using Homebridge plug-ins. Here's an example: https://www.npmjs.com/package/homebridge-dummy

1 comments

Yes, that would be useful if I used homekit...
You don’t need to use HomeKit for this to work, but you will need https://github.com/oznu/homebridge-gsh. (Caveat: I haven’t tried this myself since I use HomeKit and Alexa devices.)
Oh.. less interesting how that I see how it works. I thought this would be a local thing, but it apparently connects to some third party service:

    // establish new websocket connection
    const socket = new WebSocket(`wss://homebridge-gsh.iot.oz.nu/socket?${querystring.stringify(qs)}`);
big YIKES from me there, especially because this is not really documented or even mentioned at all.
Ah shoot. Glad you caught that!
Oh, now that is interesting. The requirement for "insecure mode" is a bit scary sounding, but for what I want to control, it shouldn't matter.