pzim-devdata / tahoma

[UP TO DATE] Command Line Interface to Control ALL Somfy's Devices. 100% functional with ChatGPT
MIT License
5 stars 2 forks source link

Device name resolution fails with multiple common words. #3

Closed paleiadevelopment closed 1 year ago

paleiadevelopment commented 1 year ago

I have a lot of devices like Floor Room, for example "Ground Kitchen". So there will also be 1st Kitchen Ground Bath 1st Bath etc...

Tahoma doesn't let me call up these names, as there is no word that occurs only in one of them. Would it be possible to allow for quote strings to be used in a future version? Like open sunscreen "1st Kitchen Left Atrium" (where 1st Kitchen Left Atrium is the name of the device registered with Tahoma's servers?

best

Tobias

pzim-devdata commented 1 year ago

Yes I could make it like I have made it for sensors. I have made it just for sensors, because we can ask for many sensors in one time with just a part of the name and a specific sensor with [""] and because we can have many sensors in the same room. I will try to make it for other devices (not only sensors) and let you know. I will make it and give you a zip file to test and I wil publish it if it's working. I think next week. If you have any other suggestions let me know now, because when I edit the code the longest work is to publish on github and pypi because I have to modify the code for each and it's the longest part. Excuse me for my english Don't forget to give me star after this ;-)

paleiadevelopment commented 1 year ago

That would be awesome!

I'm currently working on a little UI tool for Windows to control my sunscreens - this "issue" is the only problem I have right now :) If I get it done, I'll host it on Github, maybe it will be useful for others, too.

pzim-devdata commented 1 year ago

Hello, job is done. Let me know if you find a bug ;-)

I have also add a wait functionality for instance : tahoma open shutter kitchen wait for 10 close shutter kitchen

Thanks for your help

paleiadevelopment commented 1 year ago

It works great, thanks so much!!

One small thing: If the name of the device is also part of the name of other devices, I need to write 'Name'. If it is not, then "Name". Would it be possible to make this consistent?

Also a small typo: "Choose a UNIC part" should be UNIQUE.

See the print from console below.

F:\Portable Applications\tahoma>python3 tahoma.py close sunscreen "Erker" There is more than one match. The you gave is not exact. Choose a UNIC part of word from this results as argument or use [''] with the full name : ['EG Erker links', 'EG Erker rechts ', 'EG Erker mitte', 'Erker'] See tahoma --list-names for help.

F:\Portable Applications\tahoma>python3 tahoma.py close sunscreen 'Erker' Output action : CLOSE sunscreen Erker with url : io://2026-9407-8819/5862570

F:\Portable Applications\tahoma>python3 tahoma.py close sunscreen "Kueche links" Output action : CLOSE sunscreen Kueche links with url : io://2026-9407-8819/5642491

F:\Portable Applications\tahoma>python3 tahoma.py close sunscreen 'Kueche links' There is no match. The you gave is not exact. Did you mean : ['EG Erker links', 'EG Erker rechts ', 'Schlafzimmer ', 'EG Erker mitte', 'Balkon', 'Kueche vorne', 'Studio', 'Kueche links', 'Erker', 'Wohnzimmer', 'Bad', 'Treppenhaus'] ? Choose a UNIC part of word from this results as argument or use [''] with the full name If you don't find your device in this results try tahoma --getlist See tahoma --list-names for help.

pzim-devdata commented 1 year ago

OK I will correct this on next update. Thanks The correct syntax is to use bracket too : [ Did you try with this syntax : ["Kueche links"] and not "Kueche links" ?