Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Ability to commit param changes via HTTP? #58

Closed
roflware opened this issue Jan 26, 2021 · 2 comments
Closed

Ability to commit param changes via HTTP? #58

roflware opened this issue Jan 26, 2021 · 2 comments

Comments

@roflware
Copy link

Should it be considered possible to commit param changes via your framework? I am able to pull params for my camera with:

camera = list(api.cameras.values())[0]
print(camera.params)

Which lists parameters, such as 1716: 0, this being the LED. However, when I execute the following def I threw together:

async def async_turn_on_led(self) -> str:
        """Start the camera LED"""
        await self._api.request(
            "post",
            "app/upload_devs_params",
            json={
                "device_sn": self.serial,
                "station_sn": self.station_serial,
                "params": [{"param_type": "1716", "param_value": "1"}]
            },
        )
        await self.async_update()

camera.async_turn_on_led

I still get a status of 1716: 0 for the LED when pulling the params with the above.

Otherwise, if I reuse your async_start_detection function with the values changed for the LED, I have the same issue.

async def async_turn_on_led(self):
        await self.async_set_params({1716: 1})

camera.async_turn_on_led

It does not appear to change the state when I pull the camera params again. Is this expected behavior, not being able to change the state via app/upload_devs_params?

@evilmarty
Copy link
Collaborator

@roflware some params can be changed via the API but what I've noticed is that even though the API may have the updated value, the devices don't always reflect those changes. For instance, using the API to set the guard mode on the station doesn't actually change it on the base station itself. It has to be changed via the P2P API. This is something I am in the process of working on, but until then treat the web API more akin to read only.

@roflware
Copy link
Author

Thanks @evilmarty. As an FYI, I have written the UDP commands (P2P like you said) to send to enable/disable the doorbell after learning the HTTP issue on my own. You can check it out here if you're curious: https://github.com/roflware/eufy-doorbell-reset-doorbell-chime.

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

No branches or pull requests

2 participants