Question is this possible

69 views
Skip to first unread message

thebluearchernc

unread,
Oct 4, 2016, 1:21:45 AM10/4/16
to nodejs
say i have 5 android devices i want each to connect to a different web port  and i want the webserver to update each devices page .

basically i want to take a single page split it in to say 5 sections and each section is update at the same time  making a matrix display of sorts.

the idea is to create a digital dash board for an automobile 


thanks Ross

Zlatko

unread,
Oct 6, 2016, 10:41:41 AM10/6/16
to nodejs
Having 5 devices connect to different ports is fine, not a problem, but why do you want separate ports?

You can have a single page and have it split into sections and have them all update. You can, at the same time, have 5 things connected somewhere. You can even make a link between those connections and the sections on the page.

But what you're describing is very vague, so whether your specific idea is possible cannot yet be answered. However, create a digital dash for an automobile definitely can be made, with Node or whatever else. (I know because I was working at a connected car startup and we did these things with Node).

So - about that page. Where do you wanna show this dashboard - on each android device or each device gets its own "section" of the page? I'm assuming you want to link 5 devices to the 5 page sections - why do you need separate ports? You can have a single app listening on single port, but keeping track at which and how many devices are connected. And you can have the app also keep track of those "sections" of the page, and update accordingly.

So, share more details for more detailed answer, please.

thebluearchernc

unread,
Oct 6, 2016, 1:37:39 PM10/6/16
to nodejs

Well i am new at this so no i did not know i did not need separate ports   but you are correct  i wish to show part of the page on each devices  with the devices lined up to make a larger display  sort like this image with each display containing a section of the dash

any pointers to where to begin will be greatly appreciated  at this point i do not know the exact amount of display i will need  just want to make sure this can be done.

Ryan Schmidt

unread,
Oct 8, 2016, 2:06:31 AM10/8/16
to nod...@googlegroups.com
On Oct 6, 2016, at 9:58 AM, thebluearchernc <jrwe...@gmail.com> wrote:
>
> Well i am new at this so no i did not know i did not need separate ports but you are correct i wish to show part of the page on each devices with the devices lined up to make a larger display sort like this image with each display containing a section of the dash
>
> any pointers to where to begin will be greatly appreciated at this point i do not know the exact amount of display i will need just want to make sure this can be done.

You can have different browser windows open, on the same or different computers, accessing different pages of any web site, all using a single port, can't you?

Zlatko Đurić

unread,
Oct 8, 2016, 2:06:42 AM10/8/16
to nod...@googlegroups.com
Oh, so you want to distribute a dashboard to a few devices :) What a marvelous idea! So, let's play with it, I'm already enjoying this!

I'd say your key data structure is a "Car". It has a few "sensors", a "PIN", and a list of connected "display devices".
If it has devices (phones) connected, it will, in order of priority, send each of them just one specific type of sensor output. It will also tell that device which output it is.

Example: no phones - no output. Then a single phone connects to the server, and gives this car PIN. (Could be a password, token, QR code, whatever, I'm simplifying here).
When the server sees this PIN, it starts sending to this device the most important output (engine/coolant temperature, let's say). And if you're using something like websockets, or server-sent events, or push or by simple long-polling, it updates this data frequently or in real time, depending on your sensor inputs.
Then the second phone connects, with the same PIN. The server sees the second device, it sends it the _second_ type of sensor output, and starts pushing data - in our case, speedometer.
And so on - as new devices connect, they are assigned a different sensor output and they start showing it.

Devices, ideally, should know how to display all of the outputs, but only show the selected one, the one they receive (because you can't control the order of devices connecting). Alternatively, devices can ask for just specific sensor (e.g. RPM or signal lights) and the server will still keep track of which output to show to which device. You can connect more then 5 phones, and server tells the extra ones to be on "stand-by" - if one of the busy phones disconnects (e.g. battery empty), server tells one of the stand-by ones to chime in.

I mean, you can go way less than that, for a basic functionality, or much more complex, depending on what you need.

But yes, you can definitely do it and node could be the best tool for the job.


--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to a topic in the Google Groups "nodejs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nodejs/TPIPuh1TieE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nodejs+unsubscribe@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/792861dd-9f4c-4d5c-9826-cc0aba425a4a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Zlatko

thebluearchernc

unread,
Oct 10, 2016, 9:50:20 AM10/10/16
to nodejs
Ryandesign that was my original intent  was to use separate pages to display part of the complete gauge cluster

but then i got started reading about node.js (which allows some real time display of data or so i am lead to believe) and then ports came into the discussion and well it went spiraling down hill

Zlatko
my idea is to distribute the complete gauge cluster across several devices with the the gauge cluster split up to fit the phones display (1 x 5 matrix) but as displays only
they will be connected blue tooth or more than likely USB Ethernet with otg adapters
they should request the part of the screen they are setup to display  /root/screen1 for the first(leftmost device) thru /root/screenx for the right most device

reading information from my arduino devices  is not a problem getting them to display on a web page  i am ok with but
my main concern is the near real time up date of the displays
 
this was my inspiration for this  project http://hackaday.com/2016/09/28/raspberry-pi-adds-a-digital-dash-to-your-car/    btw
Reply all
Reply to author
Forward
0 new messages