void handleTelnet() {
...
if (telnetClient && telnetClient.connected() && telnetClient.available()) {
String cmd = telnetClient.readStringUntil('\n'); cmd.trim();
if (cmd == "status") {
...
EDIT: Thanks @yjftsjthsd-h and @detaro for your suggestions! I tried Telnet via tmux - it worked. Then I tried telnet directly, and it suddenly worked too. Turns out Arduino’s Telnet implementation is single-user only, and my dev machine’s reconnect loop kept the connection open; the working login just fooled me.I still haven't had the luck to have a fully working Home Assistant running inside (rooted) Termux.
Anyone succeeded to start `hass` and have it running without throwing errors?
webdevver•3h ago
theres so much cool hardware on modern smartphones, with quite solid drivers by virtue of the (relatively stringent) android quality requirements, and its all locked away. video encoders, decoders, 3d accelerators, etc, but none of it is really accessible in a power-user kind of way.
some more thoughts...
the android development kit really is very heavy. compared to `gcc -o main main.cpp && ./main`, it is several orders of magnitude away.
the jetpack stuff and whatnot - the big android app shops probably do actually appreciate that stuff. but i wish the dev env 'scaled to zero' as they say, but in the sense of cognitive overload.
could it be time to move away from java, and shift towards everything being a native binary? we have the tools now to make it secure, and its not like phones get faster 'for free' anymore. it would also vastly simplify the developer experience.
nulld3v•1h ago
> the jetpack stuff and whatnot - the big android app shops probably do actually appreciate that stuff. but i wish the dev env 'scaled to zero' as they say, but in the sense of cognitive overload.
I tried to build a small binary that listens for events and launches/wakes an app to do some automation. But apparently there's no way to send Intents or Broadcasts from native code? So I need to boot a JVM in the binary if I want it to communicate with anything else on the system!
Of course, you can always communicate via stdio, but that's useless because everything in Android speaks Intents/Broadcasts. Native code can also do raw Binder calls, but nothing on the system speaks raw Binder.
ActorNightly•18m ago
There is "am" i think which can be invoked to do this.
However, Termux API exists, and is a nice package for calling other services. They have the scripts interface, which calls the actual app over a socket. Kinda inefficient, but at least the work is done.