Lightwave (Gen2) Integration - WogaLWRF

Have you installed the device drivers?

You need to add these files to 'Drivers code' space, in your hub, if you haven't already.

Thanks I hadn’t done that but I have now.

Still getting errors though

WogaLWRF(1.2.5) || [PARENT] ERROR: Error creating device: com.hubitat.app.exception.UnknownDeviceTypeException: Device type 'WogaLWRF - L42' in namespace 'wogapat' not found

Maybe you don’t support L42. I have quite a few other devices though.

There are four device types in that Github repository. Your error is because L42 is a supported device type and you haven't installed the device code. If the app can't find a device type from the environment read it defaults to the Lightwave switch, which was the first error you saw, to provide basic switch functionality.

Try installing the other device types from the code repository into 'Drivers code'

If this app is now being used a bit more, as it's had some interest recently, I'll add some more instructions to make the install clearer.

I'll have a look at the Hubitat package manager as well to move it away from manual install.

It never really seemed worth it but I'll have a look at cleaning it up and integrating it.

Hi again,
Spoke too soon. All Devices are now in Hubitat but I am unable to control them. I think the following error applies
org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_app_wogapat_WogaLWRF_275.setChildSwitchOn() is applicable for argument types: (java.lang.String) values: [635a872090e2b10b9b4a5f53-63768a7cab74c50ba4378be6]
Possible solutions: setChildSwitch(java.lang.Object, java.lang.Object) (setChildSwitchOn)
I was trying to turn on a socket from Hubitat.
Also when I turn on/off a socket in lightwave the change in status is not reflected.

It seems the status is only reflected correctly after a Hubitat restart.

Any thoughts

Yes, maybe. Looks like a bad call in one of the device types. I'll take a look.

For the status, did you turn webhooks on?

I've updated the device file. Copy the code from the 'WogaLWRF - Lightwave Switch' in the Git repository
over the top of the same device in 'Drivers code.'

That should fix your device issue.

