-
Notifications
You must be signed in to change notification settings - Fork 4
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
get all loads status - returns only first load #8
Comments
Hi, I'm glad you find it useful. If you need, here there is a bunch of examples. Another way to get around that would be to generate a list of status command, for example this is how I would do it in Scala (I'm sure you can do something similar in Java but I'm not up to date with the latest jdk) scala> (1 to 10).foldLeft(List.empty[String])((res, i) => s"*#1*$i##" :: res).reverse
res0: List[String] = List(*#1*1##, *#1*2##, *#1*3##, *#1*4##, *#1*5##, *#1*6##, *#1*7##, *#1*8##, *#1*9##, *#1*10##) Let me know if the response from In the wiki there is an example with Thanks |
Hi, thanks for reply! Command So it's convenient to use it to update status of devices on application start. But I receive only status of first device in a list. Also, if you open Event connection to a gateway with Thank you! |
Hi, I got your point, it's been ages since I haven't touched those logic. Try to dig deeper here. This is how I update the status in the app for all the lights. I hope it helps. But I agree with you, I would have expected a list of status. Have you tried to download the project and debug the command to see where are discarded those frames? And yes regarding the listen, I agree that it would be very handy, but I haven't implement it. Let me know if you are interested in do it. Just for curiosity, are you working on a mobile or desktop app? Thanks |
Hi there, Yeah I'd be interested to do it, let me know if it's possible. I'm working on java spring web app, which will collect usage statistics and keep it in a database. Just to practice my skills on Java Spring, so it might be not useful to anyone except me ) |
Hi @dendeps, sorry for the late response but I was on holiday. So the app under the hood uses only this library, looking at the code now I've just realized that what that command does is simply requesting N times the status, one for each light. Probably is not ideal, but I did it like that cos was the simplest way to update the status of the model used by the UI. Thanks for offering your help, could you please debug doRequest, in particular the methods I think buiding your own project is the best way to learn! |
Tried, haven't found yet. Can I contact you by email or any messenger to ask silly questions? ) |
Sure, I've sent you an invitation for a private chat on gitter |
Thank you very much for sharing your application!
I'm trying to get status of all light loads(there are more than 100 on site) with command "#10##" but getting only status of first load in response:
Is it possible to get all responses as a list?
Thank you!
The text was updated successfully, but these errors were encountered: