Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module './scene.manager' in 0.4.0 #65

Closed
axlthorell opened this issue Feb 29, 2020 · 9 comments
Closed

Error: Cannot find module './scene.manager' in 0.4.0 #65

axlthorell opened this issue Feb 29, 2020 · 9 comments

Comments

@axlthorell
Copy link

I'm getting this error after updating to 0.4.0

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: Plejd
 Adds support for the Swedish home automation devices from Plejd.
-----------------------------------------------------------
 Add-on version: 0.4.0
 You are running the latest version of this add-on.
parse error: Expected string key before ':' at line 1, column 4
[17:03:28] ERROR: Unknown HTTP error occured
 System:   (armv7 / raspberrypi4)
 Home Assistant version: 0.106.2
 Supervisor version: 201
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[17:03:29] INFO: Starting the Plejd service...
[17:03:29] INFO: Verified permissions on startup script
[17:03:29] INFO: Executing startup script
[17:03:30] INFO: Wrote plejd.json
[17:03:30] INFO: Running add-on
internal/modules/cjs/loader.js:638
    throw err;
    ^
Error: Cannot find module './scene.manager'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/plejd/main.js:5:22)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
[17:03:31] INFO: Starting the Plejd service...
[17:03:31] INFO: Verified permissions on startup script
[17:03:31] INFO: Executing startup script

Anything I need to do?

@icanos
Copy link
Owner

icanos commented Feb 29, 2020

Refresh and try 0.4.1

@axlthorell
Copy link
Author

Got some errors at first with 0.4.1 but after a reboot the add-on now starts up.

When I try to turn off several plejd devices at once I get this

plejd-ble: connecting to /org/bluez/hci0/dev_CF_4D_B6_94_65_5D
onDeviceConnected()
trying 10 characteristics
authenticate()
startPing()
startWriteQueue()
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: sending 6 byte(s) of data to Plejd
plejd-ble: write failed DBusError: In Progress
init()
plejd-ble: disconnecting /org/bluez/hci0/dev_CF_4D_B6_94_65_5D
plejd-ble: connecting to /org/bluez/hci0/dev_CF_4D_B6_94_65_5D
onDeviceConnected()
trying 10 characteristics
authenticate()
startPing()
startWriteQueue()

@icanos
Copy link
Owner

icanos commented Feb 29, 2020

Might need to enable tweaking the wait time between messages on DBus then, I've been testing alot on my setup and it works fine. Will implement that and update the addon once more :)

@axlthorell
Copy link
Author

Great!
Good job, it works a lot better now than before. It might be one of my plejd devices that is hard to reach with bluetooth that causes my problems.

@jzee
Copy link

jzee commented Mar 1, 2020

came here to confirm both, that 0.4.1 works a lot better than before and that the queueing indeed fixed the core issue. At the same time, I see the same issue as @axlthorell where the DBus write fails with an "in progress" error when I try to switch more than one device at a time.

@icanos
Copy link
Owner

icanos commented Mar 3, 2020

I have released a new version, 0.4.2, which gives you a configurable setting of the write queue wait time. Please try that and get back to me, start by using the default value and then raise it in steps of 50 until it works fine.

I tested with 8 Plejd lights on 400ms wait time and running on an RPi 4 without issues today (created a scene and automation).

@axlthorell
Copy link
Author

Works good now with 400ms and 7 devices for me :)
Thanks!
How do I find the plejd scene switch?

@icanos
Copy link
Owner

icanos commented Mar 4, 2020

Sounds great!

Scenes are created as switches. Easiest is to create a Button and link to the switch (they are named something like switch.turn_off_all_lights) etc.

@axlthorell
Copy link
Author

Sorry my misstake! I had the scene as hidden in the plejd-app, after changing that it worked as expected.

Version 0.4.2 solved this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants