Setup Qwikswitch USB

Hello all,

Am a noob when it comes to HA and linux for that matter.

Am struggling to setup the Qwikswitch component and USB modem. Does anyone have a walk through, as the patchwork of info I have put together at this stage doesn’t seem to be getting me to where I’d like to end up.

Thanks.

DM

Hi Danial,

Do you have a working QSMobile app & have you added all your relays etc there?

Once you have that you point the HASS qwikswitch config toward the same interface IP & port (2020 by default), so IP:2020

Regards,
Johann

do i have a working QSMobile app - haha - that’s where i’m stuck… :frowning:

this is all a bit new to me, so you’ll need to excuse my lack of experience.

this is what i’ve done thus far:

  1. bought the usb modem last friday

  2. installed the modem and it’s app on my windows pc - this i downloaded from the QS website - everything works - am able to operate my ON-OFF relay just as mentioned on the box.

  3. fired up the PI and edited the configuration.yaml as per the info on the HA components page - got nothing…

  4. remembered that i need to to “install” the app (version 1.9 from the QS website) onto the Pi - finally figured this out late last night but have no idea it i was successful or not and as the hassbian image is headless and i haven’t figured out how to run a browser to be able to log into the usb GUI to see if the damn thing works…

  5. figured that I needed to setup switches and lights - but am not sure where (have tried putting it in my sensors.yaml thus far) but fear that i’m getting the coding wrong and i do not see any toggle buttons on my homepage, neither can i figure out the error code given in the dev tools window as it only tells me that there is an error with “a component”

D.

am currently imaging a fresh rasbian jessie install with pixel so that i can “see” what i’m doing whilst i give the usb modem install another go…

going to try and use the terminal to install the modem as much as possible but then will use chromium to log into the qs app to see if I can control the relay.

hi johann,

trust you are having a good PPH this woman’s day?

as mentioned in previous reply, i setup another Pi with the GUI and ran through the process of setting up the qsusb.

being able to see what was going on, i figured out that i needed to run the qsusb executable (and keep it running) in order for the pi to “see” the usb modem. also figured out that i needed to crontab the exe on reboot to get the usb to be activated each time the unit reboots.

where i’m stuck now is with the config of the various yaml files so that the buttons and the relays are configured.

please could i get a bit of help with this as the components page on the HA website is not very clear?

thanks

DANIAL.

hi,

relay is up and running, but i don’t understand the setup of the button_events as listed in the component description:

automation:

  • alias: Action - Respond to button press
    trigger:
    platform: event
    event_type: qwikswitch.button.@12df34
1 Like

Have you managed to figure this out? I am at the same point as you trying to figure out what the event_type and event_data should be

hello,

yes, the qwikswitches are up and running. automation also running on one of the relays on the bathroom fan.

just make sure that all the devices are listed correctly in your devices file in the qsusb folder on the pi.

the entity id shown in the automation below must be the same name as listed in the devices file.

here is the setup:

from configuration.yaml

qwikswitch:
  url: http://127.0.0.1:2020
  button_events: TOGGLE,SCENE EXE,LEVEL

from the automation.yaml: (to recognise a button press - change the @butID to your button) in this automation i control a 3rd party device also connected to the system

- alias: Action - Respond to button press
  trigger:
    platform: event
    event_type: qwikswitch.button.@butID
  action:
    service: light.TOGGLE
    entity_id: light.Yeelight_1

also from the automation.yaml to switch off the fan after 1hour:

#Automatically turn off the ensuite bathroom fan
- alias: Ensuite fan auto off
  condition: []
  id: '1507146824836'
  trigger:
  - entity_id: light.bedroom_1_ensuite_fan
    from: 'off'
    platform: state
    to: 'on'
 action:
  - delay:
      minutes: 60
  - alias: Turn off fan
    data:
      entity_id: light.bedroom_1_ensuite_fan
    service: light.turn_off
1 Like

Thank you for this danialFACT. This is exactly whatI am looking for.

awesome stuff - happy to help! :wink:

shout if you need anything else.

D.