Cross-Module Persistent Data Storage
-
I'm curious if there is any way to have any data storage available across modules. datastore module is available, but it is per-module (looks like it makes a SQLite DB within the module).
I would like the be able to have an IP address discovered from one module available to another.
For the background, I am using the UDP/dgram module to control Govee lights via their LAN API (which is something I've always wanted to play with and the Flic Hub LR made it so easy, thank you!!!). I have one module (we'll call it Module A) which is bound to a port which allows me to listen for a response from a Multicast message which contains the IPs of the Govee lights. I do some controls to the lights within that Module A, but I also want to be able to control the lights from within another module (Module B), which just requires the IPs and doesn't need to do all the overhead of listening to responses. But these IPs aren't static and I was wanting to be able to log/store the IPs from Module A and access them from Module B so that I don't have to manually update Module B whenever the IPs change. Is this possible in any way? Thank you!
-
@Emil It would be awesome if you all could add a Global Datastore in the future! If you need any help testing, I would be happy to play with a beta version!
The Govee lights I'm working with are an older model H7013 which are warm white dimmable string lights that support Wi-Fi and Bluetooth, but that means the integrations are pretty limited to IFTTT which can be slow, and I can't detect the current state. The LAN API is much faster and I can check the current state, which is great.
I've looked into upgrading to newer Matter versions from Govee or anyone else but they are all more expensive than is worth it for me when what I have it working, and many newer models have more features/complexity than I really want (don't want RGB or anything, just want 2700K warm white and dimmable).
-
@pico I get your point. Maybe we should add a global datastore as well...
Did you know by the way that Govee lights support Matter? That way you should be able to control them using their static node id, so that you don't need to keep track of the IP address.