# \[APP\] Shelly - Smart solutions for every home and office

**URL:** <https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765>\
**Category:** Apps\
**Tags:** app, official, homey, homey-pro, homey-cloud\
**Created:** [August 28, 2018, 8:54pm UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765 "2018-08-28T20:54:43Z")\
**Posts on this page:** 20\
**Page:** 77

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [February 15, 2021, 8:21am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1540 "2021-02-15T08:21:33Z")

</div>

> [@Phuturist](#):
>
> > [@Eduardo\_Rodriguez](#):
> >
> > This is what i get:
> 
> Make sure you save the file in UTF-8 format (use a proper file editor).

> [@robertklep](#):
>
> The issue is that the piece of code you posted isn’t formatted using `</>` , so it contains “smart” quotes which JS cannot handle.

Hmmm, pretty sure I pressed the code format button. But here it goes again.

```
const shellies = require('shellies')

shellies.on('discover', device => {
  // a new device has been discovered
  console.log('Discovered device with ID', device.id, 'and type', device.type)

  device.on('change', (prop, newValue, oldValue) => {
    // a property on the device has changed
    console.log(prop, 'changed from', oldValue, 'to', newValue)
  })

  device.on('offline', () => {
    // the device went offline
    console.log('Device with ID', device.id, 'went offline')
  })
})

// start discovering devices and listening for status updates
shellies.start()

```

---

<div class="post-metadata">

**Author:** ![TheFops](https://avatars.discourse-cdn.com/v4/letter/t/ad7895/32.png) [@TheFops](https://community.homey.app/u/TheFops)\
**Post date:** [February 15, 2021, 8:56am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1541 "2021-02-15T08:56:30Z")

</div>

> [@TheFops](#):
>
> updated to 3.0.12 and repaired my Shelly 1L devices, but the button triggers aren’t working. When I press the button, the flow won’t start

Any update on this or do you need some more information?

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [February 15, 2021, 9:06am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1542 "2021-02-15T09:06:33Z")

</div>

> [@TheFops](#):
>
> Any update on this or do you need some more information?

No, I need time.

---

<div class="post-metadata">

**Author:** ![TheFops](https://avatars.discourse-cdn.com/v4/letter/t/ad7895/32.png) [@TheFops](https://community.homey.app/u/TheFops)\
**Post date:** [February 15, 2021, 9:23am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1543 "2021-02-15T09:23:39Z")

</div>

Ok no rush, was just curious.  
Is it possible to downgrade to a previous version so that I can read them as PM/1L and make them work again?

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [February 15, 2021, 9:41am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1544 "2021-02-15T09:41:55Z")

</div>

> [@TheFops](#):
>
> Is it possible to downgrade to a previous version so that I can read them as PM/1L and make them work again?

I wouldnt recommend it, there are too many breaking changes and I cant predict what would happen.

---

<div class="post-metadata">

**Author:** ![TheFops](https://avatars.discourse-cdn.com/v4/letter/t/ad7895/32.png) [@TheFops](https://community.homey.app/u/TheFops)\
**Post date:** [February 15, 2021, 9:52am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1545 "2021-02-15T09:52:26Z")

</div>

Ok than I’ll wait for a fix. Good luck!

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [February 15, 2021, 9:56am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1546 "2021-02-15T09:56:16Z")

</div>

> [@TheFops](#):
>
> Ok than I’ll wait for a fix. Good luck!

I have updated the debug branch. Can you redownload, run the app and trigger and long and short push about 60 seconds after the app has started.

---

<div class="post-metadata">

**Author:** ![TheFops](https://avatars.discourse-cdn.com/v4/letter/t/ad7895/32.png) [@TheFops](https://community.homey.app/u/TheFops)\
**Post date:** [February 15, 2021, 10:03am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1547 "2021-02-15T10:03:31Z")

</div>

Here you go.  
And something else: when I ran the mentioned procedure with the debug app, my flow was working and it sent me a notification a button was pressed!

```
2021-02-15 09:59:56 [log] [ShellyApp] Initializing Shelly App ...
2021-02-15 10:00:37 [log] [ShellyApp] Discovered device with ID 84CCA8ADAD68 and type SHSW-L on IP address 192.168.0.53
2021-02-15 10:00:37 [log] [ShellyApp] Discovered device with ID 84CCA8AC9E33 and type SHSW-L on IP address 192.168.0.52
2021-02-15 10:00:37 [log] [ShellyApp] Discovered device with ID 84CCA8AD58B0 and type SHSW-L on IP address 192.168.0.51
2021-02-15 10:00:37 [log] [ShellyApp] Discovered device with ID 84CCA8ACD848 and type SHSW-L on IP address 192.168.0.50
2021-02-15 10:00:59 [log] [ManagerDrivers] [shelly1L] [0] triggering action event for Shelly 1L Keuken and action event shortpush_1
2021-02-15 10:00:59 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:00:59 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly.id: shelly1l-84CCA8ACD848
2021-02-15 10:00:59 [log] [ShellyApp] args.action.id: 1
2021-02-15 10:00:59 [log] [ShellyApp] state.action: shortpush_1
2021-02-15 10:00:59 [log] [ShellyApp] args.action.name: longpush
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly: {
  id: 'shelly1l-84CCA8ACD848',
  name: 'Shelly 1PM / 1L [192.168.0.50]',
  ip: '192.168.0.50',
  icon: '/drivers/shelly1pm/assets/icon.svg',
  driver: 'shelly1pm',
  type: 'SHSW-L',
  main_device: 'none',
  actions: ['shortpush', 'longpush']
}
2021-02-15 10:00:59 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:00:59 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly.id: shelly1l-84CCA8AD58B0
2021-02-15 10:00:59 [log] [ShellyApp] args.action.id: 3
2021-02-15 10:00:59 [log] [ShellyApp] state.action: shortpush_1
2021-02-15 10:00:59 [log] [ShellyApp] args.action.name: longpush_2
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly: {
  id: 'shelly1l-84CCA8AD58B0',
  name: 'Shelly 1L Babykamer',
  ip: '192.168.0.51',
  username: 'TheFops',
  password: 'AWv4nVnc67LjPjs',
  icon: '/drivers/shelly1L/assets/icon.svg',
  driver: 'shelly1L',
  type: 'SHSW-L',
  main_device: 'none',
  actions: ['shortpush_1', 'longpush_1', 'shortpush_2', 'longpush_2']
}
2021-02-15 10:00:59 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:00:59 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly.id: shelly1l-84CCA8AD58B0
2021-02-15 10:00:59 [log] [ShellyApp] args.action.id: 1
2021-02-15 10:00:59 [log] [ShellyApp] state.action: shortpush_1
2021-02-15 10:00:59 [log] [ShellyApp] args.action.name: longpush_1
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly: {
  id: 'shelly1l-84CCA8AD58B0',
  name: 'Shelly 1L Babykamer',
  ip: '192.168.0.51',
  username: 'TheFops',
  password: 'AWv4nVnc67LjPjs',
  icon: '/drivers/shelly1L/assets/icon.svg',
  driver: 'shelly1L',
  type: 'SHSW-L',
  main_device: 'none',
  actions: ['shortpush_1', 'longpush_1', 'shortpush_2', 'longpush_2']
}
2021-02-15 10:00:59 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:00:59 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly.id: shelly1l-84CCA8ADAD68
2021-02-15 10:00:59 [log] [ShellyApp] args.action.id: 2
2021-02-15 10:00:59 [log] [ShellyApp] state.action: shortpush_1
2021-02-15 10:00:59 [log] [ShellyApp] args.action.name: shortpush_2
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly: {
  id: 'shelly1l-84CCA8ADAD68',
  name: 'Shelly 1L Gang Plafondlamp',
  ip: '192.168.0.53',
  username: 'TheFops',
  password: 'AWv4nVnc67LjPjs',
  icon: '/drivers/shelly1L/assets/icon.svg',
  driver: 'shelly1L',
  type: 'SHSW-L',
  main_device: 'none',
  actions: ['shortpush_1', 'longpush_1', 'shortpush_2', 'longpush_2']
}
2021-02-15 10:00:59 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:00:59 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly.id: shelly1l-84CCA8ADAD68
2021-02-15 10:00:59 [log] [ShellyApp] args.action.id: 2
2021-02-15 10:00:59 [log] [ShellyApp] state.action: shortpush_1
2021-02-15 10:00:59 [log] [ShellyApp] args.action.name: shortpush_2
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly: {
  id: 'shelly1l-84CCA8ADAD68',
  name: 'Shelly 1L Gang Plafondlamp',
  ip: '192.168.0.53',
  username: 'TheFops',
  password: 'AWv4nVnc67LjPjs',
  icon: '/drivers/shelly1L/assets/icon.svg',
  driver: 'shelly1L',
  type: 'SHSW-L',
  main_device: 'none',
  actions: ['shortpush_1', 'longpush_1', 'shortpush_2', 'longpush_2']
}
2021-02-15 10:00:59 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:00:59 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly.id: shelly1l-84CCA8AC9E33
2021-02-15 10:00:59 [log] [ShellyApp] args.action.id: 3
2021-02-15 10:00:59 [log] [ShellyApp] state.action: shortpush_1
2021-02-15 10:00:59 [log] [ShellyApp] args.action.name: longpush_2
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly: {
  id: 'shelly1l-84CCA8AC9E33',
  name: 'Shelly 1L Keuken',
  ip: '192.168.0.52',
  username: 'TheFops',
  password: 'AWv4nVnc67LjPjs',
  icon: '/drivers/shelly1L/assets/icon.svg',
  driver: 'shelly1L',
  type: 'SHSW-L',
  main_device: 'none',
  actions: ['shortpush_1', 'longpush_1', 'shortpush_2', 'longpush_2']
}
2021-02-15 10:00:59 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:00:59 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly.id: all
2021-02-15 10:00:59 [log] [ShellyApp] args.action.id: 999
2021-02-15 10:00:59 [log] [ShellyApp] state.action: shortpush_1
2021-02-15 10:00:59 [log] [ShellyApp] args.action.name: Bij elke actie
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly: {
  id: 'all',
  name: 'Voor elk apparaat',
  icon: '/assets/icon.svg',
  actions: [
    'shortpush_1',
    'longpush_1',
    'shortpush_2',
    'longpush_2',
    'shortpush',
    'longpush'
  ]
}
2021-02-15 10:00:59 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:00:59 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly.id: shelly1l-84CCA8ACD848
2021-02-15 10:00:59 [log] [ShellyApp] args.action.id: 0
2021-02-15 10:00:59 [log] [ShellyApp] state.action: shortpush_1
2021-02-15 10:00:59 [log] [ShellyApp] args.action.name: shortpush
2021-02-15 10:00:59 [log] [ShellyApp] args.shelly: {
  id: 'shelly1l-84CCA8ACD848',
  name: 'Shelly 1PM / 1L [192.168.0.50]',
  ip: '192.168.0.50',
  icon: '/drivers/shelly1pm/assets/icon.svg',
  driver: 'shelly1pm',
  type: 'SHSW-L',
  main_device: 'none',
  actions: ['shortpush', 'longpush']
}
2021-02-15 10:01:07 [log] [ManagerDrivers] [shelly1L] [0] triggering action event for Shelly 1L Keuken and action event longpush_1
2021-02-15 10:01:07 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:01:07 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly.id: shelly1l-84CCA8ACD848
2021-02-15 10:01:07 [log] [ShellyApp] args.action.id: 1
2021-02-15 10:01:07 [log] [ShellyApp] state.action: longpush_1
2021-02-15 10:01:07 [log] [ShellyApp] args.action.name: longpush
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly: {
  id: 'shelly1l-84CCA8ACD848',
  name: 'Shelly 1PM / 1L [192.168.0.50]',
  ip: '192.168.0.50',
  icon: '/drivers/shelly1pm/assets/icon.svg',
  driver: 'shelly1pm',
  type: 'SHSW-L',
  main_device: 'none',
  actions: ['shortpush', 'longpush']
}
2021-02-15 10:01:07 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:01:07 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly.id: shelly1l-84CCA8AD58B0
2021-02-15 10:01:07 [log] [ShellyApp] args.action.id: 3
2021-02-15 10:01:07 [log] [ShellyApp] state.action: longpush_1
2021-02-15 10:01:07 [log] [ShellyApp] args.action.name: longpush_2
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly: {
  id: 'shelly1l-84CCA8AD58B0',
  name: 'Shelly 1L Babykamer',
  ip: '192.168.0.51',
  username: 'TheFops',
  password: 'AWv4nVnc67LjPjs',
  icon: '/drivers/shelly1L/assets/icon.svg',
  driver: 'shelly1L',
  type: 'SHSW-L',
  main_device: 'none',
  actions: ['shortpush_1', 'longpush_1', 'shortpush_2', 'longpush_2']
}
2021-02-15 10:01:07 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:01:07 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly.id: shelly1l-84CCA8AD58B0
2021-02-15 10:01:07 [log] [ShellyApp] args.action.id: 1
2021-02-15 10:01:07 [log] [ShellyApp] state.action: longpush_1
2021-02-15 10:01:07 [log] [ShellyApp] args.action.name: longpush_1
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly: {
  id: 'shelly1l-84CCA8AD58B0',
  name: 'Shelly 1L Babykamer',
  ip: '192.168.0.51',
  username: 'TheFops',
  password: 'AWv4nVnc67LjPjs',
  icon: '/drivers/shelly1L/assets/icon.svg',
  driver: 'shelly1L',
  type: 'SHSW-L',
  main_device: 'none',
  actions: ['shortpush_1', 'longpush_1', 'shortpush_2', 'longpush_2']
}
2021-02-15 10:01:07 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:01:07 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly.id: shelly1l-84CCA8ADAD68
2021-02-15 10:01:07 [log] [ShellyApp] args.action.id: 2
2021-02-15 10:01:07 [log] [ShellyApp] state.action: longpush_1
2021-02-15 10:01:07 [log] [ShellyApp] args.action.name: shortpush_2
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly: {
  id: 'shelly1l-84CCA8ADAD68',
  name: 'Shelly 1L Gang Plafondlamp',
  ip: '192.168.0.53',
  username: 'TheFops',
  password: 'AWv4nVnc67LjPjs',
  icon: '/drivers/shelly1L/assets/icon.svg',
  driver: 'shelly1L',
  type: 'SHSW-L',
  main_device: 'none',
  actions: ['shortpush_1', 'longpush_1', 'shortpush_2', 'longpush_2']
}
2021-02-15 10:01:07 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:01:07 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly.id: shelly1l-84CCA8ADAD68
2021-02-15 10:01:07 [log] [ShellyApp] args.action.id: 2
2021-02-15 10:01:07 [log] [ShellyApp] state.action: longpush_1
2021-02-15 10:01:07 [log] [ShellyApp] args.action.name: shortpush_2
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly: {
  id: 'shelly1l-84CCA8ADAD68',
  name: 'Shelly 1L Gang Plafondlamp',
  ip: '192.168.0.53',
  username: 'TheFops',
  password: 'AWv4nVnc67LjPjs',
  icon: '/drivers/shelly1L/assets/icon.svg',
  driver: 'shelly1L',
  type: 'SHSW-L',
  main_device: 'none',
  actions: ['shortpush_1', 'longpush_1', 'shortpush_2', 'longpush_2']
}
2021-02-15 10:01:07 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:01:07 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly.id: shelly1l-84CCA8AC9E33
2021-02-15 10:01:07 [log] [ShellyApp] args.action.id: 3
2021-02-15 10:01:07 [log] [ShellyApp] state.action: longpush_1
2021-02-15 10:01:07 [log] [ShellyApp] args.action.name: longpush_2
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly: {
  id: 'shelly1l-84CCA8AC9E33',
  name: 'Shelly 1L Keuken',
  ip: '192.168.0.52',
  username: 'TheFops',
  password: 'AWv4nVnc67LjPjs',
  icon: '/drivers/shelly1L/assets/icon.svg',
  driver: 'shelly1L',
  type: 'SHSW-L',
  main_device: 'none',
  actions: ['shortpush_1', 'longpush_1', 'shortpush_2', 'longpush_2']
}
2021-02-15 10:01:07 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:01:07 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly.id: all
2021-02-15 10:01:07 [log] [ShellyApp] args.action.id: 999
2021-02-15 10:01:07 [log] [ShellyApp] state.action: longpush_1
2021-02-15 10:01:07 [log] [ShellyApp] args.action.name: Bij elke actie
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly: {
  id: 'all',
  name: 'Voor elk apparaat',
  icon: '/assets/icon.svg',
  actions: [
    'shortpush_1',
    'longpush_1',
    'shortpush_2',
    'longpush_2',
    'shortpush',
    'longpush'
  ]
}
2021-02-15 10:01:07 [log] [ShellyApp] action event triggercard called with:
2021-02-15 10:01:07 [log] [ShellyApp] state.id: shelly1l-84CCA8AC9E33
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly.id: shelly1l-84CCA8ACD848
2021-02-15 10:01:07 [log] [ShellyApp] args.action.id: 0
2021-02-15 10:01:07 [log] [ShellyApp] state.action: longpush_1
2021-02-15 10:01:07 [log] [ShellyApp] args.action.name: shortpush
2021-02-15 10:01:07 [log] [ShellyApp] args.shelly: {
  id: 'shelly1l-84CCA8ACD848',
  name: 'Shelly 1PM / 1L [192.168.0.50]',
  ip: '192.168.0.50',
  icon: '/drivers/shelly1pm/assets/icon.svg',
  driver: 'shelly1pm',
  type: 'SHSW-L',
  main_device: 'none',
  actions: ['shortpush', 'longpush']
}
```

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [February 15, 2021, 10:16am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1548 "2021-02-15T10:16:16Z")

</div>

> [@TheFops](#):
>
> And something else: when I ran the mentioned procedure with the debug app, my flow was working and it sent me a notification a button was pressed!

Ok, I found the issue and will fix it in the test version.

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [February 15, 2021, 10:24am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1549 "2021-02-15T10:24:36Z")

</div>

> ## v3.0.14 - 2021-xx-xx
> 
> - Fixed an issue with the action events for the Shelly 1L

For more information on installing version 3.x see [[APP] Shelly - #1097 by Phuturist](https://community.homey.app/t/app-shelly/765/1097)

---

<div class="post-metadata">

**Author:** ![TheFops](https://avatars.discourse-cdn.com/v4/letter/t/ad7895/32.png) [@TheFops](https://community.homey.app/u/TheFops)\
**Post date:** [February 15, 2021, 10:49am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1550 "2021-02-15T10:49:06Z")

</div>

Thanks, now it’s working. Nice that you fixed it that fast!

---

<div class="post-metadata">

**Author:** ![Eduardo\_Rodriguez](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eduardo_rodriguez/32/1902_2.png) [@Eduardo\_Rodriguez](https://community.homey.app/u/Eduardo_Rodriguez)\
**Post date:** [February 15, 2021, 11:23pm UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1551 "2021-02-15T23:23:03Z")

</div>

> [@Phuturist](#):
>
> But here it goes again

I Try again:

C:\shelly\>node shellies.js  
internal/modules/cjs/loader.js:589  
throw err;  
^

Error: Cannot find module ‘shellies’  
at Function.Module.\_resolveFilename (internal/modules/cjs/loader.js:587:15)  
at Function.Module.\_load (internal/modules/cjs/loader.js:513:25)  
at Module.require (internal/modules/cjs/loader.js:643:17)  
at require (internal/modules/cjs/helpers.js:22:18)  
at Object. (C:\shelly\shellies.js:1:80)  
at Module.\_compile (internal/modules/cjs/loader.js:707:30)  
at Object.Module.\_extensions…js (internal/modules/cjs/loader.js:718:10)  
at Module.load (internal/modules/cjs/loader.js:605:32)  
at tryModuleLoad (internal/modules/cjs/loader.js:544:12)  
at Function.Module.\_load (internal/modules/cjs/loader.js:536:3)

Shellies package is intalled:

C:\shelly\>npm install -g shellies  
C:\Users\edy00\AppData\Roaming\npm\shellies → C:\Users\edy00\AppData\Roaming\npm\node\_modules\shellies\bin\shellies

- shellies@1.3.0  
updated 1 package in 7.138s

I using Node.js 11.1.0 (x64) and npm. What can be wrong?

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [February 16, 2021, 6:52am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1552 "2021-02-16T06:52:12Z")

</div>

Perhaps install it locally by doing `npm install shellies` from the folder where shellies.js is located.

---

<div class="post-metadata">

**Author:** ![Eduardo\_Rodriguez](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eduardo_rodriguez/32/1902_2.png) [@Eduardo\_Rodriguez](https://community.homey.app/u/Eduardo_Rodriguez)\
**Post date:** [February 16, 2021, 11:07am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1553 "2021-02-16T11:07:23Z")

</div>

Yeah! Now works!

I have a lot of trafic, i have about 35 shellies. Resuming…

power0 changed from 2292.65 to 2341.93  
power0 changed from 169.67 to 169.83  
power0 changed from 2341.93 to 2343.03  
power0 changed from 169.83 to 169.42  
power1 changed from 20.66 to 20.68  
relay0 changed from true to false  
externalInput0 changed from 1 to 0  
externalInput0 changed from 0 to 1

The power0 are Shelly EM and Plug S power meters, and externalinput are the addon reed switch.

I have installed the debug version again, but I keep getting the same errors:

2021-02-16 11:02:58 [log] [ManagerDrivers] [shellyem] [0] TypeError: Cannot read property ‘0’ of undefined  
at ShellyEmDevice.initialStateUpdate (/drivers/shellyem/device.js:84:40)  
at processTicksAndRejections (internal/process/task\_queues.js:97:5)  
2021-02-16 11:02:58 [log] [ManagerDrivers] [shellyem] [1] TypeError: Cannot read property ‘1’ of undefined  
at ShellyEmDevice.initialStateUpdate (/drivers/shellyem/device.js:84:40)  
at processTicksAndRejections (internal/process/task\_queues.js:97:5)  
2021-02-16 11:02:59 [log] [ManagerDrivers] [shellydw] [0] Shelly Door Window Sensor is probably asleep and disconnectedFetchError: request to [http://192.168.1.205/status](http://192.168.1.205/status) failed, reason: connect EHOSTUNREACH 192.168.1.205:80

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [February 16, 2021, 12:08pm UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1554 "2021-02-16T12:08:18Z")

</div>

> [@Eduardo\_Rodriguez](#):
>
> The power0 are Shelly EM and Plug S power meters, and externalinput are the addon reed switch.
> 
> I have installed the debug version again, but I keep getting the same errors:

Ok, than it’s not a CoAP thing. I have fixed that Shelly EM error on the debug branch as well now and added more debug logging. Could you try it again.

---

<div class="post-metadata">

**Author:** ![Eduardo\_Rodriguez](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eduardo_rodriguez/32/1902_2.png) [@Eduardo\_Rodriguez](https://community.homey.app/u/Eduardo_Rodriguez)\
**Post date:** [February 16, 2021, 1:54pm UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1555 "2021-02-16T13:54:10Z")

</div>

this is the log:

2021-02-16 13:44:29 [log] [ShellyApp] Initializing Shelly App …  
2021-02-16 13:45:20 [log] [ShellyApp] updating the temporary shelly collection  
2021-02-16 13:45:20 [log] [ShellyApp] starting CoAP listener, messages should be coming in at this moment for the following devices  
2021-02-16 13:45:20 [log] [ShellyApp]   
2021-02-16 13:45:47 [log] [ManagerDrivers] [shellydw] [0] Shelly Door Window Sensor is probably asleep and disconnectedFetchError: request to [http://192.168.1.205/status](http://192.168.1.205/status) failed, reason: connect EHOSTUNREACH 192.168.1.205:80

the shelly em now is online,but only refresh value the firs time. No message when trigger a device.

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [February 16, 2021, 7:44pm UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1556 "2021-02-16T19:44:02Z")

</div>

I really have no clue.

Just to make sure, Homey is on the same LAN as the computer where you tested CoAP through NodeJS?

The only thing I can think of is the number of Shelly devices is slowing down the startup process of the app and the coap listener is started before other stuff has finished. But I would still expect the see some devices discovered eventually. I have added a longer timeout before the coap listener starts in the debug version. Could you test it and leave the app running on the command line for 5 minutes or so.

---

<div class="post-metadata">

**Author:** ![Eduardo\_Rodriguez](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eduardo_rodriguez/32/1902_2.png) [@Eduardo\_Rodriguez](https://community.homey.app/u/Eduardo_Rodriguez)\
**Post date:** [February 16, 2021, 8:01pm UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1557 "2021-02-16T20:01:42Z")

</div>

> [@Phuturist](#):
>
> Just to make sure, Homey is on the same LAN as the computer where you tested CoAP through NodeJS?

Yes, homey, all shellies and the computer are in the same lan. Later i will try.

Edit:

test result:

get a lot of detected shellies, like that:

```
id: 'shelly1-48XXXXX6C',
name: 'Shelly1 [192.168.1.137]',
ip: '192.168.1.137',
username: XXXX
password: XXXX
icon: '/drivers/shelly1/assets/icon.svg',
driver: 'shelly1',
type: 'SHSW-1',
main_device: 'none',
actions: ['shortpush', 'longpush']

```

},

And:

getting device shellyem-BXXX4D-channel-0  
getting device shellyem-BXXX4D-channel-1

every 5 minutes I receive the message:

[ShellyApp] going to update the shelly collection  
getting shellies

Nothing appears when I activate any shelly. If I activate some shelly from homey it updates its status, but if I do it from the physical button this does not happen.

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [February 17, 2021, 7:03am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1558 "2021-02-17T07:03:55Z")

</div>

Please show me the entire log.

---

<div class="post-metadata">

**Author:** ![Eduardo\_Rodriguez](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eduardo_rodriguez/32/1902_2.png) [@Eduardo\_Rodriguez](https://community.homey.app/u/Eduardo_Rodriguez)\
**Post date:** [February 17, 2021, 10:32am UTC](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765/1559 "2021-02-17T10:32:58Z")

</div>

I send the log by PM

Thanks for your effort!

[Previous page](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765.md?page=76)

[Next page](https://community.homey.app/t/app-shelly-smart-solutions-for-every-home-and-office/765.md?page=78)
