Respond to the connect message from a devtools client (#35745)

* Respond to the "connect" message

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Bump log levels in devtools implementation a bit

If everything is "debug" then nothing stands out.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-03-02 13:16:51 +01:00 committed by GitHub
parent aa26aa1963
commit e7e8ccea20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 12 deletions

View file

@ -12,7 +12,7 @@
use std::net::TcpStream;
use serde::Serialize;
use serde_json::{Map, Value};
use serde_json::{json, Map, Value};
use crate::actor::{Actor, ActorMessageStatus, ActorRegistry};
use crate::actors::device::DeviceActor;
@ -145,6 +145,13 @@ impl Actor for RootActor {
_id: StreamId,
) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
"connect" => {
let message = json!({
"from": "root",
});
let _ = stream.write_json_packet(&message);
ActorMessageStatus::Processed
},
"listAddons" => {
let actor = ListAddonsReply {
from: "root".to_owned(),