|
|
|
|
|
by oliver2213
780 days ago
|
|
I'm working on a personal hobby project of mine, written in MOO [0] of all things. Its a bridge to homeassistant - it connects to your local instance and lets you observe and control anything you have set up in homeassistant from within the MOO - toggle lights, set thermostats, send tts alerts, etc. It also receives state change events, so you can have objects that act like their real counterparts and display up-to-date information as long as the bridge is online.
I run a local house MOO for my roomates and myself, and I thought it would be fun to control my smart home from it.
Challenges... The first was reading the web socket rfc and writing my own implementation, in what is probably considered an esoteric language at this point.
Next was discovering just how much of home assistant's web socket API is undocumented (read: pretty much all of it). There's a page which mentions a handful of APIs, and this got me started, but I really had to start reading homeassistant's code to see what other commands were available and being used presumably by the front-end to do some of what I wanted (listing users, subscribing to state updates for specific entities, listing areas, devices, etc) [0] https://en.wikipedia.org/wiki/MOO |
|