fronzbot / blinkpy

A Python library for the Blink Camera system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add force temperature refresh of individual camera

Tahlor opened this issue · comments

Is there a way to ensure camera temperatures are contemporaneous?

With the Blink app, I seem to be able to manually request the camera to sync the temperature with the sync module/server, which can be several hours out of date. It seems like the blinkpy doesn't support this?

I.e., my understanding is that "refresh" in the various blinkpy modules refers to syncing with the server, not refreshing each camera per se (though other kinds of updates like motion, the camera will presumably have pushed these to the server).

my understanding is that "refresh" in the various blinkpy modules refers to syncing with the server, not refreshing each camera per se

Yeah that's correct. Any sensor data would have had to been communicated by the camera to the sync module. Now, if you have an option in the app to request the camera to sync sensor data that means an API endpoints must exist that we can mimic. We would just need to find that endpoint to add support.

What camera do you have that gives you the sync option? I have a Mini and an XT2 but don't see any sensor syncing options. Maybe I'm not looking in the right spot (or maybe my app/firmware is out of date)

Thanks. When I go to "General Settings" on at least the Blink XT or the Outdoor 3, I can "pull down" the screen to refresh it.

I imagine I'd need to do some MITM SSL hack to infer the API endpoint? I tried the old "Package Capture" app, but couldn't get it to work on even my old devices.

commented

Hi @Tahlor,

for me (with my Outdoor Gen3) it does work with the temperature update.

async def get_temperature(blink):
    await blink.refresh()

    for sync in blink.sync.values():
        await sync.update_cameras()

    for camera in blink.cameras.values():
        print(camera.name)
        print(camera.temperature_calibrated)
        print(camera.temperature_c)