Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control Floodlight - Amcrest ASH26-W #151

Open
mpjanofsky opened this issue Jan 26, 2022 · 18 comments
Open

Control Floodlight - Amcrest ASH26-W #151

mpjanofsky opened this issue Jan 26, 2022 · 18 comments

Comments

@mpjanofsky
Copy link

Is your feature request related to a problem? Please describe.
The Illuminator option doesn't appear in Home Assistant for the Amcrest ASH26-W

Describe the solution you'd like
I'd like to be able to control the floodlight on the Amcrest ASH26-W via this integration

@mpjanofsky
Copy link
Author

Trying to find out if it's possible to control the floodlight on the Amcrest ASH26-W via this integration. I'd like to be able to disable it via automations in Home Assistant.

@itkfilelor
Copy link
Contributor

itkfilelor commented Feb 13, 2022

@rroller added it a few releases ago, but I can't seem to get mine working.
Also can't get the ROL working on my AD110 Doorbell.
Everything else [appears] flawless.

EDIT (2/17/22): AD110 ROL is working with the newest updates. Still not getting the floodlight =(

@itkfilelor
Copy link
Contributor

Just submitted a PR (#167) to support ASH26

@mpjanofsky
Copy link
Author

@itkfilelor Awesome, thanks!

@rroller
Copy link
Owner

rroller commented Jun 19, 2022

This was released in https://github.com/rroller/dahua/releases/tag/0.9.40

@mschingel
Copy link

mschingel commented Nov 9, 2022

Can you add the ability to turn on Manual Mode. This is the Only way for the light to function, by first changing the it into Manual mode first. Or change ability to alter the auto off. Otherwise you turn the light on and in seconds it turns right back off. When you switch the it from Manual mode I believe it defaults to stay on much longer default 1/2 Hr.

If you at min add in the duration of the light to stay on, I can setup automation for when the light is switch also alter the duration.

@itkfilelor
Copy link
Contributor

I'll look at it when a get a few minutes. I already had manual mode set via curl before hand.

@mschingel
Copy link

mschingel commented Nov 9, 2022 via email

@mschingel
Copy link

mschingel commented Nov 10, 2022 via email

@mschingel
Copy link

mschingel commented Dec 16, 2022

I'll look at it when a get a few minutes. I already had manual mode set via curl before hand.

Thanks you. @itkfilelor

I went to use manual mode. When I turn on the light it’s light brightness isn’t at 100%. It flickers badly. Can you possibly maybe just have it as an on off vs the Brightness adjustment. I had to switch it back to motion because the light was flickering at 100% which I can see now it’s just not actually at top brightness. Thanks

@itkfilelor
Copy link
Contributor

I'll look at it when a get a few minutes. I already had manual mode set via curl before hand.

Thanks you. @itkfilelor

I went to use manual mode. When I turn on the light it’s light brightness isn’t at 100%. It flickers badly. Can you possibly maybe just have it as an on off vs the Brightness adjustment. I had to switch it back to motion because the light was flickering at 100% which I can see now it’s just not actually at top brightness. Thanks

Sorry this took forever. Too many kids, too many projects.
I took a look back at my scribbles, manual mode is already set when switching the light:
'Manual' == 'On'
'Off' == 'Off'
You may first need to switch the mode via the app under "Floodlight Setting" to manual, there you can set the time out as well. Personally, I have mine set to the minimum (30mins) in case HA hiccups. Switching the mode outside of the app itself is not recommended, it does not play well with the device, probably a code error within the light itself. Change it in the app and all should be fine from there.

As for the brightness, I noticed I was being a dummy when I added support originally and was sending the command to the incorrect endpoint, which is why nothing happened, and I scrapped it entirely as a bad job. I also don't recommend anything over 85% of below 15% (i think, been a while since I played with the brightness) because of the flicker issue and higher power will hasten the death of your LEDs. Mine is set at 50% and is plenty bright enough. My mother complains everytime she stops by after dark. ( The better to keep her away.. ha ha)

I am working it out now. And will report back as soon as I have something I am satisfied with. Should be in the next day or two barring disaster.

@itkfilelor
Copy link
Contributor

I'll look at it when a get a few minutes. I already had manual mode set via curl before hand.

Thanks you. @itkfilelor
I went to use manual mode. When I turn on the light it’s light brightness isn’t at 100%. It flickers badly. Can you possibly maybe just have it as an on off vs the Brightness adjustment. I had to switch it back to motion because the light was flickering at 100% which I can see now it’s just not actually at top brightness. Thanks

Sorry this took forever. Too many kids, too many projects. I took a look back at my scribbles, manual mode is already set when switching the light: 'Manual' == 'On' 'Off' == 'Off' You may first need to switch the mode via the app under "Floodlight Setting" to manual, there you can set the time out as well. Personally, I have mine set to the minimum (30mins) in case HA hiccups. Switching the mode outside of the app itself is not recommended, it does not play well with the device, probably a code error within the light itself. Change it in the app and all should be fine from there.

As for the brightness, I noticed I was being a dummy when I added support originally and was sending the command to the incorrect endpoint, which is why nothing happened, and I scrapped it entirely as a bad job. I also don't recommend anything over 85% of below 15% (i think, been a while since I played with the brightness) because of the flicker issue and higher power will hasten the death of your LEDs. Mine is set at 50% and is plenty bright enough. My mother complains everytime she stops by after dark. ( The better to keep her away.. ha ha)

I am working it out now. And will report back as soon as I have something I am satisfied with. Should be in the next day or two barring disaster.

So I got some time to actually test it. And the results are crap to put it simply. The only reliable results were to set the LightingV2[channel][profile][1].NearLight=50 and AlarmLighting[0][0].Attribute.Brightness to 100
Anything else caused flickering or no light or just no decernable change. So unfortunately, there isn't anything I can really do about it.
What I will do, is hardcode the brightness values which should solve for those who can't get it working.

@mschingel
Copy link

mschingel commented Feb 7, 2023 via email

@itkfilelor
Copy link
Contributor

itkfilelor commented Feb 7, 2023

Thank you, for now I don’t see the light flickering so maybe a prior firmware was causing the issue or outside environment. These Amcrest cameras are finiky it seems. I think the hard code for brightness will help now and later down the road.

As I stated in your other thread, I may have found a working way to toggle smart and manual mode. Running out of time for the night, and the neighbors are going to start thinking I am crazy with my light going on and off lol.
I may have to take my laptop outside this weekend and give it a go during the day.

@mschingel
Copy link

That would be great!

@d0u8l3m
Copy link

d0u8l3m commented May 25, 2023

Hello! Thanks for your work on this, I'm having a weird issue though. I have 3 of these around my house and had them all working fine for about a week. Two are still good, but one now has either the flickering issue or just doesn't respond/turn on at all.

I have them all set to manual in the app, and can control that one's light with the app fine.

I can turn the light on with

Lighting_V2[0][0][0].Mode=ForceOn&Lighting_V2[0][0][1].Mode=ForceOn&Lighting_V2[0][1][0].Mode=ForceOn&Lighting_V2[0][1][1].Mode=ForceOn&Lighting_V2[0][2][0].Mode=ForceOn&Lighting_V2[0][2][1].Mode=ForceOn

that I got from the amcrest git issue which is just brute forcing everything on? Not sure what's different about this one camera, they are all on the same firmware (latest available from the app).

Any help is appreciated, thank you!

@skooj
Copy link
Contributor

skooj commented Jun 11, 2024

It looks like it's been a while since anything has been looked at here, but I am also having issues with this.

It appears as though, if I turn the light on in the app, I am able to use the switch in home assistant to turn the light off. I am, however, unable to turn the light on from the home assistant switch.

I am also getting errors for the switch when I am turning it off and on:
turn on:
Failed to call service light/turn_on. 400, message='Bad Request', url=URL('http://[IP]:80/cgi-bin/configManager.cgi?action=setConfig&FloodLightMode.Mode=2')

turn off:
Failed to call service light/turn_off. 400, message='Bad Request', url=URL('http://[IP]:80/cgi-bin/configManager.cgi?action=setConfig&FloodLightMode.Mode=%7B%7D')

I am not sure what is happening here, but it looks like this is when it's attempting to set the mode to 'manual' when turning the light on. It also appears that it's attempting to send "{}" when turning it off...

Poking around some more, I found that these API calls, on this issue, work fine to turn the lights on and off.

In my current case, I intend to schedule this light to be on all night so setting the light to manual and using those will be fine for me. However, I'm hoping to purchase a second one of these where it would be nice to be able to trigger this between auto and manual.

If anyone has any insight or is able to help fix this, I'd appreciate it!

edit:
I've done some further testing and found that using this branch that I found from this pr lets the home assistant switch work for both on and off without popping up an error.

@jshatch
Copy link

jshatch commented Jul 3, 2024

@skooj Thanks for finding that branch / PR that works, I tried it and sure enough the errors have disappeared and the light functions normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants