Daniel-t / node-red-contrib-milight

A Node Red wrapper for https://github.com/oeuillot/node-milight.git
Apache License 2.0
1 stars 9 forks source link

npm install #1

Closed BenMtl closed 8 years ago

BenMtl commented 8 years ago

Just tried to install with npm and received the following ... npm ERR! not a package /tmp/npm-956-ksQ9um_o/github.com/oeuillot/node-milight.git npm ERR! Error: ENOENT, open '/tmp/npm-956-ksQ9um_o/github.com/oeuillot/node-milight.git-unpack/package.json' npm ERR! If you need help, you may report this entire log, npm ERR! including the npm and node versions, at: npm ERR! http://github.com/npm/npm/issues

npm ERR! System Linux 3.18.11-v7+ npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "https://github.com/oeuillot/node-milight.git" npm ERR! cwd /home/pi npm ERR! node -v v0.10.40 npm ERR! npm -v 1.4.28 npm ERR! path /tmp/npm-956-ksQ9um_o/github.com/oeuillot/node-milight.git-unpack/package.json npm ERR! code ENOENT npm ERR! errno 34 npm ERR!

Daniel-t commented 8 years ago

How did you try to install?
I did the following in a new environment and it worked fine. npm install https://github.com/Daniel-t/node-red-contrib-milight

Also npm -v reports 3.5.2 for me, can you try updating npm?

BenMtl commented 8 years ago

Will give it a try again tonight. Thanks On 29 Mar 2016 6:46 am, "Daniel-t" notifications@github.com wrote:

How did you try to install?

I did the following in a new environment and it worked fine. npm install https://github.com/Daniel-t/node-red-contrib-milight

Also npm -v reports 3.5.2 for me, can you try updating npm?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/Daniel-t/node-red-contrib-milight/issues/1#issuecomment-202828495

BenMtl commented 8 years ago

I think it might be a issue with theThingbox install. updated everything and received new errors.

npm WARN enoent ENOENT, open '/home/pi/package.json' npm WARN pi No description npm WARN pi No repository field. npm WARN pi No README data npm WARN pi No license field.

Thanks for your time and help

Ben

Daniel-t commented 8 years ago

They look like warnings only (which I should fix anyway), can you check your node_modules directory and see if the milight and node-red-contrib-milight modules are there. On Thu, 31 Mar 2016 at 12:04, BenMtl notifications@github.com wrote:

I think it might be a issue with theThingbox install. updated everything and received new errors.

npm WARN enoent ENOENT, open '/home/pi/package.json' npm WARN pi No description npm WARN pi No repository field. npm WARN pi No README data npm WARN pi No license field.

Thanks for your time and help

Ben

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/Daniel-t/node-red-contrib-milight/issues/1#issuecomment-203715690

BenMtl commented 8 years ago

Here is what I have on my pi

pi@thethingbox ~/node_modules $ ls milight node-red-contrib-milight

in milight ... pi@thethingbox ~/node_modules/milight $ ls lib node_modules package.json README.md samples pi@thethingbox ~/node_modules/milight $

in node-red-contrib-milight .. pi@thethingbox ~/node_modules/node-red-contrib-milight $ ls LICENSE MiLight.html MiLight.js package.json README.md pi@thethingbox ~/node_modules/node-red-contrib-milight $

BenMtl commented 8 years ago

well i did a fresh install on a new pi3 .. installed current Node js and node-red ... now I have the nodes installed .. but when I try to use them in a flow I get the following ...

[info] Waiting for missing types to be registered: 3 Apr 00:40:49 - [info] - MiLightRGB 3 Apr 00:40:49 - [info] - MiLightWhite 3 Apr 00:40:49 - [info] - MiLightPower

any thoughts ?

BenMtl commented 8 years ago

just rebooted and restarted node-red with -v and received the following ...

3 Apr 00:51:24 - [info] Node-RED version: v0.13.4 3 Apr 00:51:24 - [info] Node.js version: v5.10.0 3 Apr 00:51:24 - [info] Linux 4.1.20-v7+ arm LE 3 Apr 00:51:24 - [info] Loading palette nodes 3 Apr 00:51:28 - [info] UI started at /ui 3 Apr 00:51:30 - [warn] ------------------------------------------ 3 Apr 00:51:30 - [warn] [MiLightRGB] Error: MiLightPower already registered 3 Apr 00:51:30 - [warn] [MiLightWhite] Error: MiLightPower already registered 3 Apr 00:51:30 - [warn] ------------------------------------------ 3 Apr 00:51:30 - [info] Settings file : /home/pi/.node-red/settings.js 3 Apr 00:51:30 - [info] User directory : /home/pi/.node-red 3 Apr 00:51:30 - [info] Flows file : /home/pi/.node-red/flows_pi3-1.json 3 Apr 00:51:30 - [info] Server now running at http://127.0.0.1:1880/ 3 Apr 00:51:30 - [info] Waiting for missing types to be registered: 3 Apr 00:51:30 - [info] - MiLightRGB 3 Apr 00:51:30 - [info] - MiLightWhite 3 Apr 00:51:30 - [info] - MiLightPower

