Hi I am currently working on a project for my university and I am not really familiar with Node-RED, and Java Websockets.
Bascily the Project is a voice assistant:
- you speak into a Rasspberry PI which runs Rhasspy(voice to text) -> creating intents -> which are send to Node-RED in Json format
- Node-RED recieves intents in Json Format. -> send to Android App(jsut display data for now)
- I want to get the data on my android Phone.
Right now I have my Rasspberry PI connected with my Node-RED server and I am sending "intents" which contain data in Json format this is working so far. For example I say: " how is the weather " -> I get via an input websocket: Intent: object
text: "how is the weather"
Now I want to get this data in Json format with my android(running Java and want to use Websockets(OkHttp) ) phone via websockets but I am not sure how to get it are there already any example on how to connect my phone to the Node-RED server and get the Json data?
My idea now:
- Run a websocket client on my phone which connects to Node-RED:ws://......:1880
- Create "output websocket" in Node-RED which sends payload(Json data) to my android
--> now jsut display text^^
Excuse my english is not my mother language
I appreciate any help and idea
you could install node-red on the phone using termux app. On my other devices i have automate with a mqtt tasker plugin.
Thank you already
is there any good guide/example?
Yes in the getting started section of the documentation link above
What are you going to do with the data once you have it in the phone. Have you considered something like Telegram if you are just trying to get notifications?
Hi, once I get the data on my phone I want to build an URL with the recieved data for REST-API.
For example you ask "what food today in mensa" -> I build URL for example: https......./mensa/today -> and phone will be able to displlay JSON from Rest-API
Are you going to write an Android app for that?
yes, I wrote already an APP hardcoded for Rest-API so far but want to switch it to the correct url with the recieved parameter from Node RED and Tasker so my app is more flexible and I get correct data on display
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.