So i spent some time looking into the problem… basically you get a Null Pointer Exception at line 137 in the code. When you look at what is happening, it is grabbing the module value but it isnt grabbing it correctly (actually the same is happening with the GPIO but we dont need this information if we have the module ID)
The value for the module ends up being something like [71:Sonoff iFan03] … note the value is in square brackets [ ] and this isnt correct. It means it is within an object (Im assuming) but Im too tired right now to see how that has happened.
Anyway I was being lazy so I just forced the right value ie without it being in an object. And basically the driver creates the child and the child happily works with the iFan03. I also modified the device so it is a little easier to use (based upon the kind of way dalec did his driver.)
hi @Snuffy2 did you manage to solve the issue of not being able to spawn child devices for ifan03? What is the line that needs to be modified in the DTH? Ive already changed Line 257 case 44: //iFan03.
I was able to get it working similarly to how @Richierich explains (hardcoding the Module number in instead of letting the DTH detect the module number. So I added Line 260: case 71: //iFan03 and then set the DTH to use case 71 every time. This worked for me but I only have one Sonoff/Tasmota device.
However, once I got it working, I found that the iFan03 didn’t fit in the canopy of the fan it was intended for (should have checked that first, I know). So I no longer have it installed and never took it beyond what I did above. Sorry.
hi @Snuffy2@Richierich@BrettSheleski I finally manged to get Tasmota.groovy to spawn 2 devices Tasmota Light and Tamota Fan Speed. Tasmota Light works fine but Tasmota Fan Speed gives the following error :
groovy.lang.MissingMethodException: No signature of method: script_dth_e10587a32291cfd5f05dd710123cf11eee202daf03423fae404097b1cd806f57.setFanSpeed() is applicable for argument types: (null) values: [null]
Possible solutions: setFanSpeed(int), lowerFanSpeed(), raiseFanSpeed() @line 73 (on)
@hongtat thanks for the DTH link. The realtime status update definitely works better. Is there a way to delete the child device without deleting the parent device with your DTH? ie my fan does not have a light built in.
Hi @hongtat im having loads of problems with mine, seems to be offline quite abit, but even when it doesn’t say offline it hardly works, also google thinks the fan is a light, this is what smartthings says about my wifi in the device signal strength LQI 24 , RSSI -88 dBm , thank you.
OK so I switched to [RELEASE] Tasmota (Connect) for Sonoff, Tuya, SmartLife & other ESP8266 devices) earlier this year (and stopped using MQTT and a bridge).
I have around 12 sonoff mini (all flashed with tasmota); shelly devices (some flashed some not); ifan03 flashed with tasmota. All work perfectly. This software is by far the easiest way to controll the tasmota devices and the ifan03 is easy… I actually use both the ifan03 and a mini to control the lights… the mini isnt connected to smartthings but I use tasmota rules to share light settings between mini and ifan03. The ifan is not connected to the light, but is the switch in ST… this is just so I keep the setup simple and the light switches work the way I expect them to.
A SmartThings hub can be used to control devices directly using Z-wave and Zigbee, or “indirectly” using TCP-IP. The latter is the case for WiFi devices like Sonoff WiFi devices, Chamberlain garage door controllers, etc. DTHs and SmartApps are available to facilitate this.