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.
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.
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:
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
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
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:
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!
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.
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.
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
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:
Huge thank you for the help here. Couldn’t have done it without you!
Two side topics:
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:
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!
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.
haha. I wish I’d found this 10 days ago. I’ve just gone through the whole process of figuring out HTTP in both Home-Assistant and Node-red. Your post would have saved me approximately 2 days
If anyone’s interested in the node-red side (slightly different headers needed), it’s all here: