Addon Hand Gesture Recognition

Hello everyone,

I’m thrilled to announce the release of my first addon project: Hand Gesture Recognition! :smile:

This project utilizes a wall-mounted tablet, an Android IP webcam for real-time streaming protocol (RTSP), and MQTT for seamless interaction with Home Assistant.

I’m excited to share this innovative solution with you all. Check it out and let me know what you think!

6 Likes

Doesn’t install here

24-03-16 09:39:04 WARNING (SyncWorker_1) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Frigate (Full Access) Beta
24-03-16 09:39:04 WARNING (SyncWorker_1) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Frigate (Full Access)
24-03-16 09:39:04 WARNING (SyncWorker_5) [supervisor.addons.validate] Add-on config using incompatible map options, ‘addon_config’ and ‘homeassistant_config’ are ignored if ‘config’ is included. Please report this to the maintainer of Hand Gesture Recognition
24-03-16 09:39:04 WARNING (SyncWorker_2) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Frigate (Full Access) Beta
24-03-16 09:39:04 WARNING (SyncWorker_2) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Frigate (Full Access)
24-03-16 09:39:04 WARNING (SyncWorker_3) [supervisor.addons.validate] Add-on config using incompatible map options, ‘addon_config’ and ‘homeassistant_config’ are ignored if ‘config’ is included. Please report this to the maintainer of Hand Gesture Recognition
24-03-16 09:39:04 INFO (MainThread) [supervisor.store] Loading add-ons from store: 175 all - 0 new - 0 remove
24-03-16 09:39:04 INFO (MainThread) [supervisor.store] Loading add-ons from store: 175 all - 0 new - 0 remove
24-03-16 09:40:47 WARNING (MainThread) [supervisor.addons.validate] Add-on config using incompatible map options, ‘addon_config’ and ‘homeassistant_config’ are ignored if ‘config’ is included. Please report this to the maintainer of Hand Gesture Recognition
24-03-16 09:40:47 INFO (MainThread) [supervisor.addons.addon] Creating Home Assistant add-on data folder /data/addons/data/a7f26584_hand-gesture-recognition
24-03-16 09:40:47 INFO (MainThread) [supervisor.docker.interface] Downloading docker image ghcr.io/potrgani/handgesturerecognition with tag 1.0.2.

Weird, I tried again and even though the add-ons store tells me it failed, it is there.

Please document this.

Forgive my cynicism, but

  1. First time poster with no github history
  2. posts once and ignores responses from myself an @Rudd-O
  3. No documentation
  4. No changelog yet I am prodded to update the addon
  5. Addon with 8MB binary blob (gesture-recognizer.task 8373440 bytes)
  6. Mysterious first log message WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
  7. What happened to the earlier logs?

There is nothing necessarily bad here, but I for one am uninstalling.

No I am too fascinated to uninstall. I went out to my driveway camera and stuck my palm in front of it. Log now says

Restarted MQTT connection
Restarted MQTT connection
2024-03-17 13:27:48,825 - INFO - None
None
2024-03-17 13:28:22,787 - INFO - Open_Palm

Nothing to MQTT though.

Sorry for the late reply, I didn’t notice the comments. I added some documentation, I’m not very experienced in writing it. I also fixed some bugs so everything should work properly now :smile:

The app has some warnings but it works. I’ll fix it when I figure it out.

i tried to install it but no success.

Hi all I think this is a super innovative solution but I can’t get this up and running. Is it working still?

edit: got it. I had the wrong rtsp stream url. For anyone else that’s extremely literal and struggles with these sorts of things, the trick is to test the rtsp address with something like VLC to make sure it works then legit copy/paste into the rtsp box.

It now shows open palm, closed fist, pointing up, etc.

Doesn’t install.

2024-10-29 15:41:38.158 INFO (MainThread) [supervisor.addons.addon] No a7f26584_hand-gesture-recognition addon Docker image Package handgesturerecognition · GitHub found

hey, i was trying to set this up but keep getting the error :exec /usr/local/bin/python: exec format error
im fairly new to this but i dont know what to do in order to fix this.

any help would be wonderful since i really want this to work

First of many thanks for this @potrgani its awesome! :hugs::star_struck:

However yes, i got the SAME coz for some “unknow” reason its pulled the Intel/AMD Docker Image NOT Arm64 for RPI?! :fearful:

~ # docker run -d --name gesture-container ghcr.io/potrgani/handgesturerecognition:1.1.3
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
d840dde3e4b1b19ed17dffd59e8cc006c723f96307ab072f7f5efd26b0683d7a

Looks like needs to Build Yourself… :sunglasses:
@potrgani please could You fix that! :nerd_face:

git clone https://github.com/potrgani/hand-gesture-recognition-ha-addon
cd hand-gesture-recognition-ha-addon
docker build --platform linux/arm64 -t gesture-recognition .
docker run -d --name gesture-container gesture-recognition

BUT i build it on my another RPI400 which i have USB Webcam connected & streaming via motion, however it was looking for /data/ folder which You have on HA/HAOS but my HAOS is running on another RPI5 :grimacing:
@potrgani would be possible to check if there is NO /data/ then it NOT running on HA/HAOS please… :nerd_face:

Anyway now is working on my RPI400 with some work-around its really cool! :sunglasses:
This is my options.json

{
  "rtsp_url": "CAMERA-URL",
  "mqtt_host": "HAOS-IP",
  "mqtt_port": 1883,
  "mqtt_username": "***",
  "mqtt_password": "***",
  "mqtt_topic": "hand_gesture_status",
  "minHandDetectionConfidence": 0.3,
  "minHandPresenceConfidence": 0.3,
  "minTrackingConfidence": 0.3,
  "frameWidth": 1280,
  "frameHeight": 720,
  "reset_hand_status_time": 3
}

2025-05-26 21:15:25,235 - INFO - Victory
2025-05-26 21:15:38,444 - INFO - Open_Palm
2025-05-26 21:15:50,321 - INFO - None
2025-05-26 21:16:20,452 - INFO - None
2025-05-26 21:16:25,338 - INFO - Open_Palm
2025-05-26 21:16:27,018 - INFO - Victory
2025-05-26 21:16:27,855 - INFO - None
2025-05-26 21:16:28,695 - INFO - Thumb_Up
2025-05-26 21:16:39,785 - INFO - Pointing_Up
2025-05-26 21:16:46,419 - INFO - None

Then I was a bit struggling to add to HA/HAOS coz i can see in MQTT mosquito Broker when listing to topic “hand_gesture_status” but i can NOT add as Sensor & its NOT Discoverable automatically… :exploding_head:

This is the FIX needs to run inside HA/HAHOS, to add as Sensor via MQTT now i can see it under MQTT :wink:

mosquitto_pub -h <HAOS-IP>  -t homeassistant/sensor/gesture/config -r -m '{
  "name": "Hand Gesture Recognition Sensor",
  "state_topic": "hand_gesture_status",
  "unique_id": "gesture_sensor_001",
  "device": {
    "identifiers": ["gesture_recognition"],
    "name": "Hand Gesture Recognition",
    "model": "Hand Gesture Recognition HA-Addon",
    "manufacturer": "Potrgani"
  },
  "retain": true
}'

OR to delete

mosquitto_pub -h <HAOS-IP> -t homeassistant/sensor/gesture/config -r -m ''

Hello @potrgani thanks a lot for this cool addon!
Clarify please - installed as addon with Current version: 1.1.3, but released on github 1.1.4 ?
Is 1.1.3 an actual or how to update?

And more - Add-on CPU usage 26 %
I use HA Supervisor on N5105, any way to decrease?