soma-ctrl
soma-ctrl copied to clipboard
trying to make this work for HomeBridge...
Hi!
I do hope you can help me with trying to get this working as a homebridge plugin, although my knowledge about JS is a bit limited. I wrote a test module like
but got a result like
any idea what I am missing here?
all the best Thomas
Nice idea, I considered making this as a Homebridge plugin at first; ended up going with MQTT targeted specifically at home-assistant compatibility in the end, and I'm using Homebridge-homeassistant to get them added to HomeKit... home-assistant has native HomeKit integration now too, but I've yet to try it.
Anyway... Disconnecting and reconnecting super quickly like that seems to happen a lot if the signal strength is too low between the computer running this and the Soma device. Are they quite far apart? Possible interference?
The other thing that's worth mentioning (though you may have already figured it out), is that you have to call connect() before any of the other actions will actually do anything.
Out of interest, have you tried out running somactrl by itself? Does that successfully connect? I wonder if there's already a Homebridge plug-in that'll talk MQTT or HTTP allowing you to just wire up a plugin to somactrl (though I can see the benefit of the whole thing being in-process to Homebridge, though it'll probably be more work!)
ok - now I am trying to use somactrl via http but after some minutes somactrl logs this:
