kouchat icon indicating copy to clipboard operation
kouchat copied to clipboard

send automatically a message, on startup or later

Open pierreHOH opened this issue 2 years ago • 3 comments

I would like to use koutchat to send an "automatic" message from a system, but the console mode does not accept a message as an argument because he can't be sent before the user is connected.

Capability to give a message as an argument which will be sent once the user is connected could be useful for this goal.

pierreHOH avatar Jan 07 '23 19:01 pierreHOH

That is bit specialized. Are you just going to use this in an automated fashion? If that is the case then you can script what you want like I'm doing here:

https://github.com/blurpy/kouchat/blob/master/src/test/java/net/usikkert/kouchat/functional/HitchhikerTest.java

blurpy avatar Jan 08 '23 12:01 blurpy

Hi,

Thank you for your reply.

To explain you a little bit what I want to do, I have a a motorized automatic roof on an astronomy observatory. In order to check if the roof can be closed or not, I check various sensors. According to the result, and especially if a problem occurs, I would like to send a message on my phone.

As I don't know by advance the IP adress of the phone, I can't use simple communication TCP ways and I don't want to develop an android application to publish the IP adress on a server, then read the server before to communicate, etc... (a big labyrinth just for a notification :-)) A mail is not a very good solution because less reactive than a chat solution.

So your good tool with the "test" script seems to match with this need. Thus, the sensor checking is already coded in Java. I'm not a very good developer in Java but I should find how your test code works (especially with comments). I will work about this as soon as possible and I will let you know.

Thank you.

Le dim. 8 janv. 2023 à 13:19, Christian Ihle @.***> a écrit :

That is bit specialized. Are you just going to use this in an automated fashion? If that is the case then you can script what you want like I'm doing here:

https://github.com/blurpy/kouchat/blob/master/src/test/java/net/usikkert/kouchat/functional/HitchhikerTest.java

— Reply to this email directly, view it on GitHub https://github.com/blurpy/kouchat/issues/35#issuecomment-1374822721, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ4SGFDQIUIHUMC2JZUUBGTWRKWFDANCNFSM6AAAAAATUDUKAM . You are receiving this because you authored the thread.Message ID: @.***>

pierreHOH avatar Jan 09 '23 22:01 pierreHOH

That sounds pretty cool, please let me know how it works out.

You can find more examples of scripting a KouChat client in the integration tests for the Android app: https://github.com/blurpy/kouchat-android/tree/master/app/src/androidTest/java/net/usikkert/kouchat/android

blurpy avatar Jan 10 '23 07:01 blurpy