Page 4 of 4

Re: Tcp/udp Sending and receiving

Posted: 26 Feb 2019 17:02
by Desmanto
@elektroinside : Wow, thanks for the tips. I must really missed that part of set_scene that will turn on the light before. When I tried it, it doesn't work (maybe something wrong during the input choice). I even remove that from the choice afterward.

Thanks to your tip, that means I don't need the extra querying for power again, just directly use the set_scene. My finished flow will be much simplified. But I still put the whole map there, since probably I might use it one day. Why erasing something I have done for a week. And I still can reuse it to switch to set_scene method. The difference only that the set_scene doesn't use the duration when turning on, but that's fine. We can easily replace the effect by using color flowing.

Re: Tcp/udp Sending and receiving

Posted: 26 Feb 2019 19:13
by elektroinside
Sure thing, you're very welcome, glad i helped. For me, this was mandatory, as for incoming important calls a speedy reaction was critical :-)

Re: Tcp/udp Sending and receiving

Posted: 18 Apr 2019 16:17
by elektroinside
Well.. recently purchased a Xiaomi Aqara gateway and a few sensors.
It has a "developer mode" which opens up its API. But commands have to be sent to a UDP port, responses are sent to the sender's IP and custom UDP port, muticast messages are sent to an IP and an UDP port...

Another example where Automagic cannot be used.. unfortunately :(
I need to put my Raspberry Pi to work, send http queries to something like Pushbullet, and then listen to messages using Automagic. Probably the best way for "multicast listening" anyway, but still, sending udp packets for this scenario from Automagic would still be great :-)

Re: Tcp/udp Sending and receiving

Posted: 15 Mar 2020 20:17
by BoBo
No idea if this is still of interest/help (eg. to integrate its base funchionality to AutoMagic): https://github.com/hastarin/android-udpsender ?? :)
PS. check out its Tasker option too!
PPS. Found/installed today. Very nice! https://play.google.com/store/apps/deta ... UDP_Widget

Just out of curiosity, do you know any Android UDP/TCP socket app that acts as a 'command line interface', means it can be triggered (preferably with Automagic) without opening a GUI ?? Would be OK if its user interface is provided in the notification bar (?) like it's done here: https://play.google.com/store/apps/deta ... tay Alive]. Thx for listening and any advice :)

Re: Tcp/udp Sending and receiving

Posted: 21 Mar 2020 17:46
by Desmanto
I used to use UDPsender too, but then I switch to nc binary, which I use mainly for my yeelight.

Automagic can host a command center, using trigger HTTP request. I use it all the time at home, to mirror the phone, sync clipboard and do stuff. At the PC, the sender is done using eventghost. It also have webserver which I can POST to using Automagic.

Re: Tcp/udp Sending and receiving

Posted: 21 Mar 2020 20:33
by BoBo
While doing research for a "man in the middle"-option for Android to get triggered by AutoMagic I found these Windows CMD tools too ...
http://sanyei-imports.com/scott/repo/UD ... isten.html (Win32Bit)
http://sanyei-imports.com/scott/repo/UD ... psend.html (Win32Bit)
http://woshub.com/portqry-tcp-udp-open- ... t-scanner/ (checks if a UDP port is in listening mode)

Re: Tcp/udp Sending and receiving

Posted: 22 Mar 2020 17:45
by Desmanto
You can use nc to listen to incoming UDP too : https://www.thegeekstuff.com/2012/04/nc ... -examples/