BenMtl commented 8 years ago

ok just did a new install or raspian-lite .. installed node js 4.x and node-red .13.4. used npm to insatll milight node, then this one .. now i am getting

6 Apr 13:22:45 - [info] Waiting for missing types to be registered: 6 Apr 13:22:45 - [info] - MiLightWhite 6 Apr 13:22:45 - [info] - MiLightRGB 6 Apr 13:22:45 - [info] - MiLightPower trying to use all three in a flow ... any thoughts ?

Daniel-t commented 8 years ago

I'll set some time aside over the weekend to try a complete fresh install. Just out of curiosity, what browser are you using? I've seen some similar log messages attached to issues around safari. On Wed, 6 Apr 2016 at 23:26, BenMtl notifications@github.com wrote:

ok just did a new install or raspian-lite .. installed node js 4.x and node-red .13.4. used npm to insatll milight node, then this one .. now i am getting

6 Apr 13:22:45 - [info] Waiting for missing types to be registered: 6 Apr 13:22:45 - [info] - MiLightWhite 6 Apr 13:22:45 - [info] - MiLightRGB 6 Apr 13:22:45 - [info] - MiLightPower trying to use all three in a flow ... any thoughts ?

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/Daniel-t/node-red-contrib-milight/issues/1#issuecomment-206371905

BenMtl commented 8 years ago

Using firefox, on both linux and windows ..

On Wed, Apr 6, 2016 at 5:07 PM, Daniel-t notifications@github.com wrote:

I'll set some time aside over the weekend to try a complete fresh install. Just out of curiosity, what browser are you using? I've seen some similar log messages attached to issues around safari. On Wed, 6 Apr 2016 at 23:26, BenMtl notifications@github.com wrote:

ok just did a new install or raspian-lite .. installed node js 4.x and node-red .13.4. used npm to insatll milight node, then this one .. now i am getting

6 Apr 13:22:45 - [info] Waiting for missing types to be registered: 6 Apr 13:22:45 - [info] - MiLightWhite 6 Apr 13:22:45 - [info] - MiLightRGB 6 Apr 13:22:45 - [info] - MiLightPower trying to use all three in a flow ... any thoughts ?

— You are receiving this because you commented. Reply to this email directly or view it on GitHub < https://github.com/Daniel-t/node-red-contrib-milight/issues/1#issuecomment-206371905

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/Daniel-t/node-red-contrib-milight/issues/1#issuecomment-206568518

Daniel-t commented 8 years ago

Good news, I've replicated the problem, something changed between 8 Apr 21:02:32 - [info] Node-RED version: v0.12.1 8 Apr 21:02:32 - [info] Node.js version: v0.10.41 and 8 Apr 22:02:54 - [info] Node-RED version: v0.13.4 8 Apr 22:02:54 - [info] Node.js version: v5.10.0

I'm still trying to work out exactly what the problem is though.

Daniel-t commented 8 years ago

OK, I have a workaround (works for me, please confirm).

I've posted this issue over on the node-red mailing list to see if there is something to fix this properly https://groups.google.com/forum/#!topic/node-red/Ly8P__jmdKM

BenMtl commented 8 years ago

That works !! thank you .. but why does it work, no other node needs that directory structure... On another note .. is it possible to access the modes on the controller.. flash, fade .. etc ?? You had posted also about thinking about changing the three nodes into one that did it all. From this side and especially as someone being new to node-red I like the three node set up it is nice and clear and easy to follow.

Thanks again for all your time and effort.

Ben

stephenkeep commented 8 years ago

Hi Guys,

I have forked the project published to npm and fixed the nodes bug. Not sure if you want a pull request and how you want to go about the npm module.

Thanks for all your work in getting this running!

https://github.com/stephenkeep/node-red-contrib-milight

Cheers

stephenkeep commented 8 years ago

So things have moved on a bit. I have used a different library node-milight-promise because it supports the white and color bulbs. I have also moved it into a single node.

If you could let me know if you want a pull request or change it to a new package?

BenMtl commented 8 years ago

I liked the old one .. after all the trouble getting it running not sure if I want to switch.

stephenkeep commented 8 years ago

No worries

BenMtl commented 8 years ago

never worried ... stress is not allowed in life .. the old version supported white and colour bulbs also ..