Cannot run external script.
See original GitHub issueHi, I am trying to execute nodejs script from ha-bridge and getting errors, I set command type to “Execute Script/Program” and my command is
[{"item":"nodejs ~/Downloads/ha-bridge/scripts/led.js 2 on", "type":"cmdDevice"}]
The command nodejs ~/Downloads/ha-bridge/scripts/led.js 2 on
runs fine in terminal. But running in ha-bridge I am getting error:
Request Error, Please look in your habridge log: error {“type”:6,“address”:“/lights/2”,“description”:“Error on calling out to device”,“parameter”:“/lights/2state”}
Looking into debug log I see
Decode Json for url items: [{"item":"[{\"item\":\"nodejs ~/Downloads/ha-nridge/scripts/led.js 2 on\"}]","type":"cmdDevice"}]
Exec Request called with url: [{"item":"nodejs ~/Downloads/ha-nridge/scripts/led.js 2 on"}]
Executing request: [{"item":"nodejs ~/Downloads/ha-nridge/scripts/led.js 2 on"}] com.bwssystems.HABridge.plugins.exec.CommandHome
Could not execute request: [{"item":"nodejs ~/Downloads/ha-nridge/scripts/led.js 2 on"}]
Any idea what’s wrong? Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:24 (9 by maintainers)
Top Results From Across the Web
Can't include external javascript in html - Stack Overflow
If I try to include the JavaScript I have between the as an external file, the slider doesn't work. So I take this...
Read more >[SOLVED] Cannot run External Javascript in Embedded HTML
Hi, I am a beginner at play canvas. I'm trying to load HTML pages into Play Canvas and execute third-party JavaScript in HTML....
Read more >Cannot execute an external program in Orion
A customer cannot run or execute a script on his alerts. Execute an external program fails, Execute an external program not working.
Read more >JavaScript modules - MDN Web Docs
This guide gives you all you need to get started with JavaScript module syntax.
Read more >JavaScript Where To - W3Schools
External scripts cannot contain <script> tags. External JavaScript Advantages. Placing scripts in external files has some advantages: It separates HTML and code ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s working out beautifully. I put together a small blog post: http://codecorner.galanter.net/2017/02/24/full-control-of-your-limitless-ledmilight-v6-bulbs-from-amazon-echo/ maybe will be useful to others struggling with Milight v6.
Thanks,
Yuriy.
On Fri, Feb 24, 2017 at 8:45 PM, Yuriy Galanter yuri@galanter.net wrote:
So it looks like the issue is that I was actually running it out of docker which is why it was not working.
It is all good now!!!