Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a limit to the number of devices? #35

Closed
scamiran149 opened this issue Feb 25, 2018 · 3 comments
Closed

Is there a limit to the number of devices? #35

scamiran149 opened this issue Feb 25, 2018 · 3 comments

Comments

@scamiran149
Copy link

Hello,

It seems as if I cannot use all of my devices, but only a certain number at a time. I haven't figured out exactly how many.

Is there a particular limit I should be aware of? Or is it possible one of my devices is bugging out discovery from OpenHAB?

Thank,

Sherwin

@scamiran149
Copy link
Author

A quick follow up-- it appears there is some kind of soft-limit on discoverable devices, in that new devices are not automatically appearing in my OpenHAB2 configuration.

That being said, devices that are not being discovered as Things can still work, you just have to manually create the Things using the Smartthings Name, and appropriate category. If the name in Smartthings changes, the name in the OpenHAB2 thing has to change as well.

I'm actually using the binding backwards; my main goal is to tie virtual smarttthings "things" to OpenHAB2, and use those to control UPB devices from Smartthings. It seems to be working really well.

Thank you much! If there is additional troubleshooting I can do about device discovery or other interactions I would be happy to do so.

@BobRak
Copy link
Owner

BobRak commented Feb 26, 2018

I'm not aware of a limit on the number of discoverable devices. A couple of months ago another user reported that not all of his devices were being discovered. We discovered that Smartthings has a limit on the size of the data stream it can return. I made a change that broke the discovery result into separate messages of ~30k bytes. You should make sure you have this release which was pushed out a couple of months ago. If you have done your download in the last 2 months you should have the latest. to be sure look at your OpenHabAppV2.groovy with the one in the repo HERE. At line 692 you will see a check on the bufferLength. If yours doesn't have that you should get the latest release. You can read more about this in closed issue #27.

The Smartthings app: OpenHabAppV2 logs each device that it discovers and logs that to the Smartthings log. Please look in that log for things that are missing in your discovery result. Also, OpenHab logs each device it discovers so you can look there to confirm that each device that Smartthings sends is processed by OpenHAB. By comparing the two logs maybe you can see where a particular device is failing to be discovered.

I wouldn't be surprised if there are cases that are not handled correctly by the binding. Especially in the discovery phase.

I would be interested in knowing how many devices you have.

Please let me know what you find. I would be willing to add more logging to either the SmartApp or openHAB if that would help.

Bob

@scamiran149
Copy link
Author

scamiran149 commented May 10, 2018

Sorry for the VERY LONG delay in my response.

I was still having the problem, but figured out the issue. some of my device names had brackets " ( " " ) " in the names. See the following error:

java.lang.IllegalArgumentException: ID segment 'NestWeather(60016)' contains invalid characters. Each segment of the ID must match the pattern [A-Za-z0-9_-]*.
I also had problems with apostrophies, and I think Smartthings automatically uses them for presence devices on android.

I'm guessing I still got some devices to show up, because the discovery was broken up into messages of 30k bytes, and only the ones with an invalid device name failed.

After that, no problem bringing in 60+ devices.

@BobRak BobRak closed this as completed Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants