App and driver porting to Hubitat

I cannot find a solution to

Unable to resolve physicalgraph.app.ChildDeviceWrapper [...]

I replaced physicalgraph with hubitat, but that just changed the package name in the same error. Anyone have any idea?

The function with the error is:

private physicalgraph.app.ChildDeviceWrapper getChild(Integer childNum) {
	return childDevices.find({ it.deviceNetworkId == "${device.deviceNetworkId}-c${childNum}" })
}

you don't need any of class path, replace the above with:
private getChild(Integer childNum) { return childDevices.find({ it.deviceNetworkId == "${device.deviceNetworkId}-c${childNum}" }) }

2 Likes

Thanks for the help, but I am returning my device. The SmartThings driver will require too much time to convert and understand (I have other more pressing projects), and the Hubitat DH for Aeon Home Energy Meter does nothing. After running for several days, and not collecting a single bit of data, it is time to abandon this idea for now. Hopefully someday soon an actual DH implementers document will be published, and we can bring custom DH code mainstream. My brain just isn't plastic enough to figure out undocumented systems.

3 Likes

I hadn't realised that Telnet access was possible from Hubitat ... this alone justifies the move from Smartthings and opens a world of possibilities.

Thankyou devlopers... :smiley:

4 Likes

@mike.maxwell I'm tagging you because I believe that you were one of the original creators of this project here that links squeezebox to smartthings.

Im trying to port it over to hubitat but I think its this line that's giving me issues in the squeeze switch server driver

sendHubCommand(new hubitat.device.HubAction("${playerID} ${command}\r\n\r\n",hubitat.device.Protocol.LAN, "${device.deviceNetworkId}"))

My json slurper sees login information being sent from the python script to telenet but noting is sent when i change a player switch state... I changed the port in my python script from 3500 to 3501 and made the device id changes required so I think its this line thats holding me up... any suggestions or a workaround?

Hasn’t this already been done?

Andy

2 Likes

see I knew there was a reason I posted here instead of messing with it all day hahah Ill look into this new one as it sounds way more capable. Thanks for the link

Search is your friend :wink:

1 Like

Yeah I've often said that to other people.. I guess I just got focused on porting over my existing handler instead of looking for a new project. hence how I found this thread haha. This integration works way better than my old one so thanks for the solid recommendation!

Would be nice to see this community post converted over to the new docs.hubitat.com if that is the new home for official documentation.

2 Likes

Is it true that we are replace st with he? I vaguely recall seeing that a few weeks ago, but cant find it now, and st and he are too short on which to search.
such as this:
"st cmd 0x${device.deviceNetworkId} 0x12 0x0006 0x0 {}"

4 posts were split to a new topic: sendHubCommand in Driver

remove ("any text")

Not supported
Change to paragraph "text"

1 Like

findAllChildAppsByName('app name')
fails with
groovy.lang.MissingMethodException: No signature of method: app15434399313021801853038.findAllChildAppsByName() is applicable for argument types: (java.lang.String) values: [SHM Delay Simkypd Child] on line 1062 (keypadModeHandler)

ALso setting label name from an input setting does nothing
input "simkeypad", "device.InternetKeypad", multiple: false, required:true, submitOnChange: true, title: "Simulated Keypad Device"

	if (simkeypad)
		{
		section() 
			{
			label title: "Profile name", defaultValue: "Profile: Ikpd: ${simkeypad}", required: false
			}
		}

Need some help converting the following ST zigbee library code
log.debug "Sending Status ${zigbee.convertToHexString(status)}${zigbee.convertToHexString(seconds)} to device..."

keeps throwing
[error](http://192.168.0.106/device/edit/194)groovy.lang.MissingMethodException: No signature of method: com.hubitat.zigbee.Zigbee.convertToHexString() is applicable for argument types: (java.lang.Integer) values: [2] Possible solutions: convertToHexString(java.lang.Integer, java.lang.Integer) on line 449

I've tried Integer.convertToHexString and integer.convertToHexString, both fail.

I hope someone has an answer.

From ST documentation:

zigbee.convertToHexString()

Convert the given value to a hex string of given width

Signature:

zigbee.convertToHexString(Integer value, Integer width)

COPY

Parameters:

  • value : Integer value to be converted
  • width : the minimum width of the hex string. Default value is 2

Looks like you need a second "width" parameter

Maybe
${zigbee.convertToHexString(status,2)}${zigbee.convertToHexString(seconds,2)}

:man_shrugging:

OR
you may need to convert "status" and "seconds" to integers beforehand

${zigbee.convertToHexString(status.toInteger())}${zigbee.convertToHexString(seconds.toInteger())}

This one is my guess. But I haven't used that function in HE, that I can remember.

I believe there is a second parameter to that function

zigbee.convertToHexString()

Convert the given value to a hex string of given width

Signature:

zigbee.convertToHexString(Integer value, Integer width)

COPY

Parameters:

  • value : Integer value to be converted
  • width : the minimum width of the hex string. Default value is 2

:+1: Thank you, that fixed it! I swear I tried that before asking for help and it failed. However, this time it worked. I guess the default value, 2, did not make it into HE.

@mlciskey @JasonJoelOld Thank you for responding.

2 Likes