Jump to content

A countdown to use on Dataton Watchout.


Alex Ramos

Recommended Posts

  • Dataton Partner

Muito obrigado!

Looks nice. Couldn't the app work with UDP broadcast as well? Then the team colleagues could install the app and just listen to the broadcast instead of having multiple cues to the different team members in the timeline.

Link to comment
Share on other sites

On 1/4/2023 at 9:49 AM, RBeddig said:

Muito obrigado!

Looks nice. Couldn't the app work with UDP broadcast as well? Then the team colleagues could install the app and just listen to the broadcast instead of having multiple cues to the different team members in the timeline.

While waiting for a building video mapping do run, I had some spare time so here it goes.

Well I have version working on UDP. But...

I'm not a professional coder so I have some limitations. Always learning.

The downtown UDP can receive messages from any IP on the network on port 1234.

Is my understanding that.

To use only one cue, WO needs to multicast, to all of the network, so the 224.0.0.1 should be used on the UDP string output!? Is this how it works?

I'm missing something here. I can make it work over the network but I need to specify the address on the out string UDP cue, much like TCP.

All comes down to, how do I broadcast to all clients at the same time using une cue only on WO?

Attached is the UDP version, it can now be resized by dragging the corner.

Help appreciated.

Alex

THIS IS THE LATEST VERSION AT THE MOMENT

 

Link to comment
Share on other sites

  • Dataton Partner

Hi Alex,

Thanks for the efforts. Unfortunately I'm at the gate waiting for a flight and won't be able to test before the end of the month. An alternative would maybe be a broadcast address but I've not used this myself yet. The broadcast address would be 192.168.0.255 in a 192.168.0.xxx network. This would surely stay inside the local network which adds security.

Kind regards,

Rainer

Link to comment
Share on other sites

  • Member

I would concur with what RBeddig has suggested and I think the broadcast address will also depend on how your network was/is setup.

In a private local network, some will use class A IP addresses eg: 10.0.0.x while others will use class C IP addresses eg: 192.168.1.x. So I think it's not ideal if you were to hardcode a fixed broadcast address into your utility. Even in the same class, some may use different segment eg: 192.168.0.x vs 192.168.1.x. And to be able to broadcast from one machine in one segment to another machine in another segment, you'll also need to do the routing which is the function of router anyway.

In one of my software where I broadcast a small UDP payload to discover available nodes/machines, what I did was the following:

  1. Loop through available network interfaces (as some machines may have multiple network interface eg: Ethernet, Wifi)
  2. Discard loopback addresses like localhost or 127.0.0.1
  3. Get the broadcast addresses from those detected or active interfaces
  4.  Add the broadcast addresses to the combo box so that user can select

Below the UI and the implementation in Python (you'll need to find similar function in your language):

        # broadcast discovery
        for iface in netifaces.interfaces():
            iface_details = netifaces.ifaddresses(iface)
            if netifaces.AF_INET in iface_details:
                det = iface_details[netifaces.AF_INET]
                if(det[0].get('addr') != "127.0.0.1"): #do not include loopback address
                    self.broadcastCombo.addItem(det[0].get('broadcast'))

nightblend-screenshot.png.4089b6ec1f919d62cbef385a3ee75458.png

Hope this suggestion helps.

Link to comment
Share on other sites

@Eddy Yanto thanks for the input, for now I will leave it as is.

This is a very simple codeto serve my needs. I share it as it may help other, not as a "produt". Also as a teaser for Dataton to incorporate something similar.

Its not realy hardcoded a fixed broadcast adress  

Dim endPoint As IPEndPoint = New IPEndPoint(IPAddress.Any, 1234)

The way I have my network setup is mask 255.255.0.0 and use IP 192.168.x.x

This shuld work with any Class, A or C as long as the router passes the packets.

Again Im not an expert on this mater, just a hobbyist.

Always learning 

Alex

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
  • 3 weeks later...
在 2023/1/24 在 PM7 点 25 分,Alex Ramos 说:

现在有 hh:mm:ss 的错误修改的最新版本

可调整大小的窗口,没有24分钟的限制。

Github

 

 

倒计时.PNG

倒计时Alpha UDP.exe 356.5 KB · 21次下载

Hello Alex Ramos, why do I use UDP countdown but he only shows that time does not count the countdown? Did I make an error in writing?

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

 

I also had a similar issue as KevinLin with the latest version, sometimes it would show the total time without counting down, sometimes it would change the clock to "12:04:55 AM"and count down when I sent UDP string "00:04:55" on the latest version from the GIT.

 

When I DL'd the jan 6th version posted here, it worked sending "04:55"

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...