openwebnet / openwebnet-android

OpenWebNet Android client for My Home BTicino and Legrand home automation system
https://openwebnet.xyz
MIT License
34 stars 21 forks source link

Interface/BUS support #85

Closed piMyHome closed 5 years ago

piMyHome commented 5 years ago

In smaller environments you have just one interface and for example a light ON command for address 25 on main interface will be *1*1*25##. Bigger environments have more interfaces ( I have 6 interfaces and ~800 end points), so you have to add the interface information as well, for example *1*1*33#4#02## if light 33 is on interface 2. So you can say, for interface 0 (the main interface) you can just skip the additional information for the interface number, while interfaces > 0 needs to be addressed explicitly.

In OpenWebnet App only numbers (33) can be entered as address, but not address/interface combinations (33#4#02).

Would be nice if this could be added.

Great app by the way!

niqdev commented 5 years ago

Hi @piMyHome, thanks for your interest and I really apologize for the late response, but I've been very busy recently.

Anyway, your suggestion is more than welcome, just to be sure, when you mean interface you refer to the local bus, isn't it? I opened the issue #69 ages ago.

I've just looked at the documentation of WHO=1/WHERE and I'd like to summarize it here

Description Allowed Values Format Details Implemented
Interface Int=I3I4
I3=0; I4=[1-9]
- - not available
Interface Int=I3I4
I3=1; I4=[1-5]
- - not available
General - 0 General of system YES
General - 0#4#<Int> General of local bus NO
Area A = [00, 1-9, 100] <A> - YES
Area A = [00, 1-9, 100] <A>#4#<Int> Area of local bus NO
Group A = [1-255] #<G> - YES
Group A = [1-255] #<G>#4#<Int> Group of local bus NO
Point to Point A; PL
  • A=00; PL=[01-15]
  • A=[1-9]; PL=[1-9]
  • A=10; PL=[01-15]
  • A=[01-09]; PL=[10-15]
<A><PL> - YES
Point to Point A; PL
  • A=00; PL=[01-15]
  • A=[1-9]; PL=[1-9]
  • A=10; PL=[01-15]
  • A=[01-09]; PL=[10-15]
<A><PL>#4#<Int> P2P of local bus NO

In order to add this feature (for the light at least) 2 changes are required

It's a feature that several users have already requested, but I'm currently (very slowly) working on the backup feature, that I think is much more important.

Would you have any interest in helping to develop this feature? I could guide you, unfortunately I doubt I'll find the time to do it by myself soon.

Thanks

piMyHome commented 5 years ago

Thanks @niqdev for looking into this.

Yep, "local bus" is exactly what I am referring to. Adding a drop box for (additional) interfaces would be an overkill, since 98% of users have just the main interface. From my point of view it would be better to allow in address field not just integers, but also # and more characters so that you could enter 33#4#02 for example. I am not a Java developer so I guess "guiding" me will be more work load for you than just extending the address field :-)

niqdev commented 5 years ago

Umh, I need to think about what would be the best UX.

Probably you are right, another dropdown would be overkilling, but there is strict validation on each field of the frame in the library and in order to keep it as clean as possible I would avoid to allow the user to insert anything else than number.

Another solution would be to add in the existing dropdown the Interface sibling and in case the user select the bus value the UI could change from *1*1* [editable WHERE] ## to *1*1* [editable WHERE] #4# [editable BUS] ##

What do you think?

niqdev commented 5 years ago

I've closed the other duplicated issue

niqdev commented 5 years ago

Oh, by the way, at the moment you can still manage light on the bus using the device functionality instead of the light, it's not ideal cos you need to build the frame by yourself, but at least you are not blocked

niqdev commented 5 years ago

@piMyHome I'm currently looking into this, I'd like to close the issues marked as priority ASAP. I have few questions:

piMyHome commented 5 years ago
* would you be available to test this feature once it is in beta testing?

Sure, I'd be happy to assist you

* do you have also the possibility to test automation groups and automations with bus?
  Thanks

Yes

niqdev commented 5 years ago

Awesome, thanks a lot for the support. Today I've already upgraded the library and I need to finish the integration with the app. I'll come back to you as soon as it's ready. Thanks

niqdev commented 5 years ago

@piMyHome I've just released version 3.3.0 in beta testing which adds the support for automation and bus. Looking forward for your feedback, thanks!

piMyHome commented 5 years ago

Thanks @niqdev !

I tried the beta 3.3.0 but it crashes (same result with 3.2.0) when launching the app on my Pixel 2 (Android 9). I've uploaded a crash report in Google Playstore.

According to Playstore, you are located in Biella. If so, I'd be happy to invite you for an espresso to Viverone....

Peter

niqdev commented 5 years ago

Hi Peter! Thanks a lot for the invite! Would you mind if we continue the conversation also regarding the issue via mail info at openwebnet.xyz? Thanks!

niqdev commented 5 years ago

I've just released in beta version 3.4.0, a library that I was using had a nasty bug that is not being address by the maintainer of the project and is causing a lots of issues to other apps too, for more information see #82 and the linked issue. Looking forward for your feedback, you might need to reinstall the app unfortunately. Thanks

piMyHome commented 5 years ago

Unfortunately, 3.4.0 did not pop up yet in Google Playstore for me. I'll try again later/tomorrow and get back to you asap.

niqdev commented 5 years ago

I've released it 1 hour ago, it's usually available within few hours. Thanks