Hey, thanks for making this awesome library. I don't have Homekit stuff, but I'm trying to use your HatchBabyApi as a client for the API to do some automation. I'm hoping to implement a gradual volume fade over a certain period of time. Just being able to turn it on / off would be nice too.
I've got your Rest Plus example working. But now I'm trying to add in a statement to adjust the volume:
Unable to Update {Hatch Name} - No MQTT Client Registered
Since reading the API works, I'm guessing I'm just not doing this in an async way. I also notice that these error log message happens before the console logging. I see that the client gets created in the getDevices call. Is there something I need to wrap the setVolume / update call in to make it run only once the client is initiated?
Sorry if this is a very basic question. I never really got the hang of async and promises.
Hey, thanks for making this awesome library. I don't have Homekit stuff, but I'm trying to use your
HatchBabyApi
as a client for the API to do some automation. I'm hoping to implement a gradual volume fade over a certain period of time. Just being able to turn it on / off would be nice too.I've got your Rest Plus example working. But now I'm trying to add in a statement to adjust the volume:
and getting:
Since reading the API works, I'm guessing I'm just not doing this in an async way. I also notice that these error log message happens before the console logging. I see that the client gets created in the
getDevices
call. Is there something I need to wrap the setVolume / update call in to make it run only once the client is initiated?Sorry if this is a very basic question. I never really got the hang of async and promises.