If you've activated webhooks and the driver is fixed, I can't see why a full hub restart would be needed to see the status change. I know the webhooks can sometimes be a little delayed. (That's down to Lightwave)

Looking through the state change flow will take a little while but I will look tomorrow,

No I didn’t turn webhooks on. Would that work better?

Thanks for the new stuff I’ll try it later this weekend

Yes, the app has to receive the status update from the cloud so best turn that on. That is probably why your status isn't changing.

I'll test it anyway. It's been a while since I went through the code in detail since I wrote it two years ago. If I'm going to clean it up I'd better start remembering what I did.

Ok I managed to test right away.

I can now control the lightwave devices from Hubitat. Thank you.

I have also turned on webhooks and rebooted the Hubitat afterwards. This has not solved the problem of the status being reflected correctly in Hubitat when the device is turned on/off in lightwave.

I did a quick test. I can see the Current state for the switch changes, within the device page, when I use the lightwave app to switch a device on or off.

Can you explain what's not changing, exactly, so I can try and replicate please?

Do you see a log for the state change when using the lightwave app, for example I see:

Screenshot_20221203-163456_Chrome

Ok so I get this type of message in the log when the status is changed by Hubitat
WogaLWRF(1.2.5) || [PARENT] Set Worktop four switch to off
When I turn on that same Worktop four switch using the lightwave app I would expect the status shown on Hubitat change to on but it doesn’t change at all and nothing seems to appear in the log.
Does that help?

Try turning debug on, activating webhooks again, then trying again.

If you look at my log I received a webhook first, then the state changed.

More errors that might help
app:2012022-12-03 18:11:54.619errororg.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_app_wogapat_WogaLWRF_275.removeSetting() is applicable for argument types: (java.lang.String, java.util.LinkedHashMap) values: [automationName, [value:, type:string]] (removeSetting)

app:2012022-12-03 18:11:54.518debugWogaLWRF(1.2.5) || [PARENT] install state=COMPLETE.

app:2012022-12-03 18:11:54.515debugWogaLWRF(1.2.5) || [PARENT] checkConfig() returning true

app:2012022-12-03 18:11:54.510debugWogaLWRF(1.2.5) || [PARENT] children: [Ratty, Worktop five, Worktop nine, Worktop ten, WT1, LinkPlus, Kettle on bucks, Worktop two, WT7, Worktop one, WT2, Worktop six, WT3, Worktop eight, Worktop seven, Worktop three, Worktop four]

app:2012022-12-03 18:11:54.501debugWogaLWRF(1.2.5) || [PARENT] Hub Type: Hubitat

app:2012022-12-03 18:08:16.292errorjava.lang.RuntimeException: OAuth is not enabled for this App on line 1268 (method updated)

app:2012022-12-03 18:08:16.131debugWogaLWRF(1.2.5) || [PARENT] updated()

app:2012022-12-03 18:07:56.866traceWogaLWRF(1.2.5) || [PARENT] Debug logging has been enabled. Will auto-disable in 30 minutes.

The removeSetting method error at the beginning is an interesting one but unrelated to your problem.

The app creates a lot of settings to create an automation device i.e. a device where you can group devices and features together. That function cleans up and removes the settings. Looks like it's throwing an error. I'll fix that in the next update. It can be ignored, for now.

The oauth error is your issue. The app is unable to create an access token which is used by lightwave to send the webhook.

On line 15, in the app code it should read:

oauth: true,

Assuming it does?

I tested a fresh install during the last release. In my experience oauth should be enabled by the app without any additional settings. Your problem is oauth isn't turned on for some reason.

Ok I’ve fixed that.

Line 15 was correct but I saw a button to enable oauth for the app and pressed that. Rebooted and it now works.

Would be great if you could pull everything into a package for the next guy who downloads this.

Thanks for all your help.

Yeah, I'll start working on that. I created two years ago and it had no interest so I didn't bother.

Glad it's working for you now.

1 Like

Hello, first time post, and a COMPLETE beginner at this. I've read through this discussion with much interest though. I too rely on IFTTT for my lightwave, and getting this working in HE would be amazing. Ive done as much as I can, but am still unable to get it operating. Here is my error, is there anything obvious I could look at please? TIA
app:1362022-12-11 18:46:28.058 errororg.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_app_wogapat_WogaLWRF_Lightwave_Integration_193.setChildSwitchOn() is applicable for argument types: (java.lang.String) values: [5c40c45fb1590f631737c1a5-623dbffb37c30814f527edda]
Possible solutions: setChildSwitch(java.lang.Object, java.lang.Object) (setChildSwitchOn)

app:1362022-12-11 18:46:24.723 errororg.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_app_wogapat_WogaLWRF_Lightwave_Integration_193.setChildSwitchOff() is applicable for argument types: (java.lang.String) values: [5c40c45fb1590f631737c1a5-623dbffb37c30814f527edda]
Possible solutions: setChildSwitch(java.lang.Object, java.lang.Object) (setChildSwitchOff)

Hi,

Yes. That's exactly the same problem I fixed last week. I've been trying to get everything in order for the full release I'm working on and haven't updated the repos, apologies.

I'm about to release a full version, i.e. taking the app out of beta. Give me a couple of hours, I'll get it done.

One question, did you install it using HPM?

v.1.2.9 - First Full Release
now v1.2.11 - a couple of fixes as I haven't used HPM before.

I've reworked a lot of this app based on recent interest.

I consider this the first full release. Any version before 1.2.9 will be considered beta. I recommend a full uninstall and re-install from versions prior to v1.2.7, to ensure full functionality.

Notes:

  • Now available from Hubitat Package Manager. - App name changed so versions before 1.2.7 should not be matched by HPM.

  • I've re-worked the device drivers. Alexa has a habit of picking up devices with 'lock' capability as locks, rather than switches, so I've re-worked the switches based on 'Virtual Contact Sensor with Switch by Stephan Hackett.' This will ensure they are recognised correctly and also allow the devices to be used as triggers in Alexa.

  • You can now change automation devices to add or remove devices and features. Previous settings are presented during the amendment

  • I've re-worked all the menus, cleaning up general presentation and re-working all the menu buttons.

  • Unused menu formatting and application state variables from beta testing removed

  • General re-work of all debug logging for consistency

  • Addition of automation devices into application state page

  • Clean up of unused code

I plan to add further functionality to handle Lightwave changes, i.e. new devices, name changes, device deletions etc.