Blink temperature not updating

I’m currently on 0.83.2 and calling a hourly call to run the blink update service (blink.blink_update).

The values in my HA do change but they never match the values in the blink app.

If I clip a picture from the app, they show up in HA. I know things are working but I don’t know how to debug this further. Does it matter that I have two blink hubs?

Thanks !

Yes having two blink hubs matters. Only 0.84+ supports multiple blink hubs. I would try updating and checking if that fixes the issue.

I believe the upgrade actually fixed all but one camera. I was avoiding the upgrade because of the lovelace changes, now I have to figure out how to import my hold one to the new one. Thanks a ton!

Any idea why I’m seeing this in the logs?

Connection pool is full, discarding connection: rest.prod.immedia-semi.com

My guess would be too many API calls being attempted at any given moment (for example, home assistant is trying to auto update at the same time as your hourly call to blink_update and one of them is discarded).

Well, after another day of looking at the temperatures, they are still not reporting correctly. They are consistently off by 1 or 2 degrees per camera depending on the room. One room might be off by 4 degrees but it is always off that much; while another camera is exactly 1 degree off every time.

Now, I wonder, does the calibration setting within the blink app do some magic? I recently adjusted the camera temperatures to more accurately reflect the room temperate. Do you think the camera is still reporting to the cloud the original temp and the app on my phone is using some other formula to report temperatures?

Thanks!

@fronzbot, Ok. I think i figured it out.

If you calibrate the camera temperature within the app, it doesn’t change anything on in HA. I’m convinced that the app is doing some type of local manipulation. Hope I’m wrong but that appears to be what is taking place.

So, if this isn’t something that can be fixed - is there a way to take data from blink and do math locally per camera to show the right temperatures?

1 Like

I have not played around with calibration, so that definitely sounds like it might be the root cause here. I’d actually be surprised if they’re doing local manipulation- my guess is that there is a different parameter that is set that my library isn’t reading. So when the library asks for the camera temperature, it retrieves the raw temperature and some other variable contains the calibrated temperature (ie. we should be able to get that information easily).

Either that, or there’s a different api endpoint needed to retrieve calibrated temps.

At any rate, would you mind opening an issue here as a bug report? It would be good to keep track of this in the main library repo.

Thanks for the investigative work!

Done!

Any idea how I could use a template to calculate the F based on the C attribute?

I can easily return a new sensor with a new value based on the temperature but I’d like to have it more accurate by calculating based on the temperature_c attribute.

This works just fine

  temp7:
    friendly_name: "Garage Temperature"
    unit_of_measurement: 'F'
    value_template: "{{ states('sensor.blink_garbage_temperature')| float - 7 }}"

None of these will return the attribute data ( I’m using a different room now but the point is still the same)

value_template: "{{ states('camera.blink_caleb_room.temperature_c') * 1.8000 + 32 | round (2) }}"
value_template: "{{ states('camera.blink_caleb_room.attributes.temperature_c')}}"

I’m confused- you’re trying to calculate the temperature in Fahrenheit based on the Celsius temperature reported by the camera? The temperature_c attribute is, itself, a calculation based on the temperature attribute (both of which you have access too). The “camera.blink_camera_name” temperature attribute reports the same information as the sensor.blink_camera_name_temperature so grabbing the info from the camera attributes is redundant.

Mine is not the same under the camera, F is rounded while C is not. I’m I making this more difficult than it needs to be?

brand: Blink
motion_detection: true
name: caleb room
camera_id: 52981
serial: 100049178
temperature: 74
temperature_c: 23.3
battery: 86

The reason I wanted it more accurate, the F is rounding up or down which makes it a little off from time to time.

Haha, yeah I think you’re over complicating it a bit, but that’s ok :smile:

The temperature reported by Blink is always rounded (ie. it’s always returned as an integer) so the minimum accuracy of Blink’s sensor is limited to 1 degree (F). The temperature_c property is literally just a calculation made from that integer value (see here). So any error in the Fahrenheit value will be present in the Celsius value (plus some because I round the Celcius value to 1 decimal to avoid weird floating point numbers)

Just FYI, my PR to change the temperature to the calibrated version was merged and will be in the next release (0.86) https://github.com/home-assistant/home-assistant/pull/19723

That makes me happy!

I upgraded to 85.1 today; I’ve noticed errors that were not present in the previous build.

Sat Jan 19 2019 13:13:42 GMT-0500 (Eastern Standard Time)

Update of binary_sensor.blink_garbage_camera_armed is taking over 10 seconds

Log Details (WARNING)

Sat Jan 19 2019 13:15:05 GMT-0500 (Eastern Standard Time)

Updating blink sensor took longer than the scheduled update interval 0:00:30

Those are warning, not errors. If the server is taking along time to communicate that will happen, and it doesn’t cause any problems, more of a “heads up, this is taking longer than normal”. That’s not unique to the blink platform, but any platform that communicates with a remote server and doesn’t handle slow connections very well.

Ok, I didn’t see these until the day I upgrade to 85.1; I assumed something must have changed.

I was just trying to use my Blink Sensors on my UI to display outside temp, etc… and I noticed mine haven’t updated lately either (in a couple days). So I just restarted and now I’m getting an “error during setup of blink component” error in the log:

Error during setup of component blink
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
component.setup, hass, processed_config)  # type: ignore
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/blink/__init__.py", line 100, in setup
hass.data[BLINK_DATA].start()
  File "/usr/local/lib/python3.6/site-packages/blinkpy/blinkpy.py", line 83, in start
sync_module.start()
  File "/usr/local/lib/python3.6/site-packages/blinkpy/sync_module.py", line 99, in start
self.videos = self.get_videos()
  File "/usr/local/lib/python3.6/site-packages/blinkpy/sync_module.py", line 148, in get_videos
camera_name = entry['camera_name']
TypeError: string indices must be integers

I’m on HassIO with Homeassistant v0.85.1

Anyone else getting this kind of error?

Already reported and fixed in 0.86.1 :+1:

Here’s some links that discuss the issue:

1 Like