diff --git a/admin/img/ikea_symfonisk_remote_gen2.png b/admin/img/ikea_symfonisk_remote_gen2.png new file mode 100644 index 00000000..c617c8cd Binary files /dev/null and b/admin/img/ikea_symfonisk_remote_gen2.png differ diff --git a/admin/img/next_track.png b/admin/img/next_track.png new file mode 100644 index 00000000..91b307da Binary files /dev/null and b/admin/img/next_track.png differ diff --git a/admin/img/play_pause.png b/admin/img/play_pause.png new file mode 100644 index 00000000..a2adf374 Binary files /dev/null and b/admin/img/play_pause.png differ diff --git a/admin/img/previous_track.png b/admin/img/previous_track.png new file mode 100644 index 00000000..ffa0fdc8 Binary files /dev/null and b/admin/img/previous_track.png differ diff --git a/lib/devices.js b/lib/devices.js index 14c8d24c..c7fdcc9c 100644 --- a/lib/devices.js +++ b/lib/devices.js @@ -1516,6 +1516,14 @@ const devices = [ states: [states.button_action_skip_back, states.button_action_skip_forward, states.action_play_pause, states.rotate_left, states.rotate_right, states.rotate_stop, states.battery], }, + { + models: ['E2123'], + icon: 'img/ikea_symfonisk_remote_gen2.png', + states: [states.battery, states.action_play_pause, states.action_track_previous, states.action_track_next, + states.action_volume_up, states.action_volume_down, states.action_volume_up_hold, states.action_volume_down_hold, + states.action_dots_1_initial_press, states.action_dots_2_initial_press, states.action_dots_1_long_press, states.action_dots_2_long_press, states.action_dots_1_short_release, + states.action_dots_2_short_release, states.action_dots_1_long_release, states.action_dots_2_long_release, states.action_dots_1_double_press, states.action_dots_2_double_press], + }, // Hive { models: ['HALIGHTDIMWWE27'], diff --git a/lib/states.js b/lib/states.js index 6e0b9bd4..f4b6eb9f 100644 --- a/lib/states.js +++ b/lib/states.js @@ -1035,8 +1035,8 @@ const states = { action_play_pause: { id: 'button_play_pause', prop: 'action', - name: 'Play/Pause Button', - icon: undefined, + name: 'Play/Pause button', + icon: 'img/play_pause.png', role: 'button', write: false, read: true, @@ -1044,6 +1044,198 @@ const states = { isEvent: true, getter: payload => (payload.action === 'play_pause') ? true : undefined, }, + action_track_previous: { + id: 'button_track_previous', + prop: 'action', + name: 'Previous track button', + icon: 'img/previous_track.png', + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => (payload.action === 'track_previous') ? true : undefined, + }, + action_track_next: { + id: 'button_track_next', + prop: 'action', + name: 'Next track button', + icon: 'img/next_track.png', + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => (payload.action === 'track_next') ? true : undefined, + }, + action_volume_up: { + id: 'button_volume_up', + prop: 'action', + name: 'Volume up button', + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => (payload.action === 'volume_up') ? true : undefined, + }, + action_volume_down: { + id: 'button_volume_down', + prop: 'action', + name: 'Volume down button', + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => (payload.action === 'volume_down') ? true : undefined, + }, + action_volume_up_hold: { + id: 'button_volume_up_hold', + prop: 'action', + name: 'Volume up button hold', + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => (payload.action === 'volume_up_hold') ? true : undefined, + }, + action_volume_down_hold: { + id: 'button_volume_down_hold', + prop: 'action', + name: 'Volume down button hold', + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => (payload.action === 'volume_down_hold') ? true : undefined, + }, + action_dots_1_initial_press: { + id: 'button_dots_1_initial_pressd', + prop: 'action', + name: 'Dot1 button press init', + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => (payload.action === 'dots_1_initial_press') ? true : undefined, + }, + action_dots_1_long_press: { + id: 'button_dots_1_long_press', + prop: 'action', + name: 'Dot1 button long press', + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: false, + getter: payload => (payload.action === 'dots_1_long_press') ? true : (payload.action === 'dots_1_long_release') ? false : undefined, + }, + action_dots_1_short_release: { + id: 'dots_1_short_release', + prop: 'action', + name: 'Dot1 button short release', + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => (payload.action === 'dots_1_short_release') ? true : undefined, + }, + action_dots_1_long_release: { + id: 'dots_1_long_release', + prop: 'action', + name: 'Dot1 button long release', + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => (payload.action === 'dots_1_long_release') ? true : undefined, + }, + action_dots_1_double_press: { + id: 'dots_1_double_press', + prop: 'action', + name: 'Dot1 button double press', + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => (payload.action === 'dots_1_double_press') ? true : undefined, + }, + action_dots_2_initial_press: { + id: 'button_dots_2_initial_press', + prop: 'action', + name: 'Dot2 button press init', + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => (payload.action === 'dots_2_initial_press') ? true : undefined, + }, + action_dots_2_long_press: { + id: 'button_dots_2_long_press', + prop: 'action', + name: 'Dot2 button long press', + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: false, + getter: payload => (payload.action === 'dots_2_long_press') ? true : (payload.action === 'dots_2_long_release') ? false : undefined, + }, + action_dots_2_short_release: { + id: 'dots_2_short_release', + prop: 'action', + name: 'Dot2 button short release', + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => (payload.action === 'dots_2_short_release') ? true : undefined, + }, + action_dots_2_long_release: { + id: 'dots_2_long_release', + prop: 'action', + name: 'Dot2 button long release', + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => (payload.action === 'dots_2_long_release') ? true : undefined, + }, + action_dots_2_double_press: { + id: 'dots_2_double_press', + prop: 'action', + name: 'Dot2 button double press', + icon: undefined, + role: 'button', + write: false, + read: true, + type: 'boolean', + isEvent: true, + getter: payload => (payload.action === 'dots_2_double_press') ? true : undefined, + }, load_power: { id: 'load_power', prop: 'power',