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

Add support for L46N floodlights and possibly the Lorex equivalent #313

Merged
merged 4 commits into from
Nov 10, 2023

Conversation

cchamilt
Copy link
Contributor

@cchamilt cchamilt commented Nov 7, 2023

Hi, Lightingv2 doesn't trigger the floodlights in the later Dahua model L46N. After some exploration and comparison to DMSS call status, it appears that the manual floodlight trigger is only available through the coaxial API. This also requires the table.FloodlightMode.mode to be set to manual or at least not motion detection to stay on. I tried to add it along side the Amcrest work assuming it still works for the older model.

@rroller
Copy link
Owner

rroller commented Nov 10, 2023

I just looked at your profile, we are in the same city :D

@rroller rroller merged commit 2257928 into rroller:main Nov 10, 2023
1 of 3 checks passed
@rroller
Copy link
Owner

rroller commented Nov 10, 2023

@josetann
Copy link

Any possibility to add in support for "V261LC" ? I reported earlier how I got it to work, looks like you went the long (correct) way around, but maybe just adding V261LC would work with your fix?

My prior post: #263

@cchamilt
Copy link
Contributor Author

Hi, I added in detection with m.startswith("V261LC"), but I didn't assign it the Coaxial API and kept the original LightingV2 calls. It may need the Coaxial API as well. I guess it might be a firmware version specific change.

@josetann
Copy link

Hi, I added in detection with m.startswith("V261LC"), but I didn't assign it the Coaxial API and kept the original LightingV2 calls. It may need the Coaxial API as well. I guess it might be a firmware version specific change.

Ah, I must have skipped that particular commit. I bit the bullet and it was there as expected. Except it didn't work. When I tried to turn on or off the light, this error pops up (I had to type it out, it's possible there's a typo in there somewhere):

Failed to call service light/turn_on. 400,message='Bad Request',url=URL(http://192.168.1.78:80/cgi-bin/configManager.cgi?action=setConfig&FloodLightMode.Mode=2')

Does it look like an error in the code, or is it handled differently than the ASH26 (because in prior versions that I hacked in support, I just threw that in the same line as the ASH26 and it worked)?

@cchamilt
Copy link
Contributor Author

Hmm, the floodlight mode should be exclusive to the newer floodlights.

@cchamilt
Copy link
Contributor Author

It appears that the V261LC supports the Coaxial API but not the floodlightmode. So they will need separated out as different floodlight types and the logic split by that instead of Coaxial API support.

@cchamilt
Copy link
Contributor Author

OK, I separated out the floodlightmode logic more clearly for the 4x floodlights. So it shouldn't effect you now. Please check the new PR I just made.

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

Successfully merging this pull request may close these issues.

None yet

3 participants