rooi/homebridge-lightwaverf

Stops service after install on Hoobs 3.3.3

Closed this issue · 22 comments

Hello,

I got this kit to control my lightwaverf (pre 2016), so not very familiar with hoobs.

But the first thing i did when i built my hoobs server was install the lightwaverf Plugin.

But every time i install under the plugins page on hoobs it stops the service, if go to the main page and start the service again it refuses to start.

So is there any way i can get this to work, i looked on hoobs for another version, to try and back date hoobs but there does not seem to be an option for older versions.

As i brought the kit just for lightwaverf is there any work around for this?

Thanks for any help and the great work.

Just hope i can get to work.

rooi commented

Hi,

That’s unfortunate. I don’t run hoobs myself, but if you can help, we can probably fix it and improve the plugin.
Could you please copy/paste the logging information from start until it stops? The configuration would also help, but be sure to remove any passwords/pins before including it.

Are you using the login with email and pin by the way, or manual configuration?

Thanks

Hi Rooi,

thanks for your help and this amazing work you have done.

To make sure it was not a one off, i rebuilt the hoobs from scratch. But i still seem to get the same issue. Because my lightwave account is pre smart stuff (2016) it should pull my devices automatically?

I have attached hopefully the right info? Let me know if you need more.

one picture of installing the plugin and service stopping, next picture of trying to restart the service and a picture of the details page.

Thanks again for your help.

add plugin and input detals

Untitled 2

Config

rooi commented

Thanks

There was a bug in the code that caused the plugin to stop the service. I've fixed this in the latest release 0.3.2. I think it will take a while for hoobs to include the latest version (last time it was more than a week).

The fix will not help you further. There seems to be a problem with the login and fetching your devices.
Could you try the manual config as indicated in this issue? #14

The readme describes the steps to take to figure out room and device numbers:


How to Determine Room Number:

Log in to Manager.LightwaveRF.com View All Rooms Select the room in question Show Page Source Search in Page Source for "All Off" -The Required value is in the data-room_number= attribute of that line

How to Determine Device Number:

Log in to Manager.LightwaveRF.com View All Rooms Select the room in question Device Number is usually the order in which the devices are listed, but this does not account for adding and removing devices. This may take some trial and error.


Could you please try the manual configuration? An alternative would be to try the latest 0.3.2 when it is shown in hoobs and post the log in this issue. I've added some more output when the login fails, perhaps this allows me to fix fetching the configuration from the server for your type of devices/accounts as well.

hi rooi,

thanks again for your help on this.

So interestingly the update is available on hoobs :-)

But it still can't seem to pull my information about devices.

So i just tried the manual way and for some reason it will not add the device to the accessory list on hoobs. Which is a bit strange but maybe i have made a mistake in the way i have written the info in manually? Screen shot attached.

Thanks again for your quick update.
update

rooi commented

Hi, it seems we're making progress, but slowly.
The EADDRINUSE 0.0.0.0:9761 error should be solved by a full restart of HOOBS. There is a slight change that something else on hoobs uses this port and blocks it, but I don't expect it.

However, the "Failed to find plugin handle accessory Ta" error indicates that there is something else wrong in the Homebridge configuration. I don't think this is related to this plugin, but if you can copy/past the full homebridge configuration, we can probably figure out what's wrong. I think the full homebridge configuration is under the advanced tab:
image

After this is fixed, everything should run smoothy

hi rooi,

thanks again for this.

So i just wanted to make sure the problem was consistent and not me changing things in the config. So i did a clean instal on hoobs again. Seems i get the same issue. So its good it is not something i have edited.

At first on the fresh install, i installed the lightwaverf plugin. I tried going through the host again. When i used the lightwaverfhost.co.uk it stopped the service from working again, if i tried to start the service it refused to start. I then rebooted.

After the reboot, i then i tired web.trustsmartcloud.com, this let the service start again, but unfortunately it did not pull my details automatically again. No luck there. So i tried a reboot to see if that made a difference. No luck.

So then i tried a manually adding a device. This showed up in hoobs, which was good but it doesn't seem to be able to communicate correctly with the lightwaverf hub. from one command, lights @ 100% it seems to repeatedly send commands. Eventually they end up at 100% but it takes some time and they jump around on levels. It registered correctly with the command in terminal.

Its all very strange.

attached are some screen shots. let me know if there is any sensitive info that should be taken out.

Thanks again for your help.

Screenshot 2021-04-11 at 15 26 12

Screenshot 2021-04-11 at 15 40 00

Screenshot 2021-04-11 at 15 40 06

Screenshot 2021-04-11 at 15 43 07

Log:

edited out

Configuration

