sdetweil / MMM-SleepWake

module that uses an external source for motion detection, like a web camera
19 stars 0 forks source link

Will your module only work with the ones mentioned in the code? #9

Open Kayakbabe opened 5 months ago

Kayakbabe commented 5 months ago

I'm working on a Picovoice Rhino module to control my mirror. I'm looking to integrate with other modules in a robust way. So I'm looking at Send and Receive notifications. I'm thinking of having the notification message be configurable.

I see that your module code looks for SLEEP_HIDE and SLEEP_WAKE but it also has if statements requiring certain other modules.

Could this module work for any module which sends SLEEP_HIDE and SLEEP_WAKE to the mirror system notifications?

sdetweil commented 5 months ago

the SLEEP/WAKE notifications come from my node helper not from other modules. (socket notifications are only to/from this modules node helper component)

the notificationReceived is from other modules. and I am translating their message into actions i can take.

I could extend my module to listen for sleep/wake

for an existing module that has configurable notifications look at the gpionotifications module

Kayakbabe commented 5 months ago

I'm still learning! I've got Rhino working from the command line, now I'm wrapping it in a module. Been a while since I dug into any coding. I will look at the the gpio notifications. Thank you!

sdetweil commented 5 months ago

let me know if you have more questions.