Violet Smart Switch

The Violet Smart Switch sounds interesting :thinking:


A German Hue Blog has posted about and made first experiences.
The concept sounds quite interesting. Unfortunately it does only support devices connected to a hue bridge and the Sonos for now. Let’s see, if it will gain support to further systems. An integration into home assistant would be great and definitely be a selling point to rectify the high price point.

Has anyone already gained some experience with that device?

2 Likes

Got one finally running with HA. Love it!
You have to use this version of the Hue emulator; core/README.md at master · finopsfuntimes/core · GitHub

It’s pretty nice and easy to set up.

1 Like

Would I still be able to use this if I use a Hue Bridge but use my Home Assistant scenes or run other automations using the switch

UPDATE - Points 1, 3 and 4 were resolved with the removal of the Hue device manager that HA auto added to my install. I’ll leave the original comment in place in case anyone else experiences the same, but wanted to clarify that those issues were caused by my HA install and not the Violet switch itself.
Full summary of the fix here:
Violet Smart Switch - #19 by noobey

I have one of these switches, and if I’m honest I bought it squarely because of @Ullizzz comment above.
Being able to integrate it with HA was the key for me.

However, I can’t recommend it to people.
It’s quite a pain if I’m honest…
Key issues right now:

  1. The price. For what it costs £180, I’d expect it to work reliably, and be very polished.
  2. The UI isn’t great and is lacking a ton of things. In Sonos for example, there no search or ability to shuffle tracks.
  3. The reliability of the switch is driving me nuts. I have scenes randomly triggering, and since installing the switch my lights will go through a disco routine at random times of the day. The first one I had did this, they replaced it and now this one seems to be doing it intermittently.
  4. Getting it to play nice with HA is probably the biggest issue for me right now (this might be the fault of the HA plugin). Every 2-3 days the switch will no longer see HA and I have to set it up again from scratch each time. Today however, no matter what I try, despite the emulated Hue logs showing the switch is registered, the switch refuses to acknowledge HA and will not register, making it completely unusable.

Overall, this is probably the slickest looking smart light switch we can get in the UK, but my experience with it has been very negative. My wife hates it.

If anyone has any ideas on anything I can try to get it working with HA again, please let me know!

Short answer is yes, if I’ve understood you correctly.

Did you run the version i linked to? I have a somewhat altered but not maintained version myself, only difference is that its an older version that gives possibilities to display sensor value that has been working fine (reason i posted earlier).

I have min still on the workbench so it’s powered on and off quite often without loosing connection, but also been on for weeks without any strange behavior.

I do somewhat agree on #2, but it does what they say it should. Would love to see more features though.

Ps, if you want to test with my version (doubt it fixes it but who knows) just use ullizzzz:core:master build.
Running dev v. 0.0.5

1 Like

Hi @Ullizzz thanks for the reply!
Yep when it works, it works fine and I followed the original instructions.
For no reason I can see it stopped working completely yesterday. I’ve uninstalled and reinstalled the add on and erased the switch, but no joy.

Just tried your version, and it results in the same behaviour but there’s one difference, it auto-populated a separate bridge IP of 192.168.1.112 which is odd, as I don’t have anything at that IP and the switch cant resolve it either.

First of, how do you run you HA instance? Do you have anything else running port 80/443 on HA?

If there is an issue with self activating scenes i would recommend you to get in touch with Violet, I’m sure they will help you out in this case.

Hi @Ullizzz I run HA as a VM on my Synology.
When I resolve (HA IP):80 I get a 403 forbidden error with the Hue emoticon. I have nothing else running on 80 or 443.

I reached out to Violet, and they’ve actually been really good and responsive. Theyve advised that they can remotely see error 500 and it looks like its the emulated Hue plugin causing the issue.
I’m not sure what error 500 response is, or how to resolve it. I also can’t see how to report the issue on that github branch, so I’m a little stuck I think.

