Before going with the integration:
I’m not deleting this integration for the sake of the users that have already purchased the system, however here goes my review of the product. Tons of bugs, great color representation when it works though. It’s been nothing but problems from day 1 and they ended up ingoring me as of today so I’m planning on repurposing the whole hardware to install hyperion in it. The worse thing is the company, I’m just looking up in the internet how to hurt them, how to leave some review that will really impact their bussiness in a bad way. I just hope they go bankrupt. They don’t mind if you have problems with your system. They’ll help the first two weeks, during the trial period and after that you are should better forget about them. I’ve been reseting/restarting the system an average of 3-4 times a month for a whole year and they don’t give a fuck. I’m still doing it and they have decided to ignore me. Once you release them your money, it’s just a roll of a dice. If anything goes wrong, dead money. Black bars don’t work as they should, pretty buggy firmware, very few updates. Camera doesn’t get colors from the area you choose and there’s no way to help it. In manual mode, light strip turns off every few hours and you need to go to the app to manually turn it on again, there’s no other workaround (there is in HA, like polling a turn on call every few seconds, but no for the average user). Light strip goes crazy all of a sudden strobing like nuts, needs reseting the whole system, sometimes more than 1 time. All this issues have been reported to support. Multiple promises, zero solutions. Their final solution has been to just ignore me and leave me with this piece of $h|t of device., bugged and crapped.
Go hyperion, and if you are not that kind of guy, go Govee, no brainer. Tons of happy users with govee.
It’s just a piece of sh%t of company, the most dishonest people I’ve stumbled upon.
I even suspect Hyperion is not much harder to set up than AmbiVision, it’s just a no go.
INTEGRATION
This is not an integration per se as I don’t have the skills to build it. Copying and pasting all the code below will bring a light.ambivision entity into HA controllable through the UI and service calls whithin automations.
It does go slow, but it’s a problem mainly on the device itself. Very little to do there.
If you change your settings through the app (color, brightness,mode,etc…), it won’t update in HA, so this integration is intented to replace the app altogether.
The brains is coded in Node Red. I found unsolvable issues (probably it can be done) whithin YAML. You will need NR and node-red-contrib-color-convert. Version core-2021.7 or higher is required too.
Copy this in your configuration.yaml:
light:
# Ambivision
- platform: template
lights:
ambivision:
unique_id: Ambivision PRO
friendly_name: Ambivision PRO
value_template: "{{states('input_boolean.ambivision_switch')}}"
level_template: "{{states('input_number.ambivision_brightness')}}"
supports_transition_template: false
color_template: "({{states('input_number.ambivision_h_input') | int}}, {{states('input_number.ambivision_s_input') | int}})"
effect_list_template: "{{state_attr('input_select.ambivision_modes', 'options')}}"
effect_template: "{{states('input_select.ambivision_modes')}}"
turn_on:
service: input_boolean.turn_on
entity_id: input_boolean.ambivision_switch
turn_off:
service: input_boolean.turn_off
entity_id: input_boolean.ambivision_switch
set_level:
service: input_number.set_value
data:
entity_id: input_number.ambivision_brightness
value: "{{brightness}}"
set_color:
- service: input_number.set_value
data:
value: "{{ h }}"
entity_id: input_number.ambivision_h_input
- service: input_number.set_value
data:
value: "{{ s }}"
entity_id: input_number.ambivision_s_input
set_effect:
service: input_select.select_option
data:
entity_id: input_select.ambivision_modes
option: "{{effect}}"
Declare this inputs too in your configuration.yaml:
input_boolean:
ambivision_switch:
input_number:
ambivision_brightness:
min: 0
max: 255
step: 1
name: ambivision brightness
ambivision_h_input:
min: 0
max: 360
step: 1
ambivision_s_input:
min: 0
max: 100
step: 1
input_select:
ambivision_modes:
name: ambivision modes
options:
- Intelligent (Capture)
- Smooth (Capture)
- Fast (Capture)
- Average (Capture)
- User (Capture)
- Manual (Mood)
- Fireplace (Mood)
- Rainbow (Mood)
- Nature (Mood)
- Relax (Mood)
- Level (Music)
- Mixed (Music)
- Lamp (Music)
- Flash (Music)
- Frequency (Music)
And finally the flow. Don’t forget to add the local IP of your ambivision camera whithin the udp node, top right corner of the picture. It should be working by now.
[{"id":"234358ef.be73e8","type":"link in","z":"b7ef5764.977e88","name":"udp in","links":["739101b.1743a","7787b073.957a9","7cb925c3.894b4c","85b4a2cc.b5e49","9c0d9c0c.f16ce","be24d192.cfee6","c1264cd7.587e1","ce9d33.9e57b2d","486ea3c6.9e70cc","bd41715a.9864","af55ba0e.bd40f8","30d14b05.8c8fb4","168f4562.469d5b","a222a905.8fe2a8","70a79423.a3236c","3fa96177.3968ce","351dc4d.a641d3c","c93bcb72.bf10b8","fd756662.7d07a8","9535f17c.95958","7677c75a.9148b8"],"x":1355,"y":3840,"wires":[["6c5a0fed.e6fdb"]]},{"id":"6c5a0fed.e6fdb","type":"udp out","z":"b7ef5764.977e88","name":"","addr":"YOUR LOCAL IP","iface":"","port":"45457","ipv":"udp4","outport":"","base64":false,"multicast":"false","x":1520,"y":3840,"wires":[]},{"id":"5918a42c.aa90cc","type":"server-events","z":"b7ef5764.977e88","name":"call_service","server":"9405c3fe.d0a6c","version":1,"event_type":"call_service","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":110,"y":3880,"wires":[["4b3e3bc9.146934"]]},{"id":"a9a7873a.20c508","type":"switch","z":"b7ef5764.977e88","name":"on or off?","property":"payload2.event.service","propertyType":"msg","rules":[{"t":"eq","v":"turn_off","vt":"str"},{"t":"eq","v":"turn_on","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":660,"y":3880,"wires":[["495a5174.80b9d"],["d655e70a.4e3668"]]},{"id":"495a5174.80b9d","type":"api-call-service","z":"b7ef5764.977e88","name":"boolean off","server":"9405c3fe.d0a6c","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.ambivision_switch","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":830,"y":3840,"wires":[["1a1dd9f6.a6e1c6"]]},{"id":"1a1dd9f6.a6e1c6","type":"change","z":"b7ef5764.977e88","name":"Ambivision off","rules":[{"t":"set","p":"payload","pt":"msg","to":"AmbiVision24","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":3840,"wires":[["fd756662.7d07a8"]]},{"id":"d655e70a.4e3668","type":"api-call-service","z":"b7ef5764.977e88","name":"boolean on","server":"9405c3fe.d0a6c","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.ambivision_switch","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":830,"y":3920,"wires":[["c1c0f9c1.288ac8","448ae0e3.8cfa7"]]},{"id":"fd756662.7d07a8","type":"link out","z":"b7ef5764.977e88","name":"","links":["234358ef.be73e8"],"x":1135,"y":3840,"wires":[]},{"id":"9535f17c.95958","type":"link out","z":"b7ef5764.977e88","name":"","links":["234358ef.be73e8"],"x":1195,"y":3920,"wires":[]},{"id":"ec0d1.9cb8cf2f8","type":"link in","z":"b7ef5764.977e88","name":"","links":["6dd8b0.83d3175"],"x":95,"y":4060,"wires":[["19ebe91a.873867"]]},{"id":"19ebe91a.873867","type":"switch","z":"b7ef5764.977e88","name":"Brightness != null?","property":"payload2.event.service_data.brightness","propertyType":"msg","rules":[{"t":"nnull"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":230,"y":4060,"wires":[["9d4040e8.4fd5d"],["5d99e689.9bed78"]]},{"id":"5d99e689.9bed78","type":"switch","z":"b7ef5764.977e88","name":"Brightness_pct != null?","property":"payload2.event.service_data.brightness_pct","propertyType":"msg","rules":[{"t":"nnull"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":220,"y":4100,"wires":[["a34bb1be.348d6"],["d8abaf39.da595"]]},{"id":"d8abaf39.da595","type":"switch","z":"b7ef5764.977e88","name":"hs_color != null?","property":"payload2.event.service_data.hs_color","propertyType":"msg","rules":[{"t":"nnull"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":240,"y":4160,"wires":[["1334151f.d7dcfb"],["acfcb853.f069d8"]]},{"id":"acfcb853.f069d8","type":"switch","z":"b7ef5764.977e88","name":"rgb_color != null?","property":"payload2.event.service_data.rgb_color","propertyType":"msg","rules":[{"t":"nnull"}],"checkall":"false","repair":false,"outputs":1,"x":230,"y":4200,"wires":[["8a07938e.b520e"]]},{"id":"f163d10a.7894f","type":"api-call-service","z":"b7ef5764.977e88","name":"set input number","server":"9405c3fe.d0a6c","version":3,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.ambivision_brightness","data":"{\"value\":\"{{value}}\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":510,"y":4080,"wires":[["3f0a6202.c40e7e"]]},{"id":"9d4040e8.4fd5d","type":"change","z":"b7ef5764.977e88","name":"","rules":[{"t":"set","p":"value","pt":"msg","to":"$round($number(payload2.event.service_data.brightness))","tot":"jsonata"},{"t":"set","p":"targetBrightness","pt":"msg","to":"$round($number(payload2.event.service_data.brightness)/2.55)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":375,"y":4060,"wires":[["f163d10a.7894f"]],"l":false},{"id":"a34bb1be.348d6","type":"change","z":"b7ef5764.977e88","name":"","rules":[{"t":"set","p":"value","pt":"msg","to":"$round($number(payload2.event.service_data.brightness_pct)*2.55)","tot":"jsonata"},{"t":"set","p":"targetBrightness","pt":"msg","to":"$round($number(payload2.event.service_data.brightness_pct))","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":375,"y":4100,"wires":[["f163d10a.7894f"]],"l":false},{"id":"3f0a6202.c40e7e","type":"change","z":"b7ef5764.977e88","name":"set brightness","rules":[{"t":"set","p":"payload","pt":"msg","to":"\"AmbiVision4 OVERALL_BRIGHTNESS={\" & targetBrightness & \"} \\n\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":4080,"wires":[["7677c75a.9148b8","12902006.13821"]]},{"id":"1334151f.d7dcfb","type":"change","z":"b7ef5764.977e88","name":"","rules":[{"t":"set","p":"h","pt":"msg","to":"payload2.event.service_data.hs_color.0","tot":"msg"},{"t":"set","p":"s","pt":"msg","to":"payload2.event.service_data.hs_color.1","tot":"msg"},{"t":"set","p":"payload2.event.service_data.hs_color.2","pt":"msg","to":"$round($number($globalContext(\"homeassistant.homeAssistant.states['input_number.ambivision_brightness'].state\"))/2.55)","tot":"jsonata"},{"t":"set","p":"payload","pt":"msg","to":"payload2.event.service_data.hs_color","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":375,"y":4160,"wires":[["617c269b.231308"]],"l":false},{"id":"617c269b.231308","type":"api-call-service","z":"b7ef5764.977e88","name":"set h","server":"9405c3fe.d0a6c","version":3,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.ambivision_h_input","data":"{\"value\":\"{{h}}\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":470,"y":4160,"wires":[["c892af75.ecb8e"]]},{"id":"c892af75.ecb8e","type":"api-call-service","z":"b7ef5764.977e88","name":"set s","server":"9405c3fe.d0a6c","version":3,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.ambivision_s_input","data":"{\"value\":\"{{s}}\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":590,"y":4160,"wires":[["acffe00a.757a6"]]},{"id":"acffe00a.757a6","type":"color-convert","z":"b7ef5764.977e88","input":"hsv","output":"rgb","outputType":"array","scaleInput":false,"x":730,"y":4160,"wires":[["e1e7c10b.33911"]]},{"id":"e1e7c10b.33911","type":"change","z":"b7ef5764.977e88","name":"Set color","rules":[{"t":"set","p":"r","pt":"msg","to":"payload.0","tot":"msg"},{"t":"set","p":"g","pt":"msg","to":"payload.1","tot":"msg"},{"t":"set","p":"b","pt":"msg","to":"payload.2","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"\"AmbiVision1 R{\" & r & \"} G{\" & g & \"} B{\" & b & \"} \\n\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":4160,"wires":[["7677c75a.9148b8"]]},{"id":"8a07938e.b520e","type":"change","z":"b7ef5764.977e88","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload2.event.service_data.rgb_color","tot":"msg"},{"t":"set","p":"r","pt":"msg","to":"payload2.event.service_data.rgb_color.0","tot":"msg"},{"t":"set","p":"g","pt":"msg","to":"payload2.event.service_data.rgb_color.1","tot":"msg"},{"t":"set","p":"b","pt":"msg","to":"payload2.event.service_data.rgb_color.2","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":375,"y":4200,"wires":[["22f4e893.062a98"]],"l":false},{"id":"22f4e893.062a98","type":"color-convert","z":"b7ef5764.977e88","input":"rgb","output":"hsv","outputType":"array","scaleInput":false,"x":490,"y":4200,"wires":[["cfb932ce.c4821"]]},{"id":"cfb932ce.c4821","type":"api-call-service","z":"b7ef5764.977e88","name":"set h","server":"9405c3fe.d0a6c","version":3,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.ambivision_h_input","data":"{\"value\":\"{{payload.0}}\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":4200,"wires":[["a6cb2a97.664188"]]},{"id":"a6cb2a97.664188","type":"api-call-service","z":"b7ef5764.977e88","name":"set s","server":"9405c3fe.d0a6c","version":3,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.ambivision_s_input","data":"{\"value\":\"{{payload.1}}\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":4200,"wires":[["7dbf602a.1cda6"]]},{"id":"7dbf602a.1cda6","type":"change","z":"b7ef5764.977e88","name":"Set color","rules":[{"t":"set","p":"payload","pt":"msg","to":"\"AmbiVision1 R{\" & r & \"} G{\" & g & \"} B{\" & b & \"} \\n\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":4200,"wires":[["7677c75a.9148b8"]]},{"id":"7677c75a.9148b8","type":"link out","z":"b7ef5764.977e88","name":"","links":["234358ef.be73e8"],"x":1015,"y":4080,"wires":[]},{"id":"21d81454.ff959c","type":"change","z":"b7ef5764.977e88","name":"","rules":[{"t":"set","p":"payload2","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":435,"y":3880,"wires":[["c7ba77d.3d03d88"]],"l":false},{"id":"6dd8b0.83d3175","type":"link out","z":"b7ef5764.977e88","name":"","links":["ec0d1.9cb8cf2f8"],"x":1195,"y":4000,"wires":[]},{"id":"c1c0f9c1.288ac8","type":"delay","z":"b7ef5764.977e88","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":955,"y":4000,"wires":[["5489c1e8.f0988"]],"l":false},{"id":"616bf942.2c0598","type":"comment","z":"b7ef5764.977e88","name":"Ambivision Master","info":"","x":130,"y":3760,"wires":[]},{"id":"5489c1e8.f0988","type":"change","z":"b7ef5764.977e88","name":"Submode","rules":[{"t":"set","p":"payload","pt":"msg","to":"$globalContext(\"homeassistant.homeAssistant.states['input_select.ambivision_modes'].state\")","tot":"jsonata"},{"t":"change","p":"payload","pt":"msg","from":"Intelligent (Capture)","fromt":"str","to":"AmbiVision31","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Smooth (Capture)","fromt":"str","to":"AmbiVision32","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Fast (Capture)","fromt":"str","to":"AmbiVision33","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Average (Capture)","fromt":"str","to":"AmbiVision34","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"User (Capture)","fromt":"str","to":"AmbiVision35","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Manual (Mood)","fromt":"str","to":"AmbiVision32","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Fireplace (Mood)","fromt":"str","to":"AmbiVision33","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Rainbow (Mood)","fromt":"str","to":"AmbiVision34","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Nature (Mood)","fromt":"str","to":"AmbiVision35","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Relax (Mood)","fromt":"str","to":"AmbiVision31","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Level (Music)","fromt":"str","to":"AmbiVision31","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Mixed (Music)","fromt":"str","to":"AmbiVision32","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Lamp (Music)","fromt":"str","to":"AmbiVision33","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Flash (Music)","fromt":"str","to":"AmbiVision34","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Frequency (Music)","fromt":"str","to":"AmbiVision35","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1060,"y":4000,"wires":[["9535f17c.95958","6dd8b0.83d3175"]]},{"id":"448ae0e3.8cfa7","type":"change","z":"b7ef5764.977e88","name":"Mode","rules":[{"t":"set","p":"payload","pt":"msg","to":"$substringAfter($globalContext(\"homeassistant.homeAssistant.states['input_select.ambivision_modes'].state\"), \" \")\t","tot":"jsonata"},{"t":"change","p":"payload","pt":"msg","from":"(Capture)","fromt":"str","to":"AmbiVision21","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"(Mood)","fromt":"str","to":"AmbiVision22","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"(Music)","fromt":"str","to":"AmbiVision23","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":3920,"wires":[["9535f17c.95958"]]},{"id":"12902006.13821","type":"link out","z":"b7ef5764.977e88","name":"","links":["bd819fd7.7966d"],"x":835,"y":4120,"wires":[]},{"id":"bd819fd7.7966d","type":"link in","z":"b7ef5764.977e88","name":"","links":["12902006.13821"],"x":95,"y":4160,"wires":[["d8abaf39.da595"]]},{"id":"4b3e3bc9.146934","type":"switch","z":"b7ef5764.977e88","name":"AmbiVision entity_id","property":"payload.event.service_data.entity_id","propertyType":"msg","rules":[{"t":"eq","v":"light.ambivision","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":300,"y":3880,"wires":[["21d81454.ff959c"]]},{"id":"68566b3e.6b1264","type":"delay","z":"b7ef5764.977e88","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"3","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":555,"y":3880,"wires":[["a9a7873a.20c508"]],"l":false},{"id":"c7ba77d.3d03d88","type":"trigger","z":"b7ef5764.977e88","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"1500","extend":true,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":495,"y":3880,"wires":[["68566b3e.6b1264"]],"l":false},{"id":"9405c3fe.d0a6c","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]
“Manual (Mood)” needs to be enabled in order to change the color of the light. Automation example:
service: light.turn_on
data:
entity_id: light.ambivision
effect: Manual (Mood)
brightness_pct: 100
hs_color:
- 200
- 100
UPDATE 20/05/2022
Minor improvements in the Node Red flow. It should go faster and be more reliable but don’t expect much. To update just replace your whole NodeRed flow with the new one. Everything else stays the same.
If you want to change the entity_id, set your desired name in the configuration.yaml, restart HA.
then add the exact same entity whithin the yellow AmbiVision entity_id node. Save, deploy, done.
UPDATE 06/06/2022
Added some rate limiting rules to the NR flow, everything else stays the same. To update just replace the whole flow with the new one.
AmbiVision’s API seems to struggle from too many requests easily. From this update on only 1 call every 3 seconds is allowed. If you make more than 1 call every 3 seconds, it’ll be rate limited. Don’t force it.