Skip to content

Instantly share code, notes, and snippets.

@JanLoebel
JanLoebel / README.md
Last active March 20, 2024 00:17
Hikam S6 Reverse Engineering (HI3518 E)

Reverse Engineering of Hikam S6 (HI3518 E)

Why?

I wanted to integrate the camera into my home security system. The only problem is that I want to toggle the alarm of the camera based on the security system status. Currently, this is only available via the app or a time trigger which is booth not sufficient for me. So the main target was to change the alarm status without the app.

What I've done so far:

My first try was to capture the TCP packages between the Android app and the camera. Soon I realized that they are only TCP+SSL (not pinned) requests to a cloud service of Hikam. So I installed an emulator with the Hikam app and Wireshark. I've seen some packages but the payload is very strange and even if I send the UDP commands again the status won't change. So this was a dead end for me.

# Inspired by https://medium.com/@tuzzer/cart-pole-balancing-with-q-learning-b54c6068d947
import gym
import numpy as np
import math
from collections import deque
class QCartPoleSolver():
def __init__(self, buckets=(1, 1, 6, 12,), n_episodes=1000, n_win_ticks=195, min_alpha=0.1, min_epsilon=0.1, gamma=1.0, ada_divisor=25, max_env_steps=None, quiet=False, monitor=False):
self.buckets = buckets # down-scaling feature space to discrete range
@gestadieu
gestadieu / README.md
Last active July 19, 2023 23:37
Raspberry Pi Control Dashboard

Requirement: node-red-dashboard. Obviously you will need a Raspberry Pi too!

This is a simple but very useful dashboard to control a Raspberry Pi (similar to Cayenne dashboard for RPi), it includes so far:

  • CPU Temperature
  • CPU Load %
  • Free RAM %
  • Disk Usage %
  • Actions: Shutdown and Reboot buttons

Feel free to fork and and more stuff ;-)

@cedricbonhomme
cedricbonhomme / getfit.py
Created November 16, 2014 00:11
Get your Google Fit data
#! /usr/bin/env python
#-*- coding: utf-8 -*-
import json
import httplib2
from datetime import datetime
from apiclient.discovery import build
from oauth2client.client import OAuth2WebServerFlow