Working on my first driver...
I have preferences like this:
preferences {
input("ip", "text", title: "IP Address", description: "[IP Address of your mochad server", required: true)
input name: "logEnable", type: "bool", title: "Enable debug logging", defaultValue: true
input name: "Station", title:"X10 Station", description: "X10 Station ID"
input name :"port", title:"Mochad port", type:"int", description: "Port for Mocha Server", required:true
}
And an initialize:
def initialize() {
if (logEnable) log.info "initialize() called"
connect(ip,port)
refresh()
}
When I click the initialize button under device I see this in the log:
[dev:84
](http://hubitat/logs#dev84)2021-05-26 09:00:36.588 pm errororg.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_Flying_Nerd_X10_via_MochaD_495.connect() is applicable for argument types: (java.lang.String, java.lang.String) values: [192.168.0.224, 1099]
So, it HE seems to think the port parameter is a string while the connect method requires an int.
First time test, i didn't specify a type for port in the preferences. So, maybe it defaulted to string and something cached needs to be flushed to pick up the change to int?
Thanks for your attention.