{
"server": {
"port": 80,
"origin": "*",
"autostart": 0,
"home_setup_id": "xxxxxxxxxxxxxx",
"polling_seconds": 5
},
"client": {
"default_route": "status",
"inactive_logoff": 30,
"theme": "hoobs-light",
"locale": "en",
"temp_units": "fahrenheit",
"country_code": "US",
"postal_code": "94040"
},
"bridge": {
"name": "HOOBS",
"port": 51826,
"pin": "xxxxxxxxxx",
"username": "xxxxxxxxxxxx"
},
"description": "",
"ports": {},
"accessories": [],
"platforms": [
{
"platform": "LightWaveRF",
"plugin_map": {
"plugin_name": "homebridge-lightwaverf"
},
"name": "LightWaveRF",
"ip_address": "xxxxxxxxxxx",
"manager_host": "web.trustsmartcloud.com",
"devices": [
{
"roomId": 1,
"roomName": "bedroom",
"deviceId": 1,
"deviceName": "downlights",
"deviceType": "D"
}
]
}
]
}

rooi commented

That is strong. It seems that that homebridge does not get a response from you link after sending a command.

I've just published a new version that has better error handling, to prevent it from crashing when it cannot reach the host. I also included some logging to get an indication of what goes wrong with the responses. Could you please test the latest version and post the output?

If this confirms that it does not receive responses. We can do some more debugging, but I will ask you to install some none published debug versions to prevent from having too much releases. I can included some more logging to see if the responses are in a different format. In the worst case when there are no responses at all, I can included the option to just disregard them.

Some more troubleshooting, but we're getting there ;)

hi rooi,

thank you very much again for all this.

So i did the update. Then rebooted.

Did simple on command from hoobs, nothing happened.

Then did the dimmer function in hoobs. It then went a bit crazy. Hoobs seemed to lock up but after about 15 seconds the light got brighter and brighter.

Then refreshed the web page and hoobs started working again.

Then turned the light off via hoobs. it went off straight away. then turned on. wen on stright away.

then dialed down the dimmer to anout 60% on hoobs, it paused for a while but eventually went to the right level with the light gradually dimming down.

then turned on, no problem, turned off, not problem. again, then turned on, no problem, turned off, not problem.

then dimmed to about 20%, it seem to pause a bit, but eventually went to that level.

then turned off, but it locked up again. it eventually turned off.

turned on, no problem.

raised level to 100% and it eventually turn the light up to the right level.

All very strange.

thanks again for your help.

log:

12/04/2021, 00:12:23 [LightWaveRF] Sending message: 308,!R1D1FdP1|

Screenshot 2021-04-12 at 00 16 17

rooi commented

Hi, I've just pushed another release 0.3.6. I noticed many similar message in you log and this release should filter the identical messages and a faster response.

I also tried to solve the repeating message on "SET handler returned write response value, though the characteristic doesn't support write response", but this did not work out as I intended, hence the 0.3.6 release instead of 0.3.5

Let me know how this goes.
Also, could you try to update homebridge itself? It seems your on v1.3.0 or 1 which exposed the "SET handler returned write response value, though the characteristic doesn't support write response" messages. In homebridge v1.3.4 these messages are hidden in debug and perhaps a new release solves some of the issues.

Please not the lightwaverf does not allow sending commands at high frequency. Right now, multiple commands will be scheduled to run once a second until the command list is cleared. When turning on multiple devices at once, you'll see that they respond one after the other. This is also of concern when setting a dim level using a slider. I tend to slide it as quickly to my desired dim level. Dragging it a certain speeds may cause some kind a build of in the command you perceived (but my latest fix should reduce this effect)

rooi commented

FYI, just fixed the "SET handler ..." warning messages in 0.3.7.

hi rooi.

thanks for your help with this again.

I have been working on this afternoon.

I have updated the plugin and rebooted.

I'm not sure how to update the homebride side of things? But i have updated the hoobs version. I rolled back on that at first to see if that was creating the issue with pulling the devices from the lightwaverf account. But seems thats not to do with it.

So i have updated to hoobs 3.3.5, it was 3.3.3. Do you know if that will update the homebridge side of things?

While i have been using it this afternoon, it has become clear that there is an issue with the dimmer dial on hoobs. It might not be an issue with your side of things.

The good news is that it seems to be working with homekit interface.

Which is great. As long as i don't put in too many changes at the same time it works great. But thats the limitation on the lightwaverf hardware i think. but not an issue.

Have a look at the video. Not that it really matters as i doubt any one uses the hoobs interface for changing levels. Its proably a problem with hoobs too. But explains my initial problems when strange things were happening.