Hey, I’m the guy who did the Home Assistant / Emulated Hue thing, hopefully I can help with the 500 error… (HTTP 500 just means ‘internal server error’ by the way - it’s not very helpful to tell us exactly what’s going wrong unfortunately!)

Did anything change in HA from when it was working vs now? Like did you install any updates, add/delete any scenes or devices?

Try hitting the URL (HA IP):80/api/config - no authorisation required at that URL.

Also try turning on verbose logging from the add-on’s config tab and (after restarting the add-on) see if you get any more detailed info in the log.

There’s also a file you could inspect, which is where some of the config is persisted - you can find it from file editor > /config/hass-emulated-hue/emulated_hue.json

1 Like

Hi @finopsfuntimes thanks for the response!
Nothing has changed. It was working after I applied the latest HA updates.

It’s a really odd one.

Verbose mode is on, and doesn’t show any errors.
(Happy to share output if you think it would help)

Here’s what I see in the verbose mode when I try to register the light switch:


at the same time, the switch will say it’s failed.

Here’s what (HA IP):80/api/config shows me in chrome:

I cant see anything out of place in /config/hass-emulated-hue/emulated_hue.json but I should stress I’m a novice user so don’t know what I should be looking for. There are a ton of things listed in there and there’s also a backup file in the same folder.

Happy to try anything else you can suggest.
Thanks for being so patient with me!

No worries - so it looks like everything is running OK but there’s probably some scenario you’ve got setup in HA that my code isn’t handling properly. It would be useful to know which API calls are actually giving the 500 error - if the Violet guys gave you that info that would be helpful, or if not… have you ever used Postman? Download Postman - that would be the best tool for us to do some troubleshooting!

1 Like

If Postman is new to you, it’s easy enough to do some quick checks without that…

Firstly, you need to know the ID that’s been granted to the switch. We can get that from the emulated_hue.json file mentioned previously. It will be right at the bottom, just copy the value of ‘username’ as we’ll use that in the test.

Then we just need to compose three urls to test:
(HA IP)/api/(username copied from above)/groups
(HA IP)/api/(username copied from above)/scenes
(HA IP)/api/(username copied from above)/lights

Open them in a browser one by one and you should get a load of data displayed. If not, then that probably tells us a bit more about where the issue is.

I think I’ve found the error inside HA.
Do any of these help? If not happy to try Postman.



Interesting, so do you also have an actual Philips Hue on your network, as well as the Emulated Hue on HA?

Looks like you have the Hue integration installed - Philips Hue - Home Assistant (home-assistant.io) ? If so, and you aren’t using it to connect to a real life Hue hub, then I suggest removing that integration from HA as that could be causing issues.

1 Like

Aha! Well spotted.

I have no Hue products, HA discovered that by itself when I enabled Emulated Hue, so I assumed I needed to add it.
I’ve removed it now, and it’s gone back to the discovered area of my devices, I’ll hit ignore:

However, despite removing the Hue device and restarting HA, the light switch still will not register.
The logs for emulated Hue are showing me something new though, 192.168.0.223 is my light switch:

Does this help?

Did you update Emulated hue as well? Just had a quick look at my setup and had some similar issues after updating HA. 0.0.6 of Emulated Hue got everything back on track.

Don’t add the hue integration, that gave me an endless loop of entities. Just hit ignore

1 Like

That did it!!!

I want to say a huge thank you to @Ullizzz and @finopsfuntimes for their patience in helping me resolve this.

For anyone else having this issue, here’s what happened and how to fix it:

  1. Home Assistant see’s the emulated Hue bridge as a new device and tries to add it to your devices.
  2. If it does this, you’ll start to see the behaviour I saw, which can be intermittent at times.
  3. Remove the device and then in add-ons remove the Hue Bridge Emulator and restart HA.
  4. Reinstall the Hue Bridge Emulator and pair the switch as per the instructions here.

Huge thank you for the help here. Couldn’t have done it without you!

