Skip to main content
formatting
Source Link
Andrew T.
  • 16.5k
  • 10
  • 76
  • 127

I use MQTT to handle firing tasks from the command line. This doesn't require root, or to be connected by usbUSB for adbADB.

Place this batch file in your path:

cat post.cmd @echo off set _tail=%* call set _tail=%%_tail:*%1 =%% mosquitto_pub -h %ip% -p %port% -i "My_pc" -t '%1' -m '%_tail%' echo Topic: %1 echo Msg: %_tail%

cat post.cmd
@echo off
set _tail=%*
call set _tail=%%_tail:*%1 =%%
mosquitto_pub -h %ip% -p %port% -i "My_pc" -t '%1' -m '%_tail%'
echo Topic: %1
echo Msg: %_tail%

ThanThen make a profile using the "Mqtt client" app, listening to S10/# (my phone is an S10, Setset any topic name you'd perferprefer)

Profile: S10/# (431) Cooldown: 1 Restore: no Event: Message Arrived [ Configuration:Main - (Your mqtt broker IP here) : # : msg : topic : : ]

Profile: S10/# (431)
Cooldown: 1
Restore: no
Event: Message Arrived [ Configuration:Main - (Your mqtt broker IP here) : # : msg : topic : : ] 

Have it target this task. ( II couldn't share mine without giving you my MQtt IP address hehe )

https://taskernet.com/shares/?user=AS35m8mBhJAezDTr0Lio7dopdLiBaKgozAOxoCXM7Mh8sS5hSvSst1kEMf5%2FJeJveB%2BsvU8%3D&id=Task%3AMqtt+Listener

Now from the command line.,

post s10 taskname1=:=par1 etc topic : s10 msg: taskname1=:=par1 etc

post s10 taskname1=:=par1 etc
topic : s10
msg: taskname1=:=par1 etc

I use MQTT to handle firing tasks from the command line. This doesn't require root, or to be connected by usb for adb.

Place this batch file in your path:

cat post.cmd @echo off set _tail=%* call set _tail=%%_tail:*%1 =%% mosquitto_pub -h %ip% -p %port% -i "My_pc" -t '%1' -m '%_tail%' echo Topic: %1 echo Msg: %_tail%

Than make a profile using the "Mqtt client" app, listening to S10/# (my phone is an S10, Set any topic name you'd perfer)

Profile: S10/# (431) Cooldown: 1 Restore: no Event: Message Arrived [ Configuration:Main - (Your mqtt broker IP here) : # : msg : topic : : ]

Have it target this task. ( I couldn't share mine without giving you my MQtt IP address hehe )

https://taskernet.com/shares/?user=AS35m8mBhJAezDTr0Lio7dopdLiBaKgozAOxoCXM7Mh8sS5hSvSst1kEMf5%2FJeJveB%2BsvU8%3D&id=Task%3AMqtt+Listener

Now from command line.

post s10 taskname1=:=par1 etc topic : s10 msg: taskname1=:=par1 etc

I use MQTT to handle firing tasks from the command line. This doesn't require root, or to be connected by USB for ADB.

Place this batch file in your path:

cat post.cmd
@echo off
set _tail=%*
call set _tail=%%_tail:*%1 =%%
mosquitto_pub -h %ip% -p %port% -i "My_pc" -t '%1' -m '%_tail%'
echo Topic: %1
echo Msg: %_tail%

Then make a profile using the "Mqtt client" app, listening to S10/# (my phone is an S10, set any topic name you'd prefer)

Profile: S10/# (431)
Cooldown: 1
Restore: no
Event: Message Arrived [ Configuration:Main - (Your mqtt broker IP here) : # : msg : topic : : ] 

Have it target this task. (I couldn't share mine without giving you my MQtt IP address)

https://taskernet.com/shares/?user=AS35m8mBhJAezDTr0Lio7dopdLiBaKgozAOxoCXM7Mh8sS5hSvSst1kEMf5%2FJeJveB%2BsvU8%3D&id=Task%3AMqtt+Listener

Now from the command line,

post s10 taskname1=:=par1 etc
topic : s10
msg: taskname1=:=par1 etc
Source Link

I use MQTT to handle firing tasks from the command line. This doesn't require root, or to be connected by usb for adb.

Place this batch file in your path:

cat post.cmd @echo off set _tail=%* call set _tail=%%_tail:*%1 =%% mosquitto_pub -h %ip% -p %port% -i "My_pc" -t '%1' -m '%_tail%' echo Topic: %1 echo Msg: %_tail%

Than make a profile using the "Mqtt client" app, listening to S10/# (my phone is an S10, Set any topic name you'd perfer)

Profile: S10/# (431) Cooldown: 1 Restore: no Event: Message Arrived [ Configuration:Main - (Your mqtt broker IP here) : # : msg : topic : : ]

Have it target this task. ( I couldn't share mine without giving you my MQtt IP address hehe )

https://taskernet.com/shares/?user=AS35m8mBhJAezDTr0Lio7dopdLiBaKgozAOxoCXM7Mh8sS5hSvSst1kEMf5%2FJeJveB%2BsvU8%3D&id=Task%3AMqtt+Listener

Now from command line.

post s10 taskname1=:=par1 etc topic : s10 msg: taskname1=:=par1 etc