h4de5 / home-assistant-vimar

VIMAR by-me integration into home-assistant.io
GNU General Public License v3.0
42 stars 6 forks source link

CLI does not list all lights, how to list/control raffstore #33

Closed AuZ-ASD closed 3 years ago

AuZ-ASD commented 3 years ago

Hi,

again thanks for your example CLI it works great! i only have some questions

  1. the exaple script does list nearly all of my lights... but not all.. what can i do to also get the last two into the list and make them work?
  2. how to list and control the raffstore (https://de.wikipedia.org/wiki/Raffstore) sorry cant find the english word for it.. is it the same?
  3. if i run the example it need some time before it starts to shut on and again off the light. ca 3-4 sec. is this normal? its not issue for me... only want to lett you know

@1. my light are liste as this:

Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo HAUS gesamt
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo KI Osten
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo KI Süden
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo Schlafz. Süden
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo Schlafz. Westen
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo WZ Fenster Süden
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo WZ Gartentür Westen
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo WZ Terrassentür Süden
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo WZ gesamt
load platform light with 21 lights
load platform switch with 2 switches
load platform scene with 2 scenes
363 - Deckenlicht available status: ['on/off']
544 - Kinderzimmer Dimmer available status: ['value', 'on/off']
483 - Strahler Bad Ir available status: ['on/off']
369 - Kasterllicht available status: ['on/off']
457 - 1. Stock Licht available status: ['on/off']
477 - Bad Licht available status: ['on/off']
470 - Bett Schlafzimmer Licht available status: ['on/off']
344 - Couch Licht available status: ['on/off']
383 - Eg Licht available status: ['on/off']
464 - Eingang Schlafzimmer Licht available status: ['on/off']
356 - Esstisch Licht available status: ['on/off']
416 - Garten Licht available status: ['on/off']
423 - Keller Licht available status: ['on/off']
450 - Keller Pc Licht available status: ['on/off']
444 - Keller Tv Licht available status: ['on/off']
430 - Serverraum Licht available status: ['on/off']
403 - Terrasse Licht available status: ['on/off']
376 - Wc Licht available status: ['on/off']
389 - Ein-Aus Zentral Licht Wz available status: ['on/off']
350 - Wickeltisch Licht available status: ['on/off']
409 - Ein-Aus Küche Licht Zentral available status: ['on/off']
Turn on device 444 - Keller Tv Licht
Turn off device 444 - Keller Tv Licht

and in the screenshot: 2021-05-25 19_42_26-VIMAR BY-WEB you can see the lights i have.. the names are little bit mixed up but i marked them by numbers... number 1 is the first in the list 2 the 2nd etc. the two missing one are right hand with the red square.

@2. I think the raffstores are somehow already listed within this "Unknown object .... " lines (see above) screeenie of them within the webgui: 2021-05-25 20_06_10-VIMAR BY-WEB

Regards from vienna ASD

h4de5 commented 3 years ago

try to change lights to switches - those maybe recognized as switches. raff stores are stored in covers

hawedere ;)

AuZ-ASD commented 3 years ago

hi, yes switches did the trick... the two missing are switches...

python3.9 example_switches.py
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo HAUS gesamt
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo KI Osten
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo KI Süden
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo Schlafz. Süden
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo Schlafz. Westen
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo WZ Fenster Süden
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo WZ Gartentür Westen
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo WZ Terrassentür Süden
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo WZ gesamt
load platform switch with 2 switches
load platform scene with 2 scenes
437 - Heizungsraum Licht available status: ['on/off']
396 - Steckdosen available status: ['on/off']
Turn on device 437 - Heizungsraum Licht
Turn off device 437 - Heizungsraum Licht

only "walter" knows why this two are different from the rest..

with the covers i wasnt this lucky ... tried the same.. as with the lights -> swiches this time with covers but obviously they are not "covers"

python3.9 example_covers.py
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo HAUS gesamt
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo KI Osten
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo KI Süden
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo Schlafz. Süden
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo Schlafz. Westen
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo WZ Fenster Süden
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo WZ Gartentür Westen
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo WZ Terrassentür Süden
Unknown object returned from web server: CH_ShutterBlind_Automation / Rollo WZ gesamt
load platform switch with 2 switches
load platform scene with 2 scenes
Traceback (most recent call last):
  File "/opt/home-assistant-vimar-master/examples/example_covers.py", line 81, in <module>
    test_device_id = list(covers)[0]
IndexError: list index out of range

do i need to update as you have commit some stuff?

h4de5 commented 3 years ago

please update to the latest version - I just added this new variant "CH_ShutterBlind_Automation" yesterday

AuZ-ASD commented 3 years ago

genius!

python3.9 example_covers.py
load platform light with 21 lights
load platform cover with 9 covers
load platform switch with 2 switches
load platform scene with 2 scenes
538 - Haus Gesamt Rollo available status: ['clockwise/counterclockwise', 'stop up/stop down', 'up/down']
526 - Ki Osten Rollo available status: ['clockwise/counterclockwise', 'stop up/stop down', 'up/down']
532 - Ki Süden Rollo available status: ['clockwise/counterclockwise', 'stop up/stop down', 'up/down']
513 - Schlafz. Süden Rollo available status: ['clockwise/counterclockwise', 'stop up/stop down', 'up/down']
519 - Schlafz. Westen Rollo available status: ['clockwise/counterclockwise', 'stop up/stop down', 'up/down']
501 - Süden Fenster Rollo Wz available status: ['clockwise/counterclockwise', 'stop up/stop down', 'up/down']
489 - Westen Gartentür Rollo Wz available status: ['clockwise/counterclockwise', 'stop up/stop down', 'up/down']
495 - Süden Terrassentür Rollo Wz available status: ['clockwise/counterclockwise', 'stop up/stop down', 'up/down']
507 - Wz Gesamt Rollo available status: ['clockwise/counterclockwise', 'stop up/stop down', 'up/down']
given device does not support 'on/off' status - available: ['clockwise/counterclockwise', 'stop up/stop down', 'up/down']

will play around with it on the weekend ... dont want to wake all up with running the covers up/down :)

h4de5 commented 3 years ago

optionals = vimarconnection.get_optionals_param("up/down")
# open
vimarconnection.set_device_status(covers[test_device_id]["status"]["up/down"]["status_id"], '0', optionals)
time.sleep(2)
# stop
vimarconnection.set_device_status(covers[test_device_id]["status"]["stop up/stop down"]["status_id"], '1', optionals)
time.sleep(2)
# close
vimarconnection.set_device_status(covers[test_device_id]["status"]["up/down"]["status_id"], '1', optionals)

good luck and have fun!