Two side topics:

  1. I cannot get the hold gesture to work. Double tap will play and pause music, but hold does nothing despite being configured in the settings.
  2. DO NOT HARDWIRE YOUR SONOS SPEAKERS. A huge issue I faced at first with this switch was slowness when controlling the Sonos speakers. I thought maybe wiring them in would speed it up. I have 9 sonos speaker systems at home. Despite only one being wired in, it resulted in Sonos automatically broadcasting a hidden mesh network (SonosNet) for the other speakers to join. This caused all sorts of issues on my home network from DHCP failures to wifi dropouts. Unplugging the Sonos resolved it, but the drawback I guess is that the Sonos UI on the switch is a little slower.

Violet team, if you’re reading this, a native Home Assistant integration would go a very long way.
In fact, here’s my list of asks:

  • Feedback when you press a button to acknowledge it’s been pressed and which button was pressed. Either a beep, or if there’s no internal speaker, a glow/flash emanating from which button the press was registered.
  • A native Home Assistant integration. It’s great that devoted and clever users have figured out a way to hack a solution, but a native option could be so much more powerful and allow for more than just scenes. e.g. open blinds to a %, see door states opened/closed, still frames from home CCTV in HA, etc.
  • Custom wake screens. Maybe an image or live feed from an IP camera in HA.
  • Make use of the sensors in the unit to give us the option to have it wake on walk up, like a Nest thermostat does.
  • A better UI. The UI right now is not bad, it’s pretty efficient and it doesn’t look tacky. But I’d love to see some customisation or the ability to log in via a web UI to change the size of buttons, add useful bits of info, have the wake screen be the weather.
  • Allow for better customisation of gestures. I don’t use my Sonos system as much as I use the lights. I’d love to walk in, double tap for the lights, triple tap for a HA routine (coffee machine!).
  • Improve the Sonos integration. Add shuffle, search, etc.
  • Look at a few other integrations such as Logitech Harmony, etc
  • The support from Violet was great. Super responsive. Please keep this up. I’d rather pay more to deal with a good company than pay less to deal with a pain.

Overall I do actually like this switch, and have confidence it will be very prominent in other smart homes. But for it to get there sooner, and for me personally to buy one for each room with a Sonos in it the price either needs to come down significantly or the switch needs to do more.

Hope this helps someone else further down the line!

2 Likes

With the new HTTPviaSD integration, things are easier.

I’ve made it similar to the way my flic hub sends messages to keep things consistent for me.

put this onto an SD card and call it requests.yml
Then load it onto the switch.

---
version: 1.0
scenes:
  id1:
    label: Button 1
    label2: Click
    request:
      uri: http://192.168.xx.xxx:8123/api/webhook/abcd1234abcd123-violet
      method: POST
      headers:
        Content-Type: application/json
      body: '{ "button_name": "violet_1", "click_type": "click" }'
  id2:
    label: Button 2
    label2: Click
    request:
      uri: http://192.168.xx.xxx:8123/api/webhook/abcd1234abcd123-violet
      method: POST
      headers:
        Content-Type: application/json
      body: '{ "button_name": "violet_2", "click_type": "click" }'

Then create an automation to catch the webhook calls.
In this example it sends a telegram message.

automation:
  - id: violet_webhook
    alias: events from Violet Switch - Webhook
    mode: parallel
    
    description: >
      Violet commands http via ssd
      Receive as Webhook

    trigger:
      - platform: webhook
        id: "violet"
        webhook_id: !secret violet_webhook
  
    variables: 
      button_name: "{{ trigger.json.button_name }}"
      click_type: "{{ trigger.json.click_type }}"

    action:   
      - choose:
      
          - conditions: "{{ button_name == 'violet_1' and click_type == 'click' }}"
            sequence:

              - service: telegram_bot.send_message
                data:
                  target: !secret telegram_chat_id
                  title: "test"
                  message: "Test"

Hope someone finds this useful.

1 Like