Hello All! I was gifted a Hubitat Elevation for Christmas, and am finally getting around to using it. I am new to HE and Home Automation in general. However, I do have some software development experience.
I am trying to develop a device driver to control some cheap Feit Electric bulbs that I got at Costco.
I installed/flashed the bulb with Tasmota 220.127.116.11. As of right now, I am planning on using HTTP, but might switch over to a MQTT based solution depending on how well this works. This is what I have so far: HubitatAppsAndDrivers/TasmotaHttpFeitBulbDriver.groovy at master · megbers/HubitatAppsAndDrivers · GitHub
Now for my question:
I can tell, obviously, when the on() method is called from the UI, but what I cannot tell is when the refresh() or ** initialize()** methods should be called. I have also seen some examples with update() methods implemented. Does anyone know if there is any documentation that I am missing about when these methods will be called and/or what they should be doing? I have found the "java doc" type documentation for the the Capabilities, but that really doesn't tell you much besides the method signature.
When and by what do those methods (initialize, refresh, update) get called. I can call them manually by going to the device screen and clicking the buttons, but shouldn't those be called automatically by the framework? I am doing something wrong in my code to prevent those methods from getting triggered?
Same thing with the parse() method. I can tell by the logs that it is getting called, but my code doesn't explicitly call it anywhere. So, something is calling that method some time after the HTTP request is complete. Is that called by the hubitat.device.HubAction class or the framework?
NOTE: I could be thinking about this totally wrong, too, so please be gentle.