johnwalicki / Node-RED-Tello-Control

Node-RED flows to control the Ryze Tello Drone
Apache License 2.0
126 stars 87 forks source link

Tello node red #16

Open sreyamsjain opened 5 years ago

sreyamsjain commented 5 years ago

Accidentally I closed my previous issue about Tello nodes

In your part6 flow diagram, there are some nodes that are Tello. Am I reading it wrong?

johnwalicki commented 5 years ago

In Part 6, the instructions teach you how to create Subflows for various Tello movements. They aren't actually Node-RED nodes, just snippets of Node-RED flows that are in separate tabs that become reusable.

sreyamsjain commented 5 years ago

Thanks, understood.

Is there a way to WIFI connect Tello with a local network that also gives the internet connection.

sreyamsjain commented 5 years ago

Do you have any solution flow that takes a video? Appreciate if you could share. Thanks

johnwalicki commented 5 years ago

Yes - see this repo

https://github.com/johnwalicki/Node-RED-DroneViewer

sreyamsjain commented 5 years ago

Following that page, I do not find the flow - https://github.com/johnwalicki/Node-RED-DroneViewer/blob/master/flows/Node-RED-Tello-VideoStream-Control-Dashboard.json.

Has it moved to some other area?

sreyamsjain commented 5 years ago

I have tried following to install ffmpeg, followed all instructions, did npm start in telloview dir, I cannot open localhost:3000.

What could be the issue?

johnwalicki commented 5 years ago

The README link and flow location are correct. I didn't see any error loading https://raw.githubusercontent.com/johnwalicki/Node-RED-DroneViewer/master/flows/Node-RED-Tello-VideoStream-Starter.json

johnwalicki commented 5 years ago

After you run npm start do you see

droneviewer-tello@0.0.1 start /home/walicki/Drones/DroneViewer/telloview node server.js

starting ffmpeg Server started at http://127.0.0.1:3000/ Sending command: command

johnwalicki commented 5 years ago

Is there a way to WIFI connect Tello with a local network that also gives the internet connection. Not with the Tello. I connect my laptop via a hard wired ethernet cable to the Internet and WiFi to the Tello. The upgraded model - Tello EDU - allows you to connect the drone to normal WiFi

sreyamsjain commented 5 years ago

When I do - npm start in the telloview directory, I see as below without the starting server at ...

droneviewer-tello@0.0.1 start C:\Users\Sjain\Downloads\Node-RED-DroneViewer\telloview node server.js

starting ffmpeg Sending command: command

I have my laptop with internet connection available via wifi and with another wifi adapter I can connect to Tello as well.

Are the two below links different? https://raw.githubusercontent.com/johnwalicki/Node-RED-DroneViewer/master/flows/Node-RED-Tello-VideoStream-Starter.json

https://github.com/johnwalicki/Node-RED-DroneViewer/blob/master/flows/Node-RED-Tello-VideoStream-Control-Dashboard.json

I would like to use the one with the control, which I do not find

sreyamsjain commented 5 years ago

Does this work under Windows Embedded Standard computer? running npm start fails indicating error in dronviewer-tello package. unexpected token line 5 server.js - requiring child process

johnwalicki commented 5 years ago

What version of Node are you running? I see old git issues about unexpected token - require child process when you're running old versions of node.js.

johnwalicki commented 5 years ago

The first flow embeds the video stream in a Node-RED Dashboard. Very basic. The second flow adds buttons to the Node-RED Dashboard to control and fly the drone.

sreyamsjain commented 5 years ago

Two things going on here since I am testing this on two machines separately.

  1. on the Windows 10 machine - version of node.js - 10.16.3 and npm is 6.11.3. Here doing npm start, I get - starting ffmpeg & Sending command: command with no message Server starting at 127.0.0.1

  2. On Windows Embedded system - where I get the child process error - version of node.js - 0.12.11 & npm is 2.14.9

Atleast on Windows 10 machine, I see the versions are the latest and I am not sure why I do not see server running on localhost?

sreyamsjain commented 5 years ago

OK, on the Windows Embedded machine, I upgraded now both npm and nodejs to latest versions. Running npm start in telloview dir, I get the following error messges ..

C:\Drone\telloview>npm start

droneviewer-tello@0.0.1 start C:\Drone\telloview node server.js

C:\Drone\telloview\server.js:25 app.post(/streamon, async (req, res) => { ^ SyntaxError: Unexpected token ( at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:390:7) at startup (bootstrap_node.js:150:9)

npm ERR! Windows_NT 6.1.7601 npm ERR! argv "c:\Program Files (x86)\Advantech\NodeRed Server\nodejs\node. exe" "c:\Program Files (x86)\Advantech\NodeRed Server\nodejs\node_modules\ npm\bin\npm-cli.js" "start" npm ERR! node v6.10.3 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! droneviewer-tello@0.0.1 start: node server.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the droneviewer-tello@0.0.1 start script 'node server.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the droneviewer-tello pac kage, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node server.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs droneviewer-tello npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls droneviewer-tello npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\Drone\telloview\npm-debug.log