Giter Site home page Giter Site logo

Comments (8)

robcos avatar robcos commented on September 27, 2024

By the way, I'm very happy to help if pointed the right direction. I'm a software developer

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

I don't think this is a problem I can solve elegantly. My component/lightwave library has two control schemes:

  1. pretending to be the official app and communicating with the LW servers that way
  2. using the official lightwave API, which also routes via the LW servers

Neither of these has support for two hubs. All I do is send a message to the LW servers which then deals with the hub. I have no way of extending it to a second hub.

You could set up two hubs with different usernames? But each device could only be paired with one hub. If this is the solution you have in mind I think this should already be achievable by adding another instance of the custom component with a different domain.

a) copy all files from
~/.homeassistant/custom_components/lightwave2
to (say)
~/.homeassistant/custom_components/lightwave2A

b) change the domain references from "lightwave2" to "lightwave2A" in:

line 2 of custom_components/lightwave2/manifest.json
line 1 of custom_components/lightwave2/const.py

My immediate thought is that adding this as functionality into the main component would require a substantial rewrite.

from homeassistant-lightwave2.

robcos avatar robcos commented on September 27, 2024

Two usernames is what I have in mind. Users of HomeAssistant won’t know/care which username is used to toggle a switch. If it is not trivial to support two usernames in the integration I will go the “separate integration” but it would have been nice to be able to upgrade both integrations automatically

from homeassistant-lightwave2.

robcos avatar robcos commented on September 27, 2024

Quick update on this. I never noticed this earlier but the lightwave app does allow you to have multiple "locations", each with is own hub. It's like having multiple accounts under a single user name. You can select one location in the account settings and from that moment on the app only shows switches linked to that hub.
Interestingly, I can't find a way to switch between multiple locations on the my.lightwaverf.com website so it's either a poorly done feature or recently added.

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

Interesting! I'm pretty sure this is new - I briefly looked into having two hubs but it wasn't supported and I found a spot in my house that just about reaches everywhere.

Do you have this set up? It might be straightforward to add support, depending on how it works. If you have the appetite to try, can you increase the level of logging in home assistant, use the app to communicate with devices in the different hubs and send me the output?

from homeassistant-lightwave2.

robcos avatar robcos commented on September 27, 2024

from homeassistant-lightwave2.

robcos avatar robcos commented on September 27, 2024

Great news...it actually just works out of the box. The devices on the new hub were disabled but they were actually there!

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

Ha! Easier to fix than I first thought ;)

from homeassistant-lightwave2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.