Skip to content

Commit

Permalink
Added support for IKEA Symfonisk remote gen2 #1724
Browse files Browse the repository at this point in the history
  • Loading branch information
a-i-ks committed Jan 11, 2024
1 parent ef932ce commit 2d54475
Show file tree
Hide file tree
Showing 6 changed files with 202 additions and 2 deletions.
Binary file added admin/img/ikea_symfonisk_remote_gen2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/img/next_track.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/img/play_pause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/img/previous_track.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions lib/devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
196 changes: 194 additions & 2 deletions lib/states.js
Original file line number Diff line number Diff line change
Expand Up @@ -1035,15 +1035,207 @@ 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,
type: 'boolean',
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',
Expand Down

0 comments on commit 2d54475

Please sign in to comment.