How to flash Tuya or SmartLife switches over the air

So… no soldering required: https://youtu.be/O5GYh470m5k

git clone https://github.com/ct-Open-Source/tuya-convert
cd tuya-convert
./install_prereq.sh

And you can find other information here:

https://github.com/ct-Open-Source/tuya-convert/blob/master/README.md

Also support with Reddit:

https://www.reddit.com/r/homeassistant/comments/akea2n/flash_your_tuyasmartlife_switches_over_the_air_no/

Fix InnoDB error: The InnoDB memory heap is disabled

160826 14:07:30 mysqld_safe Number of processes running now: 0
160826 14:07:30 mysqld_safe mysqld restarted
160826 14:07:30 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
160826 14:07:30 [Note] /usr/sbin/mysqld (mysqld 5.5.50) starting as process 24167 ...
160826 14:07:30 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160826 14:07:30 [Note] Plugin 'FEDERATED' is disabled.
160826 14:07:30 InnoDB: The InnoDB memory heap is disabled
160826 14:07:30 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160826 14:07:30 InnoDB: Compressed tables use zlib 1.2.8
160826 14:07:30 InnoDB: Using Linux native AIO
160826 14:07:30 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
160826 14:07:30 InnoDB: Completed initialization of buffer pool
160826 14:07:30 InnoDB: Fatal error: cannot allocate memory for the buffer pool
160826 14:07:30 [ERROR] Plugin 'InnoDB' init function returned error.
160826 14:07:30 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160826 14:07:30 [ERROR] Unknown/unsupported storage engine: InnoDB
160826 14:07:30 [ERROR] Aborting

160826 14:07:30 [Note] /usr/sbin/mysqld: Shutdown complete

160826 14:07:30 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
160826 14:07:47 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

If you have something like this, add this entry innodb_use_sys_malloc = 0 into the my.cnf and restarted the MySQL.

How to set locale variables automatically

On macOS of course, because in Ubuntu and other distro you probably already have. So… open terminal and create a new file:

sudo nano ~/.profile

Then paste this two line and save:

export LC_ALL=en_US.UTF-8  
export LANG=en_US.UTF-8

You need to have the mark on “Set locale environment variables on startup” like in the screenshot.