``iframe src="https://player.vimeo.com/video/535999701" `

on another note,

Do you know why it won't pull my lightwaverf details (roomsdevices/moods) for the light wave host?

What could cause that not to work? Is there a way to test why the does not work? The reason i'm keen to work it out is there is a lot of lightwave devices and moods and it would be great to import the details from the host.

Whats the difference between the two hosts?

web.trustsmartcloud.com

Screenshot 2021-04-12 at 20 59 33

lightwaverfhost.co.uk

Screenshot 2021-04-12 at 21 00 29

Is there any way to test pulling my information a different way?

I can log in no probs through here:

https://manager.lightwaverf.com/

Screenshot 2021-04-12 at 21 02 02

I wonder if there is another way i can test that.

Another random question is, if i wanted to use terminal to send a command to lightwavrerf link, so a command to turn something on, what would i need to put with this. The exact syntax, how do i format it?

001,!R1D1F1|

thanks again :-)

rooi commented

Good to hear that it is working good enough using homekit. I've got some ideas to further improve the plugin and to let it respond faster to multiple inputs for the same device (e.g. dragging the slider slowly of using hoobs), but for me this is low priority for now since it's most severe when using hoobs instead of homekit. Hopefully I can work on this soon though.

With regard to the lightwaverfhost.co.uk host. They seem to have changed the url and I've just pushed a fix to account for this in the plugin. If you're able to login to the following url and see the same rooms/devices, your good to go.
https://lightwaverfhost.co.uk/cocomanager/index.php

I've looked into the https://manager.lightwaverf.com/ before but couldn't make it work at that time. That why we came up with the manual configuration (see #5)
However, I just noticed that someone else started tapping into https://manager.lightwaverf.com/ earlier this month. I'll try to see I there are thing that I can learn there and implement in this plugin.

To be continued, but no promises on a timeframe ;)

Hi @rooi

Thats it. Spot on. 💯

It's working no problem it's pulled the details!

Fantastic work 🥇 , thank you very much for your help and work + all the updates. You have made a fantastic plugin.

Very grateful. If you ever need anything testing let me know.

Thanks again.

rooi commented

Great!!

I just published the improvement when moving the slider slowly (or when using the hoobs dial). It should now respond much faster in those cases.

Would you like to test this? If successful, we significantly improved the plugin!

hi rooi.

thats worked a treat. Just been testing it 💯 :-) . Works spot on! Nice work. very smooth controls within hoobs.

Thanks again for all your work. This is seriously going to change things.

Interestingly i was testing the set up and notice some devices missing and a different order of the devices.

So I logged back onto the coco host and noticed the rooms and devices are from an old setup of the lightwave kit. It was the setup of when i first got it.

I then checked another lightwaverf account i have and the same thing, it has the original set up but not any of the changes though-out the years. If i was going to guess i would say anything that was changed on the lightwaverf app after 2015-16 is not showing up. Which means lightwaverf must have pulled away from this host.

one setup was pre 2012 and the other 2014, but both setups look like any changes made in the app after 2015-2016 have stopped being updated to the coco site. sad times.

Interesting, i wonder if there is way to pull the most relevant setups from the lightwaverf hosts. https://manager.lightwaverf.com/

Hopefully in the future when you get some time this would be awesome!

I am very grateful for all you have done so far.

any way cheers rooi, thanks again for letting people use this ace plugin.

«E» «X» «C» «E» «L» «L» «E» «N» «T»

rooi commented

Could you test 0.4.0?
If you set the configuration as: "manager_host": "control-api.lightwaverf.com",
This would pull the setting from manager.lightwaverf.com

Note: I don't use this configuration myself, so beware, not fully tested and thing my break ;)

Hi rooi,

sorry in the delay.

Thanks for the update. Nice work.

Unfortunately it's not quite working as expected.

From looking at the log when its is connecting to the lightwaverf host, It seems to be pulling the up to date info, but about half of the devices are missing.

They are missing from the hoobs interface web page, but the devices that are missing the title shows up on the homekit page on a iphone but says "not supported"

Untitled

On further inspection in the logs, i can see it has pulled the information from the lightwave host and all the missing devices seems to be missing because the deviceType has initials that i have not seen before.

For what i can see when it is pulling the information from the host, all the missing devices are showing up as: deviceType: 'I' even though some of them are dimmers or switches, they still have 'I' next to them. It's dose not seem to be able to work out what they are. I don't know if lightwaverf made some changes when they started letting rooms have more devices or they changed the way it adds devices to the host?

Screenshot 2021-04-21 at 02 16 39

I can see the info in the logs, but it's not in the right format to add it manually to the advance configuration page. Unfortunately when it pulls the info from the lightwaverf host, devices do not show up under the advance configuration hoobs page. Other wise i could just change the initials.

Do you think there is a way to get the info to show up under advance configuration page in hoobs?

Thanks for your help. Nice work, this defo going in the right direction.

rooi commented

Thanks for testing. It seems the valid flag is not correctly specified on the server. I've added a workaround, could you please tot 0.4.1?

Hi Rooi,

Thats it! works perfectly. All devices showing up.

Can't thank you enough for going all the way to the end on this.

What a great plugin. Nice work.
leg

rooi commented

That’s very good to hear!
Enjoy!