TECH7Fox / sip-hass-card

A SIP client inside home assistant!
MIT License
189 stars 39 forks source link

Bring back the option to use deviceID #80

Open UMB8998 opened 2 years ago

UMB8998 commented 2 years ago

Earlier I was using browser_mod to get the deviceID, but getting this ID could be complicated, the ID can change sometimes and a user can log in to multiple devices.

I tried to use users instead of persons, but this is not possible. The API's don't have users, so I can't compare which one is currently logged in. This is a problem on all sides. (card, integration and add-on.)

So that's why I use persons instead. I know, it's a bit odd to make a person for a device but it was the best and most user friendly solution I could find.

Does this answer your questions?

Originally posted by @TECH7Fox in https://github.com/TECH7Fox/sip-hass-card/issues/26#issuecomment-1028478388

Thank you for the great integration, I was looking for something like this for a long time. We have wall panels with chromium in a raspberry pi installed around the house, It will be much easier for use to use the DeviceID as a extension because is very static for us, there is a way to bring that option back? Can you tell me in which revision was it and maybe I could integrate it myself?

BTW sorry for my bad english

TECH7Fox commented 2 years ago

Thanks! Nice to hear people like this project. :)

Your not the first one to ask this. People with one or multiple dashboards don't like creating persons for them. I only have one for now so it's not that big of a deal, but with multiple I can see how that is weird and annoying.

Btw, you can also have them all register on the same extension, and then the all get dialed and connects with the first one to pickup. But if you have a large house you might only want to call to one or one section, so then you would need multiples extensions indeed.

The deviceID was last used in v0.1.1. It's quite easy to use deviceID instead of person, but it might give you problems since the deviceID will change over time. So I recommend adding the attribute to the url to set the deviceID.

Also, how will it be configured alongside the persons? Maybe add a deviceID textinput to the extension object, and check if it is empty to choose between person and deviceID? That way it's only an added feature and you can still use persons.

Was also considering adding an option for a "global" extension, to always register as that extension. Useful if you're only using the card on wall mounted dashboards or a single device. But that's for another issue.

Good luck! If you make a draft PR you can ask me questions there if you get stuck.

UMB8998 commented 2 years ago

Thank you very much! I will play with it at the weekend and let you know