HassIO addon for qwikswitch

Tags: #<Tag:0x00007f32667a2408>

Hi Guys

I need some help, I would like to move to HassIO but there is one config that I need to be able to run. It for a Qwik-switch USB device. I’m not a developer of any sense. so maybe someone here could assist.

I know to get the Qusb device to work, I have to do the following.

run “sudo cp z010_mchp_tools.rules /etc/udev/rules.d”
Run qsusb bin file

And this is what is in the z010_mchp_tools.rules file

2012.01.23 Changed SYSFS reference(s) to ATTR.

2011.12.15 Note: Reboot works on all systems to have rules file recognized.

2010.01.26 Add reference to “usb” for Ubuntu.

2010.01.22 Attempt to further simplify rules files requirements.

2009.08.18 Rules file simplified.

2009.07.15 Rules file created.

ENV{hotplugscript}="/etc/.mplab_ide/mchplinusbdevice"

ACTION!=“add”, GOTO=“check_remove”
SUBSYSTEM==“usb_device”, GOTO=“check_add”
SUBSYSTEM!=“usb”, GOTO=“rules_end”

LABEL=“check_add”

ATTR{idVendor}==“04d8”, MODE=“666”, RUN+="%E{hotplugscript} add"
GOTO=“rules_end”

LABEL=“check_remove”

ACTION==“remove”, RUN+="%E{hotplugscript} remove %E{PRODUCT}"

LABEL=“rules_end”

I don’t know what is involved when creating a addon, and need some assistance

Hi

The only way i found around this was to install the usb device on a other server/pc (mediaserver thats always on) and pointed the config to that IP.

replacing all my Qwikswitches now with Sonoff’s and custom firmware (mqtt) much better anyway and cheaper

Cheers !

Tines_Potgieter, did you manage to get further in creating an addon for the USB Hub for Hassio? I am currently running the USB Hub on my PC and Hassio on my Pi and I really want to free up my PC and move the USB Hub to the Pi.

Hi Music man

I just upgraded to Hassbian 0.70 qwikswitch is component is failing to load, did you have any such issues?

I’m going to buy the Wifi Bridge. it looks like it doesn’t everything as a standalone, just requires power and wifi. Well thats my hope. Ill let you know how it goes, i asked the vendor if the transmitters work with the wifi bridge they said it does, so time to test

Hi Tines, the only thing is that you forgo Home Assistant support as the WiFi Bridge is not supported in HA. The WiFi Bridge isn’t suitable for HA due to the fact that all commands get sent to Qwikswitch servers and there is no direct interface to the WiFi Bridge (i.e. it does not have an API). I did pose this question to QS and it is on the roadmap.

Hi there,

I managed to get an add-on for QS going, but for some reason, it is not picking up the USB Hub on the USB port of my Raspberry Pi. I can log onto the web interface, but it doesn’t see the hub itself.

Anybody wanting to give this a shot?

Logs below:

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 00-banner.sh: executing…

Hass.io Add-on: Qwikswitch USB Hub v1.0
Add-on to start the Qwikswitch USB Hub Web Server
From: Local add-ons
By: you

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing…
[23:39:53+0200] INFO ----> You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
QSUSB V1.91
DEBUG=0
LOGS=0
Listening on Port: 2020
Devices Loaded:0
Crons loaded: 0

Hi folks,

I just want to let you know that I got the Qwikswitch USB Hub add-on working! I went ahead and re-installed my Pi with HassOS and after setting everything up and getting the add-on installed and running, all worked 100%.

Now I wonder if I can get this one published as part of the community add-ons.

Wow thats gr8. I really want it as-well then i can move over to HassIO completely with one Pi only.
Do you know add it to one of the public repo’s or how would i go about testing it?

Hi MusicMan

Did you manage to get your qwikswitch addon into the Community Repo, or maybe created your own one? I’m looking to move to HassIO but can only do it if my QuickSwitch would work.
Thanx for all the time you spend building it.

Hi Tines_Potgieter,

@nleroux created an add-on for Qwikswitch, which I tweaked to consolidate our efforts. It is on his Github repo here - https://github.com/nardusleroux/hassio-qsusb. I liked the idea of doing the config within HassIO instead of the web interface, not to mention that for some reason when you edited a device under the web interface, the device would not save to begin with.

The only aspect that I couldn’t get to work properly was to use the applicable qsusb binary based on the architecture the add-on is running on, but all in all, it is working like a charm on my Raspberry Pi 3b. I’ve been using it for a few weeks now and have had no issues whatsoever.

Just one thing though that I would strongly suggest is that you look at re-installing Hass.io from scratch so that it runs the new HassOS. Under the previous OS that HassIO ran under, the QSUSB would not see the QSUSBHub plugged into the USB port.

I suspect that we’ll only make the effort to get it published once that one last hurdle has been reached which I hope somebody can help with. :slight_smile:

My current HA system is still running Hassbian, I’ve installed a HASSIO on a new Pi, i was just waiting to get a working QSUsb,
Ill give that link as shot tonight, I only have one QSUSB so ill have to move it to the new HassIO to test, and Quickswitch no longer make the USB devices i would really like a spare one for my “lab” for tests.

@Tines_Potgieter, actually Qwikswitch do still make them and have in stock. Give them a call.

So i’m attempting to get the addon it, i’ve added all the file but keep getting this “Can’t read /data/addons/local/qsusb/config.json”
So i’ve created the hello_world added to make sure everything is working on my build. is there anything i can look at? do i leave everything in the config file, like the [HOST] i should change that to my host IP or anything?

So Got it to detect the add on, it seems no the like this " “image”: “hassioaddons/qsusb-{arch}” " i’m sure it will still work without it. so i removed it, going to wait before installing it first want to see if i can get a New QSusb from qwickswith tomorrow. Thanx for all the help and advise

Only a pleasure.

Added the addon, plugged in the devices, work Perfectly thx.
I’ve got of these transmitter that you can add to the config. not sure how to handle them thow. They are working, but some times there is n delay, like its sleeping, or waiting, after n 2-3 wait then press works. weird

I wonder if you could giving me a hand with my qwikswitch setup via the above add-on. Things I’ve done so far:

  1. removed “image”: “hassioaddons/qsusb-{arch}” from the json code (it then loaded the local addon.
  2. Update my configuration.yaml with my Pi ip
  3. Tested lights via the ip:2020 it works

Problem: Homeassistant frontend - light toggles not working

Here’s my logs:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.

[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 00-banner.sh: executing…

parse error: Expected string key before ‘:’ at line 1, column 4
[22:36:46+0200] ERROR ----> Unknown HTTP error occured
parse error: Expected string key before ‘:’ at line 1, column 4
[22:36:46+0200] ERROR ----> Unknown HTTP error occured
Hass.io Add-on: v
parse error: Expected string key before ‘:’ at line 1, column 4
[22:36:46+0200] ERROR ----> Unknown HTTP error occured

parse error: Expected string key before ‘:’ at line 1, column 4
[22:36:47+0200] ERROR ----> Unknown HTTP error occured
parse error: Expected string key before ‘:’ at line 1, column 4
[22:36:47+0200] ERROR ----> Unknown HTTP error occured
From:
parse error: Expected string key before ‘:’ at line 1, column 4
[22:36:47+0200] ERROR ----> Unknown HTTP error occured
parse error: Expected string key before ‘:’ at line 1, column 4
[22:36:47+0200] ERROR ----> Unknown HTTP error occured
By:

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing…
parse error: Expected string key before ‘:’ at line 1, column 4
[22:36:49+0200] ERROR ----> Unknown HTTP error occured
parse error: Expected string key before ‘:’ at line 1, column 4
[22:36:49+0200] ERROR ----> Unknown HTTP error occured
[22:36:49+0200] INFO ----> You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Starting
QSUSB V1.91
DEBUG=0
LOGS=0
Listening on Port: 2020
Devices Loaded:3
Crons loaded: 0
USB Found

1 Like

All’s working 100%.

Hi hfrancis,

Thats great news. May I ask do you have some of those transmitters, I have 4 and 6 button once and i’m experiancing that some times the HA doesn’t respond to the button press after about a minute if pressing it it only triggers.
Just want to find out is it my Setup or HA itself.
I have my qwik switch automations to NoDE Red, now they are working perfectly with the transmitters