Smart tablet for smart home

When I was still starting repairs, I decided to place a tablet near the front door to control a smart home and display an image from a camera in the corridor. Therefore, I immediately laid a low-current 4-core cable to the shield (with a total length of about 5 meters).

The main scenario was assumed to be the following: in the morning before leaving the house, when approaching to a hanging tablet, the screen turns on and displays the necessary information, for example, the weather or when the doorbell rings – the image from the camera was displayed.

My smart home is implemented using RPI4 (Home Assistant is spinning on it), a zigbee hub and a Bluetooth dongle.

So the first thing I chose and bought was the cheapest tablet with the following criteria:

  1. The highest possible version of Android OS is desirable

  2. Screen at least 7 inches

  3. “Slim” design

  4. dark color

Found this on a classifieds site Teclast P80X for about 3000 rubles.

The second is the “presence” sensor, it became Qingping CGPR1here the main criterion is the rotary leg, for more precise adjustment of the detection area.

I fixed the tablet to the wall with the help of such stickers (they hold very tightly). The bonus was that there was about 1 cm of free space behind the tablet to place a smart intercom behind it – smartintercom.

input of 4-wire wire 5v and intercom cable

input of 4-wire wire 5v and intercom cable

We start by setting up the tablet – we remove everything that we can remove, we stop all applications that we can stop. Install Home Assistant Mobile and add the application to the battery saver exclusion list.

Battery consumption

We set up the Home Assistant server with which the tablet will connect and here the main and important setting is Permanent connection otherwise, Google will use Google to deliver notifications and there will be a noticeable delay when the screen turns on.

Application settings

The connected tablet is automatically added to the HA server, you need to add the Qingping sensor separately.

Now we need to create an HA automation that, when approaching the sensor, will turn on the tablet screen. It is very simple, HA allows take full control of your tabletfrom issuing custom notifications and adjusting the brightness and volume, to launching other applications.

Screen Turn On Automation Code
alias: Включение экран планшета
trigger:
  - type: motion
    platform: device
    device_id: 80945c30d8c8f6c2dc175020e092403f
    entity_id: binary_sensor.ble_motion_582d34605526
    domain: binary_sensor
condition: []
action:
  - service: notify.mobile_app_P80X_EEA
    data:
      message: command_screen_on
mode: single

It remains to choose and adjust a convenient angle and height of the sensor to minimize false positives.

I got this option

I got this option

final result

final result

The power supply (36) with the tablet is in my shield, I connected it via a Zigbee relay (37):

This solution allows you to make another automation: when the tablet charge reaches more than 80%, it disconnects the tablet from the power supply, when the charge drops below 20%, it turns on charging.

Tablet Charging Automation Code
alias: Окончание зарядки планшета
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.p80x_eea_battery_level
condition:
  - condition: numeric_state
    entity_id: sensor.p80x_eea_battery_level
    above: 80
action:
  - service: switch.turn_off
    data: {}
    target:
      entity_id: switch.0xa4c138ce6caf53aa
mode: single
alias: Начало зарядки планшета
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.p80x_eea_battery_level
condition:
  - condition: numeric_state
    entity_id: sensor.p80x_eea_battery_level
    below: 15
action:
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.0xa4c138ce6caf53aa
mode: single

The tablet without charging in this mode can work for about 3 days.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *