Skip to content

Instantly share code, notes, and snippets.

@nitej
nitej / rmPhotosSaveFav.py
Created September 30, 2017 16:24
rmPhotosSaveFav.py
import photos
albums = photos.get_albums()
favs = photos.get_favorites_album()
albums.append(favs)
all_assets = photos.get_assets()
all_videos = photos.get_assets(media_type='video')
all_assets += all_videos
@nitej
nitej / IR_structure.txt
Created September 11, 2017 21:28
Seville IR Encoding
The IR encoding for the Seville fans follows the structure of the NEC style with some differences. The preamble, 0/1 bits, and the ending pulse are the same. However, it uses 64-bit long codes and about half of the bits are fixed. The typical command looks like this:
pre 0001 0000 0010 0000 0011 0000 0100 0000 0101 0000 0000 0000 0110 0000 0111 0000 post
where this command sets the fan to off with low speed, no oscillation, 0 hrs on the timer, and normal wind. Grouping as nibbles, this command becomes
0x1020304050006070
where this integer is send MSB first. By capturing all possible signals, it can be seen that the general command is: