{"action":"created","issue":{"url":"https://api.github.com/repos/patrickjahns/esp_rgbww_firmware/issues/5","repository_url":"https://api.github.com/repos/patrickjahns/esp_rgbww_firmware","labels_url":"https://api.github.com/repos/patrickjahns/esp_rgbww_firmware/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/patrickjahns/esp_rgbww_firmware/issues/5/comments","events_url":"https://api.github.com/repos/patrickjahns/esp_rgbww_firmware/issues/5/events","html_url":"https://github.com/patrickjahns/esp_rgbww_firmware/issues/5","id":194034792,"number":5,"title":"Feature: Store pre-defined color sequences for easy reference","user":{"login":"ShuzzDE","id":23746437,"avatar_url":"https://avatars.githubusercontent.com/u/23746437?v=3","gravatar_id":"","url":"https://api.github.com/users/ShuzzDE","html_url":"https://github.com/ShuzzDE","followers_url":"https://api.github.com/users/ShuzzDE/followers","following_url":"https://api.github.com/users/ShuzzDE/following{/other_user}","gists_url":"https://api.github.com/users/ShuzzDE/gists{/gist_id}","starred_url":"https://api.github.com/users/ShuzzDE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShuzzDE/subscriptions","organizations_url":"https://api.github.com/users/ShuzzDE/orgs","repos_url":"https://api.github.com/users/ShuzzDE/repos","events_url":"https://api.github.com/users/ShuzzDE/events{/privacy}","received_events_url":"https://api.github.com/users/ShuzzDE/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-07T12:17:30Z","updated_at":"2016-12-07T12:47:55Z","closed_at":null,"body":"I'd love to be able to do the following:\r\n- POST a sequence of fade commands for storage in SPIFF under a unique name for later execution. \r\n- POST some kind of \"execute sequence\" command to start the sequence of fades.\r\nAlso, it should be possible to make the controller execute a given sequence a defined number of times or indefinitely (looping).\r\nThis would essentially make the controller truly programmable, e.g. store a fire simulation for creating a cosy atmosphere when cuddling on the sofa with your SO or pre-program some wild color sequences for the next party."},"comment":{"url":"https://api.github.com/repos/patrickjahns/esp_rgbww_firmware/issues/comments/265438697","html_url":"https://github.com/patrickjahns/esp_rgbww_firmware/issues/5#issuecomment-265438697","issue_url":"https://api.github.com/repos/patrickjahns/esp_rgbww_firmware/issues/5","id":265438697,"user":{"login":"ShuzzDE","id":23746437,"avatar_url":"https://avatars.githubusercontent.com/u/23746437?v=3","gravatar_id":"","url":"https://api.github.com/users/ShuzzDE","html_url":"https://github.com/ShuzzDE","followers_url":"https://api.github.com/users/ShuzzDE/followers","following_url":"https://api.github.com/users/ShuzzDE/following{/other_user}","gists_url":"https://api.github.com/users/ShuzzDE/gists{/gist_id}","starred_url":"https://api.github.com/users/ShuzzDE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShuzzDE/subscriptions","organizations_url":"https://api.github.com/users/ShuzzDE/orgs","repos_url":"https://api.github.com/users/ShuzzDE/repos","events_url":"https://api.github.com/users/ShuzzDE/events{/privacy}","received_events_url":"https://api.github.com/users/ShuzzDE/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T12:47:55Z","updated_at":"2016-12-07T12:47:55Z","body":"Rough ideas for a possible interface:\r\n\r\n**/sequence**\r\n_GET_ returns a list of stored sequence names by name as a JSON array: \r\n{\"stored\":[\"fireplace\",\"party\",\"strobe_fast\",\"rainbow_slow\"]}\r\n_POST_ stores a new sequence. Sequence is stored in SPIFF which should allow for plenty of space for user-defined sequences/animations.\r\nBody: \r\n{\"name\":\"[A-Za-z0-9._]*\",\r\n\"sequence\": [\r\n{\"hsv\":{\"h\":(HUE),\"s\":(SAT),\"v\":(VAL),\"ct\":(COLORTEMP,},\"cmd\":\"(fade|solid)\",\"t\":(TIME),\"d\": (0|1)},\r\n{\"hsv\":{\"h\":(HUE),\"s\":(SAT),\"v\":(VAL),\"ct\":(COLORTEMP,},\"cmd\":\"(fade|solid)\",\"t\":(TIME),\"d\": (0|1)},\r\n{\"hsv\":{\"h\":(HUE),\"s\":(SAT),\"v\":(VAL),\"ct\":(COLORTEMP,},\"cmd\":\"(fade|solid)\",\"t\":(TIME),\"d\": (0|1)},\r\n{\"hsv\":{\"h\":(HUE),\"s\":(SAT),\"v\":(VAL),\"ct\":(COLORTEMP,},\"cmd\":\"(fade|solid)\",\"t\":(TIME),\"d\": (0|1)}\r\n]\r\n}\r\nNote: the \"sequence\" array would basically contain the same objects as in the normal requests to /color, just without the \"queue\" parameter as it doesn't make sense in this context. It could be present, but would be ignored (and also not stored).\r\nRAW support would be equally possible, as long as only one type of transition is used (RAW or HSV, but never both in a single sequence).\r\n\r\n\r\n**/sequence/{id}**\r\n_GET_ return the contents of the sequence with name {id} as a JSON object, format see above.\r\n_DELETE_ removes the sequence with name {id} from SPIFF. It will no longer be callable.\r\n_PUT_ store another version of this sequence with name {id}. If using PUT, the \"name\" field in the JSON may be ommited but MUST match the {id} if present. New sequences may also be created this way.\r\n\r\n**/sequence/{id}/run**\r\n_POST_ runs the sequence. POST-Body: {\"repetitions\":<INTEGER>}\r\n\"repetitions\" defines how often the sequence should loop, 0 meaning \"infinite\".\r\n"}}
{"actor":{"display_login":"ShuzzDE"}}