tsathishkumar / MySController-rs

Controller for MySensors, exposes WoT APIs for the sensors. It supports OTA firmware updates, and also acts as proxy for all requests.
GNU Affero General Public License v3.0
20 stars 9 forks source link

Latest build results #14

Closed flatsiedatsie closed 5 years ago

flatsiedatsie commented 5 years ago

Perhaps it's useful, so here are the latest results from "cargo run":

pi@gateway:~ $ cd MySController-rs/ pi@gateway:~/MySController-rs $ git pull remote: Enumerating objects: 83, done. remote: Counting objects: 100% (83/83), done. remote: Compressing objects: 100% (36/36), done. remote: Total 63 (delta 44), reused 44 (delta 26), pack-reused 0 Unpacking objects: 100% (63/63), done. From https://github.com/tsathishkumar/MySController-rs 85a1ef9..d8f4b0e master -> origin/master Updating 85a1ef9..d8f4b0e Fast-forward .bintray.json 6 +- .travis.yml 1 + Cargo.lock 2 +- Cargo.toml 16 ++--- README.md 16 ++++- build.sh 24 ++----- .../down.sql 1 + .../up.sql 1 + src/core/interceptor.rs 33 ++++----- src/core/message/internal.rs 83 ++++++++++++++++++++++ src/core/message/mod.rs 13 +++- src/core/message_handler/internal.rs 64 ++++++++++++----- src/core/server.rs 3 +- src/handler/node.rs 1 + src/model/node.rs 2 + 15 files changed, 195 insertions(+), 71 deletions(-) create mode 100644 migrations/2018-10-12-103949_add_parent_node_id_in_nodes/down.sql create mode 100644 migrations/2018-10-12-103949_add_parent_node_id_in_nodes/up.sql create mode 100644 src/core/message/internal.rs pi@gateway:~/MySController-rs $ cargo run Compiling myscontroller-rs v0.6.1 (/home/pi/MySController-rs)
warning: unused import: hex
--> src/core/message/internal.rs:2:5
2 use hex;
^^^

= note: #[warn(unused_imports)] on by default

warning: unused import: std::mem
--> src/core/message/internal.rs:5:5
|
5 | use std::mem;
| ^^^^^^^^

warning: unnecessary parentheses around method argument
--> src/core/message_handler/internal.rs:82:14
82 .set((parent_node_id.eq(_parent_node_id))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses

= note: #[warn(unused_parens)] on by default

warning: cannot find type table in this scope
--> <::diesel::macros::table_body macros>:165:33
165 derive ( Debug , Clone , Copy , QueryId ) ] /// The actual table struct ^^^^^^^ names from parent modules are not accessible without an explicit import
= note: #[warn(proc_macro_derive_resolution_fallback)] on by default        
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 <https://github.com/rust-lang/rust/issues/50504>
warning: cannot find type table in this scope
--> <::diesel::macros::table_body macros>:165:33
165 derive ( Debug , Clone , Copy , QueryId ) ] /// The actual table struct ^^^^^^^ names from parent modules are not accessible without an explicit import
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 <https://github.com/rust-lang/rust/issues/50504>
warning: cannot find type firmware_type in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type firmware_version in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type name in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type blocks in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type crc in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type data in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type Firmware in this scope
--> src/model/firmware.rs:23:10
23 #[derive(Queryable, Serialize, Deserialize, Insertable, Clone)] ^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type firmwares in this scope
--> src/model/firmware.rs:23:45
23 #[derive(Queryable, Serialize, Deserialize, Insertable, Clone)] ^^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type Firmware in this scope
--> src/model/firmware.rs:23:45
23 #[derive(Queryable, Serialize, Deserialize, Insertable, Clone)] ^^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type node_id in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type node_name in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type desired_firmware_type in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type desired_firmware_version in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type auto_update in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type scheduled in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type parent_node_id in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type Node in this scope
--> src/model/node.rs:15:10
15 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug)] ^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type nodes in this scope
--> src/model/node.rs:15:45
15 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug)] ^^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type Node in this scope
--> src/model/node.rs:15:45
15 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug)] ^^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type child_sensor_id in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type sensor_type in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type description in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type PresentationType in this scope
--> src/model/sensor.rs:16:10
16 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug, PartialEq, Clone)] ^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type Sensor in this scope
--> src/model/sensor.rs:16:10
16 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug, PartialEq, Clone)] ^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type sensors in this scope
--> src/model/sensor.rs:16:45
16 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug, PartialEq, Clone)] ^^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type Sensor in this scope
--> src/model/sensor.rs:16:45
16 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug, PartialEq, Clone)] ^^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type PresentationType in this scope
--> src/model/sensor.rs:16:45
16 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug, PartialEq, Clone)] ^^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: unused variable: ack
--> src/core/message_handler/internal.rs:38:65
38 InternalMessage {node_id, child_sensor_id: 255, ack, sub_type: InternalType::DiscoverResponse, ref payload } => { ^^^ help: try ignoring the field: ack: _

= note: #[warn(unused_variables)] on by default

warning: constant item is never used: MAX_MESSAGE_LENGTH
--> src/core/message/internal.rs:7:1
7 const MAX_MESSAGE_LENGTH: usize = 32; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

= note: #[warn(dead_code)] on by default

Finished dev [unoptimized + debuginfo] target(s) in 6m 13s                  
 Running `target/debug/myscontroller-rs`

INFO 2018-10-23T12:51:35Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-23T12:51:35Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 Running migration 20181012103949 thread 'main' panicked at 'called Result::unwrap() on an Err value: QueryError(DatabaseError(Unknown, "attempt to write a readonly database"))', libcore/result.rs:1009:5 stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::print at libstd/sys_common/backtrace.rs:71 at libstd/sys_common/backtrace.rs:59 2: std::panicking::default_hook::{{closure}} at libstd/panicking.rs:211 3: std::panicking::default_hook at libstd/panicking.rs:227 4: std::panicking::rust_panic_with_hook at libstd/panicking.rs:476 5: std::panicking::continue_panic_fmt at libstd/panicking.rs:390 6: rust_begin_unwind at libstd/panicking.rs:325 7: core::panicking::panic_fmt at libcore/panicking.rs:77 8: core::result::unwrap_failed at libcore/macros.rs:26 9: <core::result::Result<T, E>>::unwrap at libcore/result.rs:808 10: myscontroller_rs::main at src/main.rs:105 11: std::rt::lang_start::{{closure}} at libstd/rt.rs:74 12: std::panicking::try::do_call at libstd/rt.rs:59 at libstd/panicking.rs:310 13: __rust_maybe_catch_panic at libpanic_unwind/lib.rs:102 14: std::panicking::try at libstd/panicking.rs:289 15: std::rt::lang_start_internal at libstd/panic.rs:392 at libstd/rt.rs:58 16: std::rt::lang_start at libstd/rt.rs:74 17: main 18: libc_start_main pi@gateway:~/MySController-rs $

tsathishkumar commented 5 years ago

I guess the sqlite database file permission is missing. Could you try running with sudo, or change the file permission of the database file.

tsathishkumar commented 5 years ago

BTW, I'm working on the warnings. Once that is fixed, we should be able to clearly see the error messages.

flatsiedatsie commented 5 years ago

I guess the sqlite database file permission is missing. Could you try running with sudo, or change the file permission of the database file.

running "sudo cargo run" is not possible ("sudo: cargo: command not found")

I also tried "cargo build --release" today. It compiled (slowly), but after that I couldn't find the executable. There was no "target" folder.

flatsiedatsie commented 5 years ago

Trying to get things to work. I added two devices, one on port 8888 and one on port 8000, since that's the port I keep seeing in the logs, even though the about file mentions port 8888.

Oct 23 21:46:30 gateway run-app.sh[562]: 2018-10-23 21:46:30.209 thing-url: Failed to parse description at http://localhost:8000: SyntaxError: Unexpected token A in JSON at position 0 Oct 23 21:46:40 gateway run-app.sh[562]: 2018-10-23 21:46:40.222 thing-url: Failed to connect to http://localhost:8888: FetchError: request to http://localhost:8888/ failed, reason: connect ECONNREFUSED 127.0.0.1:8888

flatsiedatsie commented 5 years ago

Here's a random bit of log from the console:

pi@gateway:~/MySController-rs $ sudo ./target/debug/myscontroller-rs INFO 2018-10-23T19:40:03Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-23T19:40:03Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 Running migration 20180416170858 Running migration 20180425200801 Running migration 20180515193701 Running migration 20180530120000 Running migration 20181012103949 INFO 2018-10-23T19:40:03Z: myscontroller_rs: Starting proxy server INFO 2018-10-23T19:40:03Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... INFO 2018-10-23T19:40:03Z: myscontroller_rs::core::connection: Server listening on -- 0.0.0.0:5004 INFO 2018-10-23T19:40:03Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 INFO 2018-10-23T19:40:03Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-10-23T19:40:03Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" INFO 2018-10-23T19:40:03Z: myscontroller_rs::core::message_handler::presentation: Created Sensor { node_id: 0, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.3.0" } INFO 2018-10-23T19:40:04Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:40:09Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:40:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:40:19Z: actix_web::middleware::logger: 127.0.0.1:33418 [23/Oct/2018:21:40:19 +0200] "GET / HTTP/1.1" 200 116 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.003014 INFO 2018-10-23T19:40:19Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:40:24Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:40:29Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:40:34Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:40:35Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;255;3;0;6;1\n" INFO 2018-10-23T19:40:37Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;255;3;0;11;Fine dust sensor\n" INFO 2018-10-23T19:40:37Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;255;3;0;12;1.1\n" INFO 2018-10-23T19:40:37Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;0;0;24;\n" INFO 2018-10-23T19:40:37Z: myscontroller_rs::core::message_handler::presentation: Created Sensor { node_id: 1, child_sensor_id: 0, sensor_type: Dust, description: "" } INFO 2018-10-23T19:40:37Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;0;0;24;\n" INFO 2018-10-23T19:40:37Z: myscontroller_rs::core::message_handler::presentation: Created Sensor { node_id: 1, child_sensor_id: 1, sensor_type: Dust, description: "" } INFO 2018-10-23T19:40:39Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:40:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;7\n" WARN 2018-10-23T19:40:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "7" } } INFO 2018-10-23T19:40:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;7\n" WARN 2018-10-23T19:40:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "7" } } INFO 2018-10-23T19:40:44Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:40:49Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:40:52Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;1;0;37;15.2\n" WARN 2018-10-23T19:40:52Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "15.2" } } INFO 2018-10-23T19:40:53Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;1;0;37;4.6\n" WARN 2018-10-23T19:40:53Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 1, ack: 0, value: Value { set_type: Level, value: "4.6" } } INFO 2018-10-23T19:40:54Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:40:59Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:41:04Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:41:09Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:41:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:41:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;1;0;37;81\n" WARN 2018-10-23T19:41:14Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "81" } } INFO 2018-10-23T19:41:19Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:41:19Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;2;1;0;37;81\n" WARN 2018-10-23T19:41:19Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 2, ack: 0, value: Value { set_type: Level, value: "81" } } INFO 2018-10-23T19:41:24Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:41:24Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;4;1;0;37;78\n" WARN 2018-10-23T19:41:24Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 4, ack: 0, value: Value { set_type: Level, value: "78" } } INFO 2018-10-23T19:41:29Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:41:29Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;6;1;0;37;71\n" WARN 2018-10-23T19:41:29Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 6, ack: 0, value: Value { set_type: Level, value: "71" } } INFO 2018-10-23T19:41:34Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:41:34Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;8;1;0;37;1\n" WARN 2018-10-23T19:41:34Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 8, ack: 0, value: Value { set_type: Level, value: "1" } } INFO 2018-10-23T19:41:39Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:41:39Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;10;1;0;37;17\n" WARN 2018-10-23T19:41:39Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 10, ack: 0, value: Value { set_type: Level, value: "17" } } INFO 2018-10-23T19:41:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;4\n" WARN 2018-10-23T19:41:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "4" } } INFO 2018-10-23T19:41:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;4\n" WARN 2018-10-23T19:41:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "4" } } INFO 2018-10-23T19:41:44Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:41:49Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:41:53Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;1;0;37;10.5\n" WARN 2018-10-23T19:41:53Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "10.5" } } INFO 2018-10-23T19:41:54Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;1;0;37;3.2\n" WARN 2018-10-23T19:41:54Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 1, ack: 0, value: Value { set_type: Level, value: "3.2" } } INFO 2018-10-23T19:41:54Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:41:59Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:42:04Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:42:09Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:42:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:42:19Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:42:24Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:42:29Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:42:29Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;255;0;0;18;2.2.0\n" INFO 2018-10-23T19:42:29Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;255;3;0;6;7\n" INFO 2018-10-23T19:42:29Z: myscontroller_rs::core::message_handler::presentation: Created Sensor { node_id: 1, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.2.0" } INFO 2018-10-23T19:42:31Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;255;3;0;11;Fine dust sensor\n" INFO 2018-10-23T19:42:31Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;255;3;0;12;1.1\n" INFO 2018-10-23T19:42:31Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;0;0;24;\n" INFO 2018-10-23T19:42:32Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;0;0;24;\n" INFO 2018-10-23T19:42:34Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:42:39Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:42:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;255;3;0;1;\n" INFO 2018-10-23T19:42:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;2\n" WARN 2018-10-23T19:42:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "2" } } INFO 2018-10-23T19:42:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;2\n" WARN 2018-10-23T19:42:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "2" } } INFO 2018-10-23T19:42:44Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:42:46Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;1;0;37;18.6\n" WARN 2018-10-23T19:42:46Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "18.6" } } INFO 2018-10-23T19:42:47Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;1;0;37;4.6\n" WARN 2018-10-23T19:42:47Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 1, ack: 0, value: Value { set_type: Level, value: "4.6" } } INFO 2018-10-23T19:42:49Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:42:54Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:42:59Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:43:04Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:43:09Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:43:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:43:19Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:43:24Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:43:27Z: actix_web::middleware::logger: 127.0.0.1:33444 [23/Oct/2018:21:43:27 +0200] "GET / HTTP/1.1" 200 116 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.002650 INFO 2018-10-23T19:43:29Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:43:34Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:43:39Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:43:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;3\n" WARN 2018-10-23T19:43:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "3" } } INFO 2018-10-23T19:43:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;3\n" WARN 2018-10-23T19:43:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "3" } } INFO 2018-10-23T19:43:44Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:43:47Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;1;0;37;19.6\n" WARN 2018-10-23T19:43:47Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "19.6" } } INFO 2018-10-23T19:43:48Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;1;0;37;5.1\n" WARN 2018-10-23T19:43:48Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 1, ack: 0, value: Value { set_type: Level, value: "5.1" } } INFO 2018-10-23T19:43:49Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:43:54Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:43:59Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:44:04Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:44:09Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:44:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:44:19Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:44:24Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:44:29Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:44:34Z: actix_web::middleware::logger: 127.0.0.1:33446 [23/Oct/2018:21:44:34 +0200] "GET / HTTP/1.1" 200 116 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.002712 INFO 2018-10-23T19:44:34Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:44:39Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:44:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;4\n" WARN 2018-10-23T19:44:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "4" } } INFO 2018-10-23T19:44:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;4\n" WARN 2018-10-23T19:44:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "4" } } INFO 2018-10-23T19:44:44Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:44:48Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;1;0;37;16.4\n" WARN 2018-10-23T19:44:48Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "16.4" } } INFO 2018-10-23T19:44:49Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;1;0;37;4.7\n" WARN 2018-10-23T19:44:49Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 1, ack: 0, value: Value { set_type: Level, value: "4.7" } } INFO 2018-10-23T19:44:49Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:44:54Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:44:59Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:45:04Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:45:09Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:45:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:45:19Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:45:24Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:45:29Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:45:34Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:45:39Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:45:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;5\n" WARN 2018-10-23T19:45:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "5" } } INFO 2018-10-23T19:45:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;5\n" WARN 2018-10-23T19:45:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "5" } } INFO 2018-10-23T19:45:44Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:45:49Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;1;0;37;11.3\n" WARN 2018-10-23T19:45:49Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "11.3" } } INFO 2018-10-23T19:45:49Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:45:50Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;1;0;37;3.3\n" WARN 2018-10-23T19:45:50Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 1, ack: 0, value: Value { set_type: Level, value: "3.3" } } INFO 2018-10-23T19:45:54Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:45:59Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:46:04Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:46:09Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:46:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:46:18Z: actix_web::middleware::logger: 127.0.0.1:33448 [23/Oct/2018:21:46:18 +0200] "GET / HTTP/1.1" 200 116 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.003004 INFO 2018-10-23T19:46:19Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:46:24Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:46:29Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:46:30Z: actix_web::middleware::logger: 127.0.0.1:33462 [23/Oct/2018:21:46:30 +0200] "GET / HTTP/1.1" 200 116 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.002459 INFO 2018-10-23T19:46:34Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:46:39Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:46:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;2\n" WARN 2018-10-23T19:46:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "2" } } INFO 2018-10-23T19:46:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;2\n" WARN 2018-10-23T19:46:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "2" } } INFO 2018-10-23T19:46:44Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:46:49Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:46:50Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;1;0;37;10.1\n" WARN 2018-10-23T19:46:50Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "10.1" } } INFO 2018-10-23T19:46:51Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;1;0;37;3.4\n" WARN 2018-10-23T19:46:51Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 1, ack: 0, value: Value { set_type: Level, value: "3.4" } } INFO 2018-10-23T19:46:54Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:46:59Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:47:04Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:47:09Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:47:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:47:19Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:47:24Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:47:29Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:47:34Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:47:39Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:47:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;255;3;0;1;\n" INFO 2018-10-23T19:47:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;1\n" WARN 2018-10-23T19:47:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "1" } } INFO 2018-10-23T19:47:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;1\n" WARN 2018-10-23T19:47:40Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "1" } } INFO 2018-10-23T19:47:44Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:47:49Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-23T19:47:51Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;1;0;37;21.2\n" WARN 2018-10-23T19:47:51Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "21.2" } } INFO 2018-10-23T19:47:52Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;1;0;37;3.9\n" WARN 2018-10-23T19:47:52Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 1, ack: 0, value: Value { set_type: Level, value: "3.9" } } INFO 2018-10-23T19:47:54Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-23T19:47:59Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:48:04Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n"

flatsiedatsie commented 5 years ago

If I use the 5003 port on both places in the conf.ini file, I get an error. So:

` encoding=utf-8

[Gateway] type=TCP port=127.0.0.1:5003

[Controller] type=TCP port=0.0.0.0:5003

[Server] database_url=/var/lib/myscontroller-rs/sqlite.db `

Which leads to an error:

pi@gateway:~/MySController-rs/target/debug $ sudo ./myscontroller-rs INFO 2018-10-23T19:57:16Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-23T19:57:16Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 INFO 2018-10-23T19:57:16Z: myscontroller_rs: Starting proxy server INFO 2018-10-23T19:57:16Z: myscontroller_rs::core::connection: Waiting for server connection -- 127.0.0.1:5003 ... thread '' panicked at 'called Result::unwrap() on an Err value: Os { code: 98, kind: AddrInUse, message: "Address already in use" } INFO 2018-10-23T19:57:16Z: myscontroller_rs::core::connection: Connected to -- 127.0.0.1:5003 ', libcore/result.rs:1009:5 INFO 2018-10-23T19:57:16Z: myscontroller_rs::core::connection: 127.0.0.1:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-10-23T19:57:16Z: myscontroller_rs::core::connection: 127.0.0.1:5003 >> "0;255;0;0;18;2.3.0\n" note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace. stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::print at libstd/sys_common/backtrace.rs:71 at libstd/sys_common/backtrace.rs:59 2: std::panicking::default_hook::{{closure}} at libstd/panicking.rs:211 3: std::panicking::default_hook at libstd/panicking.rs:227 4: std::panicking::rust_panic_with_hook at libstd/panicking.rs:476 5: std::panicking::continue_panic_fmt at libstd/panicking.rs:390 6: rust_begin_unwind at libstd/panicking.rs:325 7: core::panicking::panic_fmt at libcore/panicking.rs:77 8: core::result::unwrap_failed at libcore/macros.rs:26 9: <core::result::Result<T, E>>::unwrap at libcore/result.rs:808 10: myscontroller_rs::core::connection::create_connection at src/core/connection.rs:189 11: myscontroller_rs::core::connection::stream_read_write at src/core/connection.rs:133 12: myscontroller_rs::core::server::start::{{closure}} at src/core/server.rs:82 INFO 2018-10-23T19:57:19Z: myscontroller_rs::core::connection: 127.0.0.1:5003 >> "1;7;2;0;3;\n" INFO 2018-10-23T19:57:24Z: myscontroller_rs::core::connection: 127.0.0.1:5003 >> "1;9;2;0;3;\n" INFO 2018-10-23T19:57:29Z: myscontroller_rs::core::connection: 127.0.0.1:5003 >> "1;11;2;0;3;\n" INFO 2018-10-23T19:57:34Z: myscontroller_rs::core::connection: 127.0.0.1:5003 >> "1;1;2;0;3;\n" INFO 2018-10-23T19:57:37Z: myscontroller_rs::core::connection: 127.0.0.1:5003 >> "1;255;3;0;21;0\n" INFO 2018-10-23T19:57:37Z: myscontroller_rs::core::message_handler::internal: Updated network topology

flatsiedatsie commented 5 years ago

It even seems to lead to an undervoltage situation, although it could just be a coincidence.

Oct 23 22:02:55 gateway run-app.sh[562]: 2018-10-23 22:02:55.058 Loading add-on: thing-url-adapter Oct 23 22:02:56 gateway run-app.sh[562]: 2018-10-23 22:02:56.619 thing-url: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3 Oct 23 22:02:56 gateway run-app.sh[562]: 2018-10-23 22:02:56.696 thing-url: Loading add-on for thing-url-adapter from /home/pi/.mozilla-iot/addons/thing-url-adapter Oct 23 22:02:57 gateway run-app.sh[562]: 2018-10-23 22:02:57.715 thing-url: Starting mDNS discovery Oct 23 22:02:57 gateway run-app.sh[562]: 2018-10-23 22:02:57.744 thing-url: Disabling bluetooth scanning Oct 23 22:03:07 gateway run-app.sh[562]: 2018-10-23 22:03:07.875 thing-url: Failed to connect to https://127.0.0.1:8888: FetchError: request to https://127.0.0.1:8888/ failed, reason: connect ECONNREFUSED 127.0.0.1:8888 Oct 23 22:03:17 gateway run-app.sh[562]: 2018-10-23 22:03:17.628 About to call startPairing on GenericSensorsAdapter Oct 23 22:03:17 gateway run-app.sh[562]: 2018-10-23 22:03:17.631 About to call startPairing on ThingURLAdapter Oct 23 22:03:17 gateway run-app.sh[562]: 2018-10-23 22:03:17.667 Opened a new things socket Oct 23 22:03:17 gateway run-app.sh[562]: 2018-10-23 22:03:17.685 generic-sensors: Adapter: GenericSensorsAdapter id generic-sensors-adapter pairing started Oct 23 22:03:27 gateway run-app.sh[562]: 2018-10-23 22:03:27.711 thing-url: Failed to connect to https://127.0.0.1:8888: FetchError: request to https://127.0.0.1:8888/ failed, reason: connect ECONNREFUSED 127.0.0.1:8888 Oct 23 22:03:38 gateway kernel: rpi_firmware_get_throttled: 4 callbacks suppressed Oct 23 22:03:38 gateway kernel: Voltage normalised (0x00000000) Oct 23 22:03:40 gateway kernel: rpi_firmware_get_throttled: 4 callbacks suppressed Oct 23 22:03:40 gateway kernel: Under-voltage detected! (0x00050005) Oct 23 22:04:17 gateway run-app.sh[562]: 2018-10-23 22:04:17.636 Pairing timeout Oct 23 22:04:17 gateway run-app.sh[562]: 2018-10-23 22:04:17.639 Thing was not added Oct 23 22:04:17 gateway run-app.sh[562]: 2018-10-23 22:04:17.641 addNewThing cancelled Oct 23 22:04:17 gateway run-app.sh[562]: 2018-10-23 22:04:17.643 generic-sensors: Adapter: GenericSensorsAdapter id generic-sensors-adapter pairing cancelled Oct 23 22:04:17 gateway run-app.sh[562]: 2018-10-23 22:04:17.644 thing-url: Adapter: ThingURLAdapter id thing-url-adapter pairing cancelled

flatsiedatsie commented 5 years ago

I just discovered that I can go to the IP address of the Raspberry Pi

http://192.168.2.7:8000/

That shows a tiny API details page.

If I try and visit:

http://192.168.2.7:8000/nodes

..that gives an empty json:

[]

flatsiedatsie commented 5 years ago

It seems the 'generic adapter' dies when trying to poll the devices. This is from journalCTL:

Oct 23 22:48:07 gateway run-app.sh[592]: Package not enabled: zigbee-adapter Oct 23 22:48:07 gateway run-app.sh[592]: 2018-10-23 22:48:07.156 Package not enabled: zwave-adapter Oct 23 22:48:07 gateway run-app.sh[592]: 2018-10-23 22:48:07.159 Failed to load add-on: zwave-adapter Oct 23 22:48:07 gateway run-app.sh[592]: Package not enabled: zwave-adapter Oct 23 22:48:07 gateway run-app.sh[592]: 2018-10-23 22:48:07.165 Package not enabled: virtual-things-adapter Oct 23 22:48:07 gateway run-app.sh[592]: 2018-10-23 22:48:07.167 Failed to load add-on: virtual-things-adapter Oct 23 22:48:07 gateway run-app.sh[592]: Package not enabled: virtual-things-adapter Oct 23 22:48:07 gateway myscontroller-rs[326]: INFO 2018-10-23T20:48:07Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:8080 Oct 23 22:48:08 gateway run-app.sh[592]: 2018-10-23 22:48:08.645 generic-sensors: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3 Oct 23 22:48:08 gateway run-app.sh[592]: 2018-10-23 22:48:08.728 generic-sensors: Loading add-on for generic-sensors-adapter from /home/pi/.mozilla-iot/addons/generic-sensors-adap Oct 23 22:48:08 gateway run-app.sh[592]: 2018-10-23 22:48:08.768 Checking for add-on updates... Oct 23 22:48:08 gateway run-app.sh[592]: 2018-10-23 22:48:08.931 thing-url: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3 Oct 23 22:48:08 gateway run-app.sh[592]: 2018-10-23 22:48:08.948 thing-url: Loading add-on for thing-url-adapter from /home/pi/.mozilla-iot/addons/thing-url-adapter Oct 23 22:48:09 gateway run-app.sh[592]: 2018-10-23 22:48:09.940 thing-url: Starting mDNS discovery Oct 23 22:48:09 gateway run-app.sh[592]: 2018-10-23 22:48:09.973 thing-url: Disabling bluetooth scanning Oct 23 22:48:10 gateway myscontroller-rs[326]: INFO 2018-10-23T20:48:10Z: actix_web::middleware::logger: 192.168.2.7:44156 [23/Oct/2018:22:48:10 +0200] "GET / HTTP/1.1" 200 116 " Oct 23 22:48:10 gateway run-app.sh[592]: 2018-10-23 22:48:10.307 thing-url: Failed to parse description at http://192.168.2.7:8000: SyntaxError: Unexpected token A in JSON at posi Oct 23 22:48:11 gateway sudo[1404]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/usr/sbin/service myscontroller-rs status Oct 23 22:48:11 gateway sudo[1404]: pam_unix(sudo:session): session opened for user root by pi(uid=0) Oct 23 22:48:19 gateway run-app.sh[592]: 2018-10-23 22:48:19.946 getValue for property level for: Ambient Light Sensor returning 0 Oct 23 22:48:19 gateway run-app.sh[592]: 2018-10-23 22:48:19.947 getValue for property on for: Ambient Light Sensor returning false Oct 23 22:48:19 gateway run-app.sh[592]: 2018-10-23 22:48:19.996 getValue for property level for: Temperature Sensor returning 0 Oct 23 22:48:19 gateway run-app.sh[592]: 2018-10-23 22:48:19.996 getValue for property on for: Temperature Sensor returning false Oct 23 22:48:32 gateway run-app.sh[592]: 2018-10-23 22:48:32.893 PropertyProxy: setProperty property: on for: 0 to value: true Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.946 generic-sensors: /home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/generic-sensors-lite/ambientlig Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.946 generic-sensors: throw new Error(err); Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.946 generic-sensors: ^ Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.947 generic-sensors: Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.947 generic-sensors: Error: null Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.947 generic-sensors: at AmbientLight.onerror (/home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/gene Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.947 generic-sensors: at /home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/generic-sensors-lite/ambie Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.948 generic-sensors: at /home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/bh1750/bh1750.js:25:20 Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.948 generic-sensors: at Immediate._onImmediate (/home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/i2 Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.948 generic-sensors: at runCallback (timers.js:810:20) Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.948 generic-sensors: at tryOnImmediate (timers.js:768:5) Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.949 generic-sensors: at processImmediate [as _immediateCallback] (timers.js:745:5) Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.949 generic-sensors:

Maybe slight overlap with:

Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.949 generic-sensors: at processImmediate [as _immediateCallback] (timers.js:745:5) Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.949 generic-sensors: Oct 23 22:48:33 gateway run-app.sh[592]: 2018-10-23 22:48:33.973 Plugin: generic-sensors-adapter died, code = 1 restarting... Oct 23 22:48:35 gateway run-app.sh[592]: 2018-10-23 22:48:35.585 generic-sensors: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3 Oct 23 22:48:35 gateway run-app.sh[592]: 2018-10-23 22:48:35.669 generic-sensors: Loading add-on for generic-sensors-adapter from /home/pi/.mozilla-iot/addons/generic-sensors-adap Oct 23 22:48:39 gateway run-app.sh[592]: 2018-10-23 22:48:39.582 PropertyProxy: setProperty property: on for: 1 to value: true Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.937 generic-sensors: /home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/generic-sensors-lite/temperatur Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.937 generic-sensors: throw new Error(err); Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.938 generic-sensors: ^ Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.938 generic-sensors: Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.938 generic-sensors: Error: Invalid data Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.938 generic-sensors: at TemperatureSensor.onerror (/home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.939 generic-sensors: at /home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/generic-sensors-lite/tempe Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.939 generic-sensors: at /home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/bmp085/bmp085.js:290:13 Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.939 generic-sensors: at BMP085.calibrate (/home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/bmp085/b Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.939 generic-sensors: at Timeout._onTimeout (/home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/bmp085 Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.940 generic-sensors: at ontimeout (timers.js:498:11) Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.940 generic-sensors: at tryOnTimeout (timers.js:323:5) Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.940 generic-sensors: at Timer.listOnTimeout (timers.js:290:5) Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.940 generic-sensors: Oct 23 22:48:42 gateway run-app.sh[592]: 2018-10-23 22:48:42.974 Plugin: generic-sensors-adapter died, code = 1 restarting... Oct 23 22:48:44 gateway run-app.sh[592]: 2018-10-23 22:48:44.571 generic-sensors: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3 Oct 23 22:48:44 gateway run-app.sh[592]: 2018-10-23 22:48:44.655 generic-sensors: Loading add-on for generic-sensors-adapter from /home/pi/.mozilla-iot/addons/generic-sensors-adap Oct 23 22:48:54 gateway run-app.sh[592]: 2018-10-23 22:48:54.318 About to call startPairing on ThingURLAdapter Oct 23 22:48:54 gateway run-app.sh[592]: 2018-10-23 22:48:54.320 About to call startPairing on GenericSensorsAdapter Oct 23 22:48:54 gateway run-app.sh[592]: 2018-10-23 22:48:54.351 generic-sensors: Adapter: GenericSensorsAdapter id generic-sensors-adapter pairing started Oct 23 22:48:54 gateway myscontroller-rs[326]: INFO 2018-10-23T20:48:54Z: actix_web::middleware::logger: 192.168.2.7:44158 [23/Oct/2018:22:48:54 +0200] "GET / HTTP/1.1" 200 116 " Oct 23 22:48:54 gateway run-app.sh[592]: 2018-10-23 22:48:54.367 Opened a new things socket Oct 23 22:48:54 gateway run-app.sh[592]: 2018-10-23 22:48:54.387 thing-url: Failed to parse description at http://192.168.2.7:8000: SyntaxError: Unexpected token A in JSON at posi Oct 23 22:49:34 gateway sudo[1404]: pam_unix(sudo:session): session closed for user root Oct 23 22:49:38 gateway sudo[1440]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/usr/sbin/service myscontroller-rs stop Oct 23 22:49:38 gateway sudo[1440]: pam_unix(sudo:session): session opened for user root by pi(uid=0) Oct 23 22:49:40 gateway myscontroller-rs[326]: INFO 2018-10-23T20:49:40Z: actix_web::server::srv: SIGTERM received, stopping Oct 23 22:49:40 gateway myscontroller-rs[326]: INFO 2018-10-23T20:49:40Z: actix_web::server::worker: Shutting down http worker, 0 connections Oct 23 22:49:40 gateway myscontroller-rs[326]: INFO 2018-10-23T20:49:40Z: actix_web::server::worker: Shutting down http worker, 0 connections Oct 23 22:49:40 gateway myscontroller-rs[326]: INFO 2018-10-23T20:49:40Z: actix_web::server::worker: Shutting down http worker, 0 connections Oct 23 22:49:40 gateway myscontroller-rs[326]: INFO 2018-10-23T20:49:40Z: actix_web::server::worker: Shutting down http worker, 0 connections Oct 23 22:49:40 gateway systemd[1]: Stopping MYSController-rs... Oct 23 22:49:40 gateway systemd[1]: Stopped MYSController-rs. Oct 23 22:49:40 gateway sudo[1440]: pam_unix(sudo:session): session closed for user root Oct 23 22:49:53 gateway sudo[1472]: pi : TTY=pts/0 ; PWD=/home/pi/MySController-rs ; USER=root ; COMMAND=./target/debug/myscontroller-rs Oct 23 22:49:53 gateway sudo[1472]: pam_unix(sudo:session): session opened for user root by pi(uid=0) Oct 23 22:49:54 gateway run-app.sh[592]: 2018-10-23 22:49:54.323 Pairing timeout Oct 23 22:49:54 gateway run-app.sh[592]: 2018-10-23 22:49:54.329 Thing was not added Oct 23 22:49:54 gateway run-app.sh[592]: 2018-10-23 22:49:54.329 addNewThing cancelled Oct 23 22:49:54 gateway run-app.sh[592]: 2018-10-23 22:49:54.334 thing-url: Adapter: ThingURLAdapter id thing-url-adapter pairing cancelled Oct 23 22:49:54 gateway run-app.sh[592]: 2018-10-23 22:49:54.336 generic-sensors: Adapter: GenericSensorsAdapter id generic-sensors-adapter pairing cancelled

flatsiedatsie commented 5 years ago

And a final bit of console reporting:

pi@gateway:~ $ sudo service myscontroller-rs stop pi@gateway:~ $ cd MySController-rs/ pi@gateway:~/MySController-rs $ sudo ./target/debug/myscontroller-rs INFO 2018-10-23T20:49:53Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-23T20:49:53Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 INFO 2018-10-23T20:49:53Z: myscontroller_rs: Starting proxy server INFO 2018-10-23T20:49:53Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:8080 ... thread '' panicked at 'called Result::unwrap() on an Err value: Os { code: 98, kind: AddrInUse, message: "Address already in use" }', libcore/result.rs:1009:5 INFO 2018-10-23T20:49:53Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:8080 note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace. stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::print at libstd/sys_common/backtrace.rs:71 at libstd/sys_common/backtrace.rs:59 2: std::panicking::default_hook::{{closure}} at libstd/panicking.rs:211 3: std::panicking::default_hook at libstd/panicking.rs:227 4: std::panicking::rust_panic_with_hook at libstd/panicking.rs:476 5: std::panicking::continue_panic_fmt at libstd/panicking.rs:390 6: rust_begin_unwind at libstd/panicking.rs:325 7: core::panicking::panic_fmt at libcore/panicking.rs:77 8: core::result::unwrap_failed at libcore/macros.rs:26 9: <core::result::Result<T, E>>::unwrap at libcore/result.rs:808 10: myscontroller_rs::core::connection::create_connection at src/core/connection.rs:189 11: myscontroller_rs::core::connection::stream_read_write at src/core/connection.rs:133 12: myscontroller_rs::core::server::start::{{closure}} at src/core/server.rs:82 ERROR 2018-10-23T20:51:53Z: myscontroller_rs::core::connection: Error while reading -- reached EOF INFO 2018-10-23T20:51:53Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:8080 ... INFO 2018-10-23T20:51:53Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:8080 ERROR 2018-10-23T20:53:53Z: myscontroller_rs::core::connection: Error while reading -- reached EOF INFO 2018-10-23T20:53:53Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:8080 ... INFO 2018-10-23T20:53:53Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:8080 thread 'arbiter:"7d9b1728-3687-4d91-b2a5-2a1a4e573e10":"actor"' panicked at 'called Result::unwrap() on an Err value: ParseIntError { kind: InvalidDigit }', libcore/result.rs:1009:5 note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace. stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::print at libstd/sys_common/backtrace.rs:71 at libstd/sys_common/backtrace.rs:59 2: std::panicking::default_hook::{{closure}} at libstd/panicking.rs:211 3: std::panicking::default_hook at libstd/panicking.rs:227 4: std::panicking::rust_panic_with_hook at libstd/panicking.rs:476 5: std::panicking::continue_panic_fmt at libstd/panicking.rs:390 6: rust_begin_unwind at libstd/panicking.rs:325 7: core::panicking::panic_fmt at libcore/panicking.rs:77 8: core::result::unwrap_failed at libcore/macros.rs:26 9: <core::result::Result<T, E>>::unwrap at libcore/result.rs:808 10: myscontroller_rs::api::node::get_node at src/api/node.rs:94 11: core::ops::function::Fn::call at libcore/ops/function.rs:78 12: <F as actix_web::handler::Handler>::handle at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/handler.rs:185 13: <actix_web::handler::WrapHandler<S, H, R> as actix_web::handler::RouteHandler>::handle at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/handler.rs:412 14: <actix_web::route::InnerHandler>::handle at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/route.rs:325 15: <actix_web::route::StartMiddlewares>::init at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/route.rs:417 16: <actix_web::route::Compose>::new at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/route.rs:379 17: <actix_web::route::Route>::compose at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/route.rs:60 18: <actix_web::resource::ResourceHandler>::handle at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/resource.rs:225 19: <actix_web::application::Inner as actix_web::pipeline::PipelineHandler>::handle at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/application.rs:52 20: <actix_web::pipeline::StartMiddlewares<S, H>>::init at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/pipeline.rs:249 21: <actix_web::pipeline::Pipeline<S, H>>::new at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/pipeline.rs:135 22: <actix_web::application::HttpApplication as actix_web::server::HttpHandler>::handle at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/application.rs:160 23: <actix_web::server::h1::Http1<T, H>>::parse at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/server/h1.rs:331 24: <actix_web::server::h1::Http1<T, H>>::poll_io at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/server/h1.rs:173 25: <actix_web::server::h1::Http1<T, H>>::poll at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/server/h1.rs:132 26: <actix_web::server::channel::HttpChannel<T, H> as futures::future::Future>::poll at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/server/channel.rs:111 27: <actix_web::server::channel::HttpChannel<T, H> as futures::future::Future>::poll at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/server/channel.rs:173 28: <alloc::boxed::Box as futures::future::Future>::poll at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.24/src/future/mod.rs:113 29: <futures::task_impl::Spawn>::poll_future_notify::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.24/src/task_impl/mod.rs:314 30: <futures::task_impl::Spawn>::enter::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.24/src/task_impl/mod.rs:388 31: futures::task_impl::std::set at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.24/src/task_impl/std/mod.rs:78 32: <futures::task_impl::Spawn>::enter at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.24/src/task_impl/mod.rs:388 33: <futures::task_impl::Spawn>::poll_future_notify at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.24/src/task_impl/mod.rs:314 34: <tokio_current_thread::scheduler::Scheduled<'a, U>>::tick at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/scheduler.rs:353 35: <tokio_current_thread::scheduler::Scheduler>::tick::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/scheduler.rs:332 36: <tokio_current_thread::Borrow<'a, U>>::enter::{{closure}}::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/lib.rs:747 37: tokio_current_thread::CurrentRunner::set_spawn at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/lib.rs:783 38: <tokio_current_thread::Borrow<'a, U>>::enter::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/lib.rs:746 39: <std::thread::local::LocalKey>::try_with at libstd/thread/local.rs:300 40: <std::thread::local::LocalKey>::with at libstd/thread/local.rs:254 41: <tokio_current_thread::Borrow<'a, U>>::enter at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/lib.rs:745 42: <tokio_current_thread::scheduler::Scheduler>::tick at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/scheduler.rs:332 43: <tokio_current_thread::Entered<'a, P>>::tick at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/lib.rs:591 44: <tokio_current_thread::Entered<'a, P>>::turn at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/lib.rs:517 45: tokio_core::reactor::Core::poll::{{closure}}::{{closure}}::{{closure}}::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.17/src/reactor/mod.rs:298 46: <scoped_tls::ScopedKey>::set at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155 47: tokio_core::reactor::Core::poll::{{closure}}::{{closure}}::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.17/src/reactor/mod.rs:297 48: tokio_timer::timer::handle::with_default::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-timer-0.2.6/src/timer/handle.rs:94 49: <std::thread::local::LocalKey>::try_with at libstd/thread/local.rs:300 50: <std::thread::local::LocalKey>::with at libstd/thread/local.rs:254 51: tokio_timer::timer::handle::with_default at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-timer-0.2.6/src/timer/handle.rs:81 52: tokio_core::reactor::Core::poll::{{closure}}::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.17/src/reactor/mod.rs:275 53: tokio_executor::global::with_default::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-executor-0.1.4/src/global.rs:173 54: <std::thread::local::LocalKey>::try_with at libstd/thread/local.rs:300 55: <std::thread::local::LocalKey>::with at libstd/thread/local.rs:254 56: tokio_executor::global::with_default at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-executor-0.1.4/src/global.rs:143 57: tokio_core::reactor::Core::poll::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.17/src/reactor/mod.rs:274 58: tokio_reactor::with_default::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-reactor-0.1.5/src/lib.rs:232 59: <std::thread::local::LocalKey>::try_with at libstd/thread/local.rs:300 60: <std::thread::local::LocalKey>::with at libstd/thread/local.rs:254 61: tokio_reactor::with_default at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-reactor-0.1.5/src/lib.rs:215 62: tokio_core::reactor::Core::poll at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.17/src/reactor/mod.rs:273 63: tokio_core::reactor::Core::run at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.17/src/reactor/mod.rs:248 64: actix::arbiter::Arbiter::new::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-0.5.8/src/arbiter.rs:95 thread 'arbiter:"411f4690-3534-4fd2-b9f5-4889a8a083fb":"actor"' panicked at 'called Result::unwrap() on an Err value: ParseIntError { kind: InvalidDigit }', libcore/result.rs:1009:5 note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace. stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::print at libstd/sys_common/backtrace.rs:71 at libstd/sys_common/backtrace.rs:59 2: std::panicking::default_hook::{{closure}} at libstd/panicking.rs:211 3: std::panicking::default_hook at libstd/panicking.rs:227 4: std::panicking::rust_panic_with_hook at libstd/panicking.rs:476 5: std::panicking::continue_panic_fmt at libstd/panicking.rs:390 6: rust_begin_unwind at libstd/panicking.rs:325 7: core::panicking::panic_fmt at libcore/panicking.rs:77 8: core::result::unwrap_failed at libcore/macros.rs:26 9: <core::result::Result<T, E>>::unwrap at libcore/result.rs:808 10: myscontroller_rs::api::node::get_node at src/api/node.rs:94 11: core::ops::function::Fn::call at libcore/ops/function.rs:78 12: <F as actix_web::handler::Handler>::handle at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/handler.rs:185 13: <actix_web::handler::WrapHandler<S, H, R> as actix_web::handler::RouteHandler>::handle at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/handler.rs:412 14: <actix_web::route::InnerHandler>::handle at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/route.rs:325 15: <actix_web::route::StartMiddlewares>::init at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/route.rs:417 16: <actix_web::route::Compose>::new at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/route.rs:379 17: <actix_web::route::Route>::compose at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/route.rs:60 18: <actix_web::resource::ResourceHandler>::handle at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/resource.rs:225 19: <actix_web::application::Inner as actix_web::pipeline::PipelineHandler>::handle at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/application.rs:52 20: <actix_web::pipeline::StartMiddlewares<S, H>>::init at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/pipeline.rs:249 21: <actix_web::pipeline::Pipeline<S, H>>::new at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/pipeline.rs:135 22: <actix_web::application::HttpApplication as actix_web::server::HttpHandler>::handle at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/application.rs:160 23: <actix_web::server::h1::Http1<T, H>>::parse at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/server/h1.rs:331 24: <actix_web::server::h1::Http1<T, H>>::poll_io at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/server/h1.rs:173 25: <actix_web::server::h1::Http1<T, H>>::poll at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/server/h1.rs:132 26: <actix_web::server::channel::HttpChannel<T, H> as futures::future::Future>::poll at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/server/channel.rs:111 27: <actix_web::server::channel::HttpChannel<T, H> as futures::future::Future>::poll at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-web-0.6.15/src/server/channel.rs:173 28: <alloc::boxed::Box as futures::future::Future>::poll at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.24/src/future/mod.rs:113 29: <futures::task_impl::Spawn>::poll_future_notify::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.24/src/task_impl/mod.rs:314 30: <futures::task_impl::Spawn>::enter::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.24/src/task_impl/mod.rs:388 31: futures::task_impl::std::set at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.24/src/task_impl/std/mod.rs:78 32: <futures::task_impl::Spawn>::enter at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.24/src/task_impl/mod.rs:388 33: <futures::task_impl::Spawn>::poll_future_notify at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-0.1.24/src/task_impl/mod.rs:314 34: <tokio_current_thread::scheduler::Scheduled<'a, U>>::tick at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/scheduler.rs:353 35: <tokio_current_thread::scheduler::Scheduler>::tick::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/scheduler.rs:332 36: <tokio_current_thread::Borrow<'a, U>>::enter::{{closure}}::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/lib.rs:747 37: tokio_current_thread::CurrentRunner::set_spawn at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/lib.rs:783 38: <tokio_current_thread::Borrow<'a, U>>::enter::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/lib.rs:746 39: <std::thread::local::LocalKey>::try_with at libstd/thread/local.rs:300 40: <std::thread::local::LocalKey>::with at libstd/thread/local.rs:254 41: <tokio_current_thread::Borrow<'a, U>>::enter at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/lib.rs:745 42: <tokio_current_thread::scheduler::Scheduler>::tick at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/scheduler.rs:332 43: <tokio_current_thread::Entered<'a, P>>::tick at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/lib.rs:591 44: <tokio_current_thread::Entered<'a, P>>::turn at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-current-thread-0.1.1/src/lib.rs:517 45: tokio_core::reactor::Core::poll::{{closure}}::{{closure}}::{{closure}}::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.17/src/reactor/mod.rs:298 46: <scoped_tls::ScopedKey>::set at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155 47: tokio_core::reactor::Core::poll::{{closure}}::{{closure}}::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.17/src/reactor/mod.rs:297 48: tokio_timer::timer::handle::with_default::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-timer-0.2.6/src/timer/handle.rs:94 49: <std::thread::local::LocalKey>::try_with at libstd/thread/local.rs:300 50: <std::thread::local::LocalKey>::with at libstd/thread/local.rs:254 51: tokio_timer::timer::handle::with_default at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-timer-0.2.6/src/timer/handle.rs:81 52: tokio_core::reactor::Core::poll::{{closure}}::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.17/src/reactor/mod.rs:275 53: tokio_executor::global::with_default::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-executor-0.1.4/src/global.rs:173 54: <std::thread::local::LocalKey>::try_with at libstd/thread/local.rs:300 55: <std::thread::local::LocalKey>::with at libstd/thread/local.rs:254 56: tokio_executor::global::with_default at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-executor-0.1.4/src/global.rs:143 57: tokio_core::reactor::Core::poll::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.17/src/reactor/mod.rs:274 58: tokio_reactor::with_default::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-reactor-0.1.5/src/lib.rs:232 59: <std::thread::local::LocalKey>::try_with at libstd/thread/local.rs:300 60: <std::thread::local::LocalKey>::with at libstd/thread/local.rs:254 61: tokio_reactor::with_default at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-reactor-0.1.5/src/lib.rs:215 62: tokio_core::reactor::Core::poll at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.17/src/reactor/mod.rs:273 63: tokio_core::reactor::Core::run at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.17/src/reactor/mod.rs:248 64: actix::arbiter::Arbiter::new::{{closure}} at /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-0.5.8/src/arbiter.rs:95 ERROR 2018-10-23T20:55:19Z: myscontroller_rs::api::node: Error while getting node () INFO 2018-10-23T20:55:19Z: actix_web::middleware::logger: 192.168.2.10:55827 [23/Oct/2018:22:55:19 +0200] "GET /nodes/1 HTTP/1.1" 400 16 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" 0.016361 E

tsathishkumar commented 5 years ago
  1. Port 8888 is for web of thing APIs. Port 8000 is for controller APIs.
  2. Last bit of logs say the Port is already in use. I guess there is already a service running in background with either Port 8000 or 8888.
  3. What is the URL you have configured in Web Thing add on of Mozilla gateway?

Could you also post your conf.ini file here.

tsathishkumar commented 5 years ago

I think conf.ini got changed when you pulled the latest code.

flatsiedatsie commented 5 years ago

I now have this

Address in the Mozilla Gateway: http://localhost:8888/

conf.ini:

encoding=utf-8

[Gateway] type=TCP port=0.0.0.0:5003

[Controller] type=TCP port=0.0.0.0:5004

[Server] database_url=/var/lib/myscontroller-rs/sqlite.db log_level=myscontroller_rs=debug,actix_web=info

The journalctl results:

pi@gateway:~ $ sudo ./MySController-rs/target/debug/myscontroller-rs INFO 2018-10-24T10:34:08Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-24T10:34:08Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 INFO 2018-10-24T10:34:08Z: myscontroller_rs: Starting proxy server INFO 2018-10-24T10:34:08Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... INFO 2018-10-24T10:34:08Z: myscontroller_rs::core::connection: Server listening on -- 0.0.0.0:5004 INFO 2018-10-24T10:34:08Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 INFO 2018-10-24T10:34:08Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-10-24T10:34:08Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" INFO 2018-10-24T10:34:12Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-24T10:34:17Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-24T10:34:17Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-24T10:34:21Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;7\n" WARN 2018-10-24T10:34:21Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "7" } } INFO 2018-10-24T10:34:22Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-24T10:34:22Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;7\n" WARN 2018-10-24T10:34:22Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "7" } } INFO 2018-10-24T10:34:32Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-24T10:34:37Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-24T10:34:37Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n"

The two sensors it found earlier are not being updated.

Add devices When I try to "add new devices" I get an ECONNREFUSED error:

Oct 24 12:40:02 gateway run-app.sh[539]: 2018-10-24 12:40:02.986 About to call startPairing on GenericSensorsAdapter Oct 24 12:40:02 gateway run-app.sh[539]: 2018-10-24 12:40:02.990 About to call startPairing on ThingURLAdapter Oct 24 12:40:03 gateway run-app.sh[539]: 2018-10-24 12:40:03.029 Opened a new things socket Oct 24 12:40:03 gateway run-app.sh[539]: 2018-10-24 12:40:03.040 generic-sensors: Adapter: GenericSensorsAdapter id generic-sensors-adapter pairing started Oct 24 12:40:13 gateway run-app.sh[539]: 2018-10-24 12:40:13.081 thing-url: Failed to connect to http://localhost:8888: FetchError: request to http://localhost:8888/ failed, reason: connect ECONNREFUSED 127.0.0.1:8888 Oct 24 12:41:02 gateway run-app.sh[539]: 2018-10-24 12:41:02.994 Pairing timeout Oct 24 12:41:03 gateway run-app.sh[539]: 2018-10-24 12:41:02.999 Thing was not added Oct 24 12:41:03 gateway run-app.sh[539]: 2018-10-24 12:41:03.002 addNewThing cancelled Oct 24 12:41:03 gateway run-app.sh[539]: 2018-10-24 12:41:03.009 generic-sensors: Adapter: GenericSensorsAdapter id generic-sensors-adapter pairing cancelled Oct 24 12:41:03 gateway run-app.sh[539]: 2018-10-24 12:41:03.012 thing-url: Adapter: ThingURLAdapter id thing-url-adapter pairing cancelled

flatsiedatsie commented 5 years ago

If I use this conf where both ports are set to 5003 (as in the example on github)

encoding=utf-8

[Gateway] type=TCP port=0.0.0.0:5003

[Controller] type=TCP port=0.0.0.0:5003

[Server] database_url=/var/lib/myscontroller-rs/sqlite.db log_level=myscontroller_rs=debug,actix_web=info

I the console I get this "Address already in use" error, but data does still come through:

pi@gateway:~ $ sudo ./MySController-rs/target/debug/myscontroller-rs INFO 2018-10-24T10:56:55Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-24T10:56:55Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 INFO 2018-10-24T10:56:55Z: myscontroller_rs: Starting proxy server thread '' panicked at 'called Result::unwrap() on an Err value: Os { code: 98, kind: AddrInUse, message: "Address already in use" }', libcore/result.rs:1009:5 INFO 2018-10-24T10:56:55Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... INFO 2018-10-24T10:56:55Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 INFO 2018-10-24T10:56:55Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-10-24T10:56:55Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace. stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::print at libstd/sys_common/backtrace.rs:71 at libstd/sys_common/backtrace.rs:59 2: std::panicking::default_hook::{{closure}} at libstd/panicking.rs:211 3: std::panicking::default_hook at libstd/panicking.rs:227 4: std::panicking::rust_panic_with_hook at libstd/panicking.rs:476 5: std::panicking::continue_panic_fmt at libstd/panicking.rs:390 6: rust_begin_unwind at libstd/panicking.rs:325 7: core::panicking::panic_fmt at libcore/panicking.rs:77 8: core::result::unwrap_failed at libcore/macros.rs:26 9: <core::result::Result<T, E>>::unwrap at libcore/result.rs:808 10: myscontroller_rs::core::connection::create_connection at src/core/connection.rs:189 11: myscontroller_rs::core::connection::stream_read_write at src/core/connection.rs:133 12: myscontroller_rs::core::server::start::{{closure}} at src/core/server.rs:82 INFO 2018-10-24T10:57:02Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-24T10:57:07Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-24T10:57:07Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-24T10:57:17Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-24T10:57:20Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;255;3;0;1;\n" INFO 2018-10-24T10:57:20Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-24T10:57:20Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;10\n" WARN 2018-10-24T10:57:20Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "10" } } INFO 2018-10-24T10:57:22Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-24T10:57:22Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;10\n" WARN 2018-10-24T10:57:22Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "10" } }

I see this in LSOF: pi@gateway:~ $ sudo lsof -i COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME mysgw 337 root 4u IPv4 9775 0t0 TCP :5003 (LISTEN) mysgw 337 root 5u IPv4 2785785 0t0 TCP localhost:5003->localhost:37334 (ESTABLISHED) avahi-dae 349 avahi 12u IPv4 11860 0t0 UDP :mdns avahi-dae 349 avahi 13u IPv6 11861 0t0 UDP :mdns avahi-dae 349 avahi 14u IPv4 11862 0t0 UDP :57916 avahi-dae 349 avahi 15u IPv6 11863 0t0 UDP :42842 dhcpcd 537 root 10u IPv4 62461 0t0 UDP :bootpc python3 538 pi 3u IPv4 18142 0t0 TCP localhost:5555 (LISTEN) sshd 577 root 3u IPv4 17998 0t0 TCP :ssh (LISTEN) sshd 577 root 4u IPv6 18005 0t0 TCP :ssh (LISTEN) node 963 pi 11u IPv6 111908 0t0 TCP :http-alt (LISTEN) node 963 pi 29u IPv6 3101033 0t0 TCP gateway.home:http-alt->laptop.home:53444 (ESTABLISHED) node 963 pi 37u IPv6 2868626 0t0 TCP gateway.home:http-alt->laptop.home:53171 (ESTABLISHED) node 963 pi 41u IPv6 2864292 0t0 TCP gateway.home:http-alt->laptop.home:53168 (ESTABLISHED) node 963 pi 42u IPv6 2868727 0t0 TCP gateway.home:http-alt->laptop.home:53172 (ESTABLISHED) sshd 1026 root 3u IPv4 232070 0t0 TCP gateway.home:ssh->laptop.home:50180 (ESTABLISHED) sshd 1041 pi 3u IPv4 232070 0t0 TCP gateway.home:ssh->laptop.home:50180 (ESTABLISHED) sshd 1251 root 3u IPv4 428241 0t0 TCP gateway.home:ssh->laptop.home:50506 (ESTABLISHED) sshd 1261 pi 3u IPv4 428241 0t0 TCP gateway.home:ssh->laptop.home:50506 (ESTABLISHED) sshd 1486 root 3u IPv4 1684667 0t0 TCP gateway.home:ssh->laptop.home:51675 (ESTABLISHED) sshd 1496 pi 3u IPv4 1684667 0t0 TCP gateway.home:ssh->laptop.home:51675 (ESTABLISHED) node 1918 pi 19u IPv4 2251838 0t0 UDP :mdns myscontro 2044 root 16u IPv4 2785668 0t0 TCP *:8000 (LISTEN) myscontro 2044 root 35u IPv4 2577590 0t0 TCP localhost:37334->localhost:5003 (ESTABLISHED) myscontro 2044 root 36u IPv4 2577590 0t0 TCP localhost:37334->localhost:5003 (ESTABLISHED)

I see this in JournalCTL:

Oct 24 12:45:35 gateway run-app.sh[539]: 2018-10-24 12:45:35.866 getValue for property level for: Ambient Light Sensor returning 0 Oct 24 12:45:35 gateway run-app.sh[539]: 2018-10-24 12:45:35.870 getValue for property on for: Ambient Light Sensor returning false Oct 24 12:45:35 gateway run-app.sh[539]: 2018-10-24 12:45:35.921 getValue for property level for: Temperature Sensor returning 0 Oct 24 12:45:35 gateway run-app.sh[539]: 2018-10-24 12:45:35.924 getValue for property on for: Temperature Sensor returning false

These correspond to the values in my Mozilla Gateway interface. It's as if it's reading those values.

tsathishkumar commented 5 years ago
encoding=utf-8

[Gateway]
type=TCP
port=0.0.0.0:5003

[Controller]
type=TCP
port=0.0.0.0:5004

[Server]
database_url=/var/lib/myscontroller-rs/sqlite.db
log_level=myscontroller_rs=debug,actix_web=info

This config is correct. Don't use the same port for controller (I'll correct the example).

I don't see the log of WoT server starting up, something like

actix_web::server::srv: Starting server on http://0.0.0.0:8888

Oct 24 12:40:13 gateway run-app.sh[539]: 2018-10-24 12:40:13.081 thing-url: Failed to connect to http://localhost:8888: FetchError: request to http://localhost:8888/ failed, reason: connect ECONNREFUSED 127.0.0.1:8888

This error message is also pointing to that fact. Could you change the port number in file MySController-rs/src/wot/mod.rs:154 from 8888 to some unused port and configure the same thing mozilla gateway.

tsathishkumar commented 5 years ago

And regarding the --release mode, the executable will be available at target/release/myscontroller-rs

flatsiedatsie commented 5 years ago

This is me plugging in another device (plant moisture sensor with 6 sensors and 6 'dimmers' to set the minimum moisture level per plant where it should be irrigated)

INFO 2018-10-24T11:11:52Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-24T11:11:57Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-24T11:11:57Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;2;0;3;\n" INFO 2018-10-24T11:12:12Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;255;3;0;6;0\n" INFO 2018-10-24T11:12:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;255;3;0;11;Plant Sensorium\n" INFO 2018-10-24T11:12:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;255;3;0;12;1.2\n" INFO 2018-10-24T11:12:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;0;0;35;1\n" INFO 2018-10-24T11:12:14Z: myscontroller_rs::core::message_handler::presentation: Updated sensor Sensor { node_id: 1, child_sensor_id: 0, sensor_type: Moisture, description: "1" } INFO 2018-10-24T11:12:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;0;0;4;1\n" INFO 2018-10-24T11:12:14Z: myscontroller_rs::core::message_handler::presentation: Updated sensor Sensor { node_id: 1, child_sensor_id: 1, sensor_type: Dimmer, description: "1" } INFO 2018-10-24T11:12:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;2;0;0;35;2\n" INFO 2018-10-24T11:12:14Z: myscontroller_rs::core::message_handler::presentation: Created Sensor { node_id: 1, child_sensor_id: 2, sensor_type: Moisture, description: "2" } INFO 2018-10-24T11:12:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;0;0;4;2\n" INFO 2018-10-24T11:12:14Z: myscontroller_rs::core::message_handler::presentation: Created Sensor { node_id: 1, child_sensor_id: 3, sensor_type: Dimmer, description: "2" } INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;4;0;0;35;3\n" INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::message_handler::presentation: Created Sensor { node_id: 1, child_sensor_id: 4, sensor_type: Moisture, description: "3" } INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;5;0;0;4;3\n" INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::message_handler::presentation: Created Sensor { node_id: 1, child_sensor_id: 5, sensor_type: Dimmer, description: "3" } INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;6;0;0;35;4\n" INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::message_handler::presentation: Created Sensor { node_id: 1, child_sensor_id: 6, sensor_type: Moisture, description: "4" } INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;0;0;4;4\n" INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::message_handler::presentation: Created Sensor { node_id: 1, child_sensor_id: 7, sensor_type: Dimmer, description: "4" } INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;8;0;0;35;5\n" INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::message_handler::presentation: Created Sensor { node_id: 1, child_sensor_id: 8, sensor_type: Moisture, description: "5" } INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;0;0;4;5\n" INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::message_handler::presentation: Created Sensor { node_id: 1, child_sensor_id: 9, sensor_type: Dimmer, description: "5" } INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;10;0;0;35;6\n" INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::message_handler::presentation: Created Sensor { node_id: 1, child_sensor_id: 10, sensor_type: Moisture, description: "6" } INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;0;0;4;6\n" INFO 2018-10-24T11:12:15Z: myscontroller_rs::core::message_handler::presentation: Created Sensor { node_id: 1, child_sensor_id: 11, sensor_type: Dimmer, description: "6" } INFO 2018-10-24T11:12:18Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-10-24T11:12:31Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-24T11:12:32Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-24T11:12:32Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;255;3;0;1;\n" INFO 2018-10-24T11:12:32Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;1;0;37;44\n" WARN 2018-10-24T11:12:32Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "44" } } INFO 2018-10-24T11:12:37Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-10-24T11:12:37Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;2;1;0;37;20\n" WARN 2018-10-24T11:12:37Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 2, ack: 0, value: Value { set_type: Level, value: "20" } } INFO 2018-10-24T11:12:42Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;4;1;0;37;24\n" WARN 2018-10-24T11:12:42Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 4, ack: 0, value: Value { set_type: Level, value: "24" } } INFO 2018-10-24T11:12:47Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-10-24T11:12:47Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;6;1;0;37;20\n" WARN 2018-10-24T11:12:47Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 6, ack: 0, value: Value { set_type: Level, value: "20" } } INFO 2018-10-24T11:12:52Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-10-24T11:12:52Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;8;1;0;37;1\n" WARN 2018-10-24T11:12:52Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 8, ack: 0, value: Value { set_type: Level, value: "1" } } INFO 2018-10-24T11:12:57Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-10-24T11:12:57Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;10;1;0;37;18\n" WARN 2018-10-24T11:12:57Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 10, ack: 0, value: Value { set_type: Level, value: "18" } } INFO 2018-10-24T11:13:02Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n"

flatsiedatsie commented 5 years ago

This is an interesing error that occurs when I change the value of a sensor in the Mozilla Gateway manually.

Oct 24 13:10:08 gateway run-app.sh[539]: 2018-10-24 13:10:08.733 generic-sensors: at AmbientLight.onerror (/home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/generic-sensors-lite/ambientlight/index.js:33:11) Oct 24 13:10:08 gateway run-app.sh[539]: 2018-10-24 13:10:08.734 generic-sensors: at /home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/generic-sensors-lite/ambientlight/index.js:60:21 Oct 24 13:10:08 gateway run-app.sh[539]: 2018-10-24 13:10:08.734 generic-sensors: at /home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/bh1750/bh1750.js:25:20 Oct 24 13:10:08 gateway run-app.sh[539]: 2018-10-24 13:10:08.734 generic-sensors: at Immediate._onImmediate (/home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/i2c/lib/i2c.coffee:85:9) Oct 24 13:10:08 gateway run-app.sh[539]: 2018-10-24 13:10:08.734 generic-sensors: at runCallback (timers.js:810:20) Oct 24 13:10:08 gateway run-app.sh[539]: 2018-10-24 13:10:08.735 generic-sensors: at tryOnImmediate (timers.js:768:5) Oct 24 13:10:08 gateway run-app.sh[539]: 2018-10-24 13:10:08.735 generic-sensors: at processImmediate [as _immediateCallback] (timers.js:745:5) Oct 24 13:10:08 gateway run-app.sh[539]: 2018-10-24 13:10:08.735 generic-sensors: Oct 24 13:10:08 gateway run-app.sh[539]: 2018-10-24 13:10:08.751 Plugin: generic-sensors-adapter died, code = 1 restarting... Oct 24 13:10:10 gateway run-app.sh[539]: 2018-10-24 13:10:10.367 generic-sensors: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3 Oct 24 13:10:10 gateway run-app.sh[539]: 2018-10-24 13:10:10.449 generic-sensors: Loading add-on for generic-sensors-adapter from /home/pi/.mozilla-iot/addons/generic-sensors-adapter Oct 24 13:10:19 gateway run-app.sh[539]: 2018-10-24 13:10:19.651 PropertyProxy: setProperty property: level for: 0 to value: 61 Oct 24 13:10:20 gateway run-app.sh[539]: 2018-10-24 13:10:20.701 generic-sensors: /home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/generic-sensors-lite/ambientlight/index.js:33 Oct 24 13:10:20 gateway run-app.sh[539]: 2018-10-24 13:10:20.702 generic-sensors: throw new Error(err); Oct 24 13:10:20 gateway run-app.sh[539]: 2018-10-24 13:10:20.705 generic-sensors: ^ Oct 24 13:10:20 gateway run-app.sh[539]: 2018-10-24 13:10:20.705 generic-sensors: Oct 24 13:10:20 gateway run-app.sh[539]: 2018-10-24 13:10:20.706 generic-sensors: Error: null Oct 24 13:10:20 gateway run-app.sh[539]: 2018-10-24 13:10:20.706 generic-sensors: at AmbientLight.onerror (/home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/generic-sensors-lite/ambientlight/index.js:33:11) Oct 24 13:14:31 gateway run-app.sh[539]: 2018-10-24 13:14:31.444 About to call startPairing on GenericSensorsAdapter.sh[539]: 2018-10-24 13:10:20.706 generic-sensors: at /home/pi/.mozilla-iot/addons/generic-sensors-adapter/node_modules/geneOct 24 13:14:31 gateway run-app.sh[539]: 2018-10-24 13:14:31.446 About to call startPairing on ThingURLAdapter Oct 24 13:14:31 gateway run-app.sh[539]: 2018-10-24 13:14:31.456 generic-sensors: Adapter: GenericSensorsAdapter id generic-sensors-adapter pairing started17Oct 24 13:14:32 gateway run-app.sh[539]: 2018-10-24 13:14:32.065 Opened a new things socket ^[OBOct 24 13:14:41 gateway run-app.sh[539]: 2018-10-24 13:14:41.519 thing-url: Failed to connect to https://127.0.0.1:8888: FetchError: request to https://127.0.0.1:8888/ failed, reason: connect ECONNREFUSED 127.0.0.1:8888 Oct 24 13:10:20 gateway run-app.sh[539]: 2018-10-24 13:10:20.707 generic-sensors: at runCallback (timers.js:810:20) Oct 24 13:10:20 gateway run-app.sh[539]: 2018-10-24 13:10:20.707 generic-sensors: at tryOnImmediate (timers.js:768:5) Oct 24 13:10:20 gateway run-app.sh[539]: 2018-10-24 13:10:20.707 generic-sensors: at processImmediate [as _immediateCallback] (timers.js:745:5) Oct 24 13:10:20 gateway run-app.sh[539]: 2018-10-24 13:10:20.708 generic-sensors: Oct 24 13:10:20 gateway run-app.sh[539]: 2018-10-24 13:10:20.724 Plugin: generic-sensors-adapter died, code = 1 restarting... Oct 24 13:10:22 gateway run-app.sh[539]: 2018-10-24 13:10:22.355 generic-sensors: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3 Oct 24 13:10:22 gateway run-app.sh[539]: 2018-10-24 13:10:22.433 generic-sensors: Loading add-on for generic-sensors-adapter from /home/pi/.mozilla-iot/addons/generic-sensors-adapter

flatsiedatsie commented 5 years ago

And regarding the --release mode, the executable will be available at target/release/myscontroller-rs

Yes, that was what I expected. But that folder didn't exist after running that command.

tsathishkumar commented 5 years ago

Yes, that was what I expected. But that folder didn't exist after running that command.

That's really strange :/

Regarding the errors, it reiterates the same thing, the WoT server is not running. Please try with a new port and see if that works.

flatsiedatsie commented 5 years ago

I'll try this url:

http://127.0.0.1:8889

or should it be https?

tsathishkumar commented 5 years ago

This should work. http only

flatsiedatsie commented 5 years ago

I still don't see the server starting in the console output.

pi@gateway:~/MySController-rs/target/debug $ sudo ./myscontroller-rs INFO 2018-10-24T11:45:42Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-24T11:45:42Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 INFO 2018-10-24T11:45:42Z: myscontroller_rs: Starting proxy server INFO 2018-10-24T11:45:42Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... INFO 2018-10-24T11:45:42Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 INFO 2018-10-24T11:45:42Z: myscontroller_rs::core::connection: Server listening on -- 127.0.0.1:8081 INFO 2018-10-24T11:45:42Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-10-24T11:45:42Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" INFO 2018-10-24T11:46:07Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;4\n" WARN 2018-10-24T11:46:07Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "4" } } INFO 2018-10-24T11:46:08Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;4\n" WARN 2018-10-24T11:46:08Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "4" } } INFO 2018-10-24T11:44:18Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;255;3;0;6;0\n" INFO 2018-10-24T11:44:28Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;255;3;0;1;\n"

tsathishkumar commented 5 years ago

Perhaps a quick call? I have emailed you.

flatsiedatsie commented 5 years ago

Pulled the latest version (the one which where the WoT server reboots when a new device appears).

Maybe I should start with a fresh Mozilla Gateway image again.

pi@gateway:~/MySController-rs/target/debug $ ./myscontroller-rs INFO 2018-10-26T18:19:01Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-26T18:19:01Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 INFO 2018-10-26T18:19:01Z: myscontroller_rs: Starting proxy server INFO 2018-10-26T18:19:01Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... INFO 2018-10-26T18:19:01Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 thread '' panicked at 'called Result::unwrap() on an Err value: Os { code: 98, kind: AddrInUse, message: "Address already in use" }', libcore/result.rs:1009:5 INFO 2018-10-26T18:19:01Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-10-26T18:19:01Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" ERROR 2018-10-26T18:19:01Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of sensorSensor { node_id: 0, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.3.0" } NotFound INFO 2018-10-26T18:19:01Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-26T18:19:01Z: actix_web::server::srv: Starting server on http://0.0.0.0:8888 note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace. stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace INFO 2018-10-26T18:19:02Z: actix_web::middleware::logger: 192.168.2.1:45958 [26/Oct/2018:20:19:01 +0200] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.896042 at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::print at libstd/sys_common/backtrace.rs:71 at libstd/sys_common/backtrace.rs:59 2: std::panicking::default_hook::{{closure}} at libstd/panicking.rs:211 3: std::panicking::default_hook at libstd/panicking.rs:227 4: std::panicking::rust_panic_with_hook at libstd/panicking.rs:476 5: std::panicking::continue_panic_fmt at libstd/panicking.rs:390 6: rust_begin_unwind at libstd/panicking.rs:325 7: core::panicking::panic_fmt at libcore/panicking.rs:77 8: core::result::unwrap_failed at libcore/macros.rs:26 9: <core::result::Result<T, E>>::unwrap at libcore/result.rs:808 10: myscontroller_rs::core::connection::create_connection at src/core/connection.rs:189 11: myscontroller_rs::core::connection::stream_read_write at src/core/connection.rs:133 12: myscontroller_rs::core::server::start::{{closure}} at src/core/server.rs:90 ^C INFO 2018-10-26T18:19:16Z: actix_web::server::srv: SIGINT received, exiting INFO 2018-10-26T18:19:16Z: actix_web::server::srv: SIGINT received, exiting INFO 2018-10-26T18:19:16Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-10-26T18:19:16Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-10-26T18:19:16Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-10-26T18:19:16Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-10-26T18:19:16Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-10-26T18:19:16Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-10-26T18:19:16Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-10-26T18:19:16Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-10-26T18:19:17Z: myscontroller_rs::wot: WoT Server stopped

flatsiedatsie commented 5 years ago

It seems an error is generated if it hasn't seen a device before.

pi@gateway:~/MySController-rs/target/debug $ sudo ./myscontroller-rs INFO 2018-10-26T19:29:27Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-26T19:29:27Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 Running migration 20180416170858 Running migration 20180425200801 Running migration 20180515193701 Running migration 20180530120000 Running migration 20181012103949 INFO 2018-10-26T19:29:27Z: myscontroller_rs: Starting proxy server INFO 2018-10-26T19:29:27Z: myscontroller_rs::core::connection: Server listening on -- 0.0.0.0:8090 INFO 2018-10-26T19:29:27Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... INFO 2018-10-26T19:29:27Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 INFO 2018-10-26T19:29:27Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-10-26T19:29:27Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" ERROR 2018-10-26T19:29:27Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of sensorSensor { node_id: 0, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.3.0" } NotFound INFO 2018-10-26T19:29:27Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-26T19:29:27Z: actix_web::server::srv: Starting server on http://0.0.0.0:8888 INFO 2018-10-26T19:29:27Z: actix_web::middleware::logger: 192.168.2.1:54278 [26/Oct/2018:21:29:27 +0200] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.001945 INFO 2018-10-26T19:29:54Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;4\n" WARN 2018-10-26T19:29:54Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "4" } } INFO 2018-10-26T19:30:53Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;2\n" WARN 2018-10-26T19:30:53Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "2" } } INFO 2018-10-26T19:30:54Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;2\n" WARN 2018-10-26T19:30:54Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "2" } } INFO 2018-10-26T19:31:53Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;3\n" WARN 2018-10-26T19:31:53Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "3" } } INFO 2018-10-26T19:32:53Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;4\n" WARN 2018-10-26T19:32:53Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "4" } } INFO 2018-10-26T19:32:59Z: actix_web::middleware::logger: 127.0.0.1:46654 [26/Oct/2018:21:32:59 +0200] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.001464 INFO 2018-10-26T19:33:15Z: actix_web::middleware::logger: 127.0.0.1:46656 [26/Oct/2018:21:33:15 +0200] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.001360 INFO 2018-10-26T19:33:53Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;4\n" WARN 2018-10-26T19:33:53Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "4" } } INFO 2018-10-26T19:33:54Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;4\n" WARN 2018-10-26T19:33:54Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "4" } } INFO 2018-10-26T19:34:30Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;255;3;0;1;\n" INFO 2018-10-26T19:36:22Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;255;0;0;18;2.2.0\n" INFO 2018-10-26T19:36:22Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;255;3;0;6;0\n" ERROR 2018-10-26T19:36:22Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of sensorSensor { node_id: 15, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.2.0" } NotFound INFO 2018-10-26T19:36:24Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;255;3;0;11;Gentle alarm clock\n" INFO 2018-10-26T19:36:24Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;255;3;0;12;1.6\n" INFO 2018-10-26T19:36:24Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;0;0;6;\n" ERROR 2018-10-26T19:36:24Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of sensorSensor { node_id: 15, child_sensor_id: 1, sensor_type: Temp, description: "" } NotFound INFO 2018-10-26T19:36:25Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;255;0;0;18;2.2.0\n" ERROR 2018-10-26T19:36:25Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of sensorSensor { node_id: 1, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.2.0" } NotFound INFO 2018-10-26T19:36:27Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;255;3;0;11;Fine dust sensor\n" INFO 2018-10-26T19:36:27Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;255;3;0;12;1.1\n" INFO 2018-10-26T19:36:27Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;0;0;24;\n" ERROR 2018-10-26T19:36:27Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of sensorSensor { node_id: 1, child_sensor_id: 0, sensor_type: Dust, description: "" } NotFound INFO 2018-10-26T19:36:27Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;0;0;24;\n" ERROR 2018-10-26T19:36:27Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of sensorSensor { node_id: 1, child_sensor_id: 1, sensor_type: Dust, description: "" } NotFound INFO 2018-10-26T19:36:28Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;23\n" WARN 2018-10-26T19:36:28Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "23" } } INFO 2018-10-26T19:36:28Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "15;1;1;0;0;23\n" WARN 2018-10-26T19:36:28Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 15, child_sensor_id: 1, ack: 0, value: Value { set_type: Temp, value: "23" } } INFO 2018-10-26T19:36:30Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;0;1;0;37;6.9\n" WARN 2018-10-26T19:36:30Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "6.9" } } INFO 2018-10-26T19:36:31Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;1;0;37;1.9\n" WARN 2018-10-26T19:36:31Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 1, child_sensor_id: 1, ack: 0, value: Value { set_type: Level, value: "1.9" } }

tsathishkumar commented 5 years ago

Restarting the node should fix the issue.

flatsiedatsie commented 5 years ago

I found a new issue.

At first I started the target/debug version, and noticed that port 8888 was set as LISTEN. So it seemed the WoT server was started:

myscontro 9412 pi 16u IPv4 92285339 0t0 TCP :8000 (LISTEN) myscontro 9412 pi 37u IPv4 92244242 0t0 TCP localhost:53476->localhost:5003 (ESTABLISHED) myscontro 9412 pi 38u IPv4 92244243 0t0 TCP :8090 (LISTEN) myscontro 9412 pi 40u IPv4 92244242 0t0 TCP localhost:53476->localhost:5003 (ESTABLISHED) myscontro 9412 pi 46u IPv4 92289943 0t0 TCP *:8888 (LISTEN)

However, the Mozilla Gateway didn't seem to connect to it.

So I thought "perhaps it should be a service, then it might start earlier, and then it might work.

However, the result as a service is a different error: panicked at 'called Result::unwrap() on an Err value: Os { code: 19, kind: Other, message: "No such device" }

A larger part of the journalctl log:

Oct 28 17:50:55 gateway dhcpcd[321]: wlan0: starting wpa_supplicant Oct 28 17:50:55 gateway dhcpcd-run-hooks[413]: wlan0: starting wpa_supplicant Oct 28 17:50:55 gateway kernel: nf_conntrack version 0.5.0 (15360 buckets, 61440 max) Oct 28 17:50:55 gateway kernel: IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready Oct 28 17:50:55 gateway kernel: brcmfmac: power management disabled Oct 28 17:50:55 gateway myscontroller-rs[342]: INFO 2018-10-28T16:50:55Z: actix_web::server::srv: Starting 4 http workers Oct 28 17:50:55 gateway myscontroller-rs[342]: INFO 2018-10-28T16:50:55Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 Oct 28 17:50:55 gateway myscontroller-rs[342]: INFO 2018-10-28T16:50:55Z: myscontroller_rs: Starting proxy server Oct 28 17:50:55 gateway myscontroller-rs[342]: INFO 2018-10-28T16:50:55Z: myscontroller_rs::core::connection: Server listening on -- 0.0.0.0:8090 Oct 28 17:50:55 gateway myscontroller-rs[342]: INFO 2018-10-28T16:50:55Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... Oct 28 17:50:55 gateway myscontroller-rs[342]: INFO 2018-10-28T16:50:55Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 Oct 28 17:50:55 gateway myscontroller-rs[342]: INFO 2018-10-28T16:50:55Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" Oct 28 17:50:55 gateway myscontroller-rs[342]: INFO 2018-10-28T16:50:55Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" Oct 28 17:50:55 gateway myscontroller-rs[342]: ERROR 2018-10-28T16:50:55Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of Sensor { node_id: 0, chi Oct 28 17:50:55 gateway myscontroller-rs[342]: thread '' panicked at 'called Result::unwrap() on an Err value: Os { code: 19, kind: Other, message: "No such device" }', libcore/result Oct 28 17:50:56 gateway dhcpcd[321]: eth0: waiting for carrier Oct 28 17:50:56 gateway dhcpcd[321]: wlan0: waiting for carrier Oct 28 17:50:56 gateway dhcpcd[321]: wlan0: carrier acquired Oct 28 17:50:56 gateway kernel: smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup Oct 28 17:50:56 gateway kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready Oct 28 17:50:56 gateway systemd[1]: Started LSB: Redirect :80 to :8080 and :443 to :4443. Oct 28 17:50:56 gateway dhcpcd[321]: DUID 00:01:00:01:22:c5:a0:54:b8:27:eb:a2:a3:b6 Oct 28 17:50:56 gateway dhcpcd[321]: wlan0: IAID eb:e1:e1:f0 Oct 28 17:50:56 gateway dhcpcd[321]: wlan0: adding address fe80::dcc2:2b13:bfe8:5d53 Oct 28 17:50:56 gateway dhcpcd[321]: wlan0: carrier lost Oct 28 17:50:56 gateway dhcpcd[321]: wlan0: deleting address fe80::dcc2:2b13:bfe8:5d53 Oct 28 17:50:56 gateway dhcpcd[321]: wlan0: carrier acquired Oct 28 17:50:56 gateway dhcpcd[321]: wlan0: IAID eb:e1:e1:f0 Oct 28 17:50:56 gateway kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready Oct 28 17:50:56 gateway dhcpcd[321]: wlan0: adding address fe80::7b4e:39a3:6ae5:347 Oct 28 17:50:57 gateway dhcpcd[321]: wlan0: rebinding lease of 192.168.2.7 Oct 28 17:50:57 gateway dhcpcd[321]: wlan0: soliciting an IPv6 router Oct 28 17:50:57 gateway dhcpcd[321]: wlan0: probing address 192.168.2.7/24 Oct 28 17:50:57 gateway dhcpcd[321]: eth0: carrier acquired Oct 28 17:50:57 gateway dhcpcd[321]: eth0: IAID eb:b4:b4:a5 Oct 28 17:50:57 gateway kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready Oct 28 17:50:57 gateway kernel: smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1 Oct 28 17:50:57 gateway dhcpcd[321]: eth0: adding address fe80::b7bd:a0bb:12c3:d3e Oct 28 17:50:58 gateway avahi-daemon[320]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::7b4e:39a3:6ae5:347. Oct 28 17:50:58 gateway avahi-daemon[320]: New relevant interface wlan0.IPv6 for mDNS. Oct 28 17:50:58 gateway avahi-daemon[320]: Registering new address record for fe80::7b4e:39a3:6ae5:347 on wlan0.. Oct 28 17:50:58 gateway dhcpcd[321]: eth0: rebinding lease of 192.168.2.1 Oct 28 17:50:58 gateway dhcpcd[321]: eth0: soliciting an IPv6 router Oct 28 17:50:58 gateway dhcpcd[321]: eth0: probing address 192.168.2.1/24 Oct 28 17:50:59 gateway avahi-daemon[320]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::b7bd:a0bb:12c3:d3e. Oct 28 17:50:59 gateway avahi-daemon[320]: New relevant interface eth0.IPv6 for mDNS. Oct 28 17:50:59 gateway avahi-daemon[320]: Registering new address record for fe80::b7bd:a0bb:12c3:d3e on eth0.. Oct 28 17:50:59 gateway kernel: Bluetooth: Core ver 2.22 Oct 28 17:50:59 gateway kernel: NET: Registered protocol family 31 Oct 28 17:50:59 gateway kernel: Bluetooth: HCI device and connection manager initialized Oct 28 17:50:59 gateway kernel: Bluetooth: HCI socket layer initialized Oct 28 17:50:59 gateway kernel: Bluetooth: L2CAP socket layer initialized Oct 28 17:50:59 gateway kernel: Bluetooth: SCO socket layer initialized Oct 28 17:50:59 gateway kernel: Bluetooth: HCI UART driver ver 2.3 Oct 28 17:50:59 gateway kernel: Bluetooth: HCI UART protocol H4 registered Oct 28 17:50:59 gateway kernel: Bluetooth: HCI UART protocol Three-wire (H5) registered Oct 28 17:50:59 gateway kernel: Bluetooth: HCI UART protocol Broadcom registered Oct 28 17:50:59 gateway btuart[326]: bcm43xx_init Oct 28 17:50:59 gateway btuart[326]: Flash firmware /lib/firmware/brcm/BCM43430A1.hcd Oct 28 17:50:59 gateway btuart[326]: Set BDADDR UART: b8:27:eb:1e:1e:0f Oct 28 17:50:59 gateway btuart[326]: Set Controller UART speed to 921600 bit/s Oct 28 17:50:59 gateway btuart[326]: Device setup complete Oct 28 17:50:59 gateway systemd[1]: Started Configure Bluetooth Modems connected by UART. Oct 28 17:50:59 gateway systemd[1]: Created slice system-bthelper.slice. Oct 28 17:50:59 gateway systemd[1]: Starting Bluetooth service... Oct 28 17:51:00 gateway bluetoothd[526]: Bluetooth daemon 5.43 Oct 28 17:51:00 gateway systemd[1]: Started Bluetooth service. Oct 28 17:51:00 gateway systemd[1]: Reached target Bluetooth. Oct 28 17:51:00 gateway systemd[1]: Started Raspberry Pi bluetooth helper. Oct 28 17:51:00 gateway bluetoothd[526]: Starting SDP server Oct 28 17:51:00 gateway kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3 Oct 28 17:51:00 gateway kernel: Bluetooth: BNEP filters: protocol multicast Oct 28 17:51:00 gateway kernel: Bluetooth: BNEP socket layer initialized Oct 28 17:51:00 gateway dbus[318]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' Oct 28 17:51:00 gateway bluetoothd[526]: Bluetooth management interface 1.14 initialized Oct 28 17:51:00 gateway bluetoothd[526]: Failed to obtain handles for "Service Changed" characteristic Oct 28 17:51:00 gateway bluetoothd[526]: Sap driver initialization failed. Oct 28 17:51:00 gateway bluetoothd[526]: sap-server: Operation not permitted (1) Oct 28 17:51:00 gateway systemd[1]: Starting Hostname Service... Oct 28 17:51:00 gateway bluetoothd[526]: Failed to set privacy: Rejected (0x0b) Oct 28 17:51:00 gateway myscontroller-rs[342]: note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace. Oct 28 17:51:00 gateway myscontroller-rs[342]: stack backtrace: Oct 28 17:51:00 gateway myscontroller-rs[342]: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace Oct 28 17:51:01 gateway myscontroller-rs[342]: at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 Oct 28 17:51:01 gateway myscontroller-rs[342]: 1: std::sys_common::backtrace::print Oct 28 17:51:01 gateway myscontroller-rs[342]: at libstd/sys_common/backtrace.rs:71 Oct 28 17:51:01 gateway myscontroller-rs[342]: at libstd/sys_common/backtrace.rs:59 Oct 28 17:51:01 gateway myscontroller-rs[342]: 2: std::panicking::default_hook::{{closure}} Oct 28 17:51:01 gateway myscontroller-rs[342]: at libstd/panicking.rs:211 Oct 28 17:51:01 gateway myscontroller-rs[342]: 3: std::panicking::default_hook Oct 28 17:51:01 gateway myscontroller-rs[342]: at libstd/panicking.rs:227 Oct 28 17:51:01 gateway myscontroller-rs[342]: 4: std::panicking::rust_panic_with_hook Oct 28 17:51:01 gateway myscontroller-rs[342]: at libstd/panicking.rs:476 Oct 28 17:51:01 gateway myscontroller-rs[342]: 5: std::panicking::continue_panic_fmt Oct 28 17:51:01 gateway myscontroller-rs[342]: at libstd/panicking.rs:390 Oct 28 17:51:01 gateway myscontroller-rs[342]: 6: rust_begin_unwind Oct 28 17:51:01 gateway myscontroller-rs[342]: at libstd/panicking.rs:325 Oct 28 17:51:01 gateway myscontroller-rs[342]: 7: core::panicking::panic_fmt Oct 28 17:51:01 gateway myscontroller-rs[342]: at libcore/panicking.rs:77 Oct 28 17:51:01 gateway myscontroller-rs[342]: 8: core::result::unwrap_failed Oct 28 17:51:01 gateway myscontroller-rs[342]: at libcore/macros.rs:26 Oct 28 17:51:01 gateway myscontroller-rs[342]: 9: <core::result::Result<T, E>>::unwrap Oct 28 17:51:01 gateway myscontroller-rs[342]: at libcore/result.rs:808 Oct 28 17:51:01 gateway myscontroller-rs[342]: 10: webthing::server::WebThingServer::start Oct 28 17:51:01 gateway myscontroller-rs[342]: at ./home/pi/.cargo/git/checkouts/webthing-rust-134a2bd9cb8c243b/d5d1311/src/server.rs:963 Oct 28 17:51:01 gateway myscontroller-rs[342]: 11: myscontroller_rs::wot::start_server::{{closure}} Oct 28 17:51:01 gateway myscontroller-rs[342]: at src/wot/mod.rs:199 Oct 28 17:51:01 gateway dbus[318]: [system] Successfully activated service 'org.freedesktop.hostname1' Oct 28 17:51:01 gateway systemd[1]: Started Hostname Service. Oct 28 17:51:02 gateway dhcpcd[321]: eth0: leased 192.168.2.1 for 86400 seconds Oct 28 17:51:02 gateway avahi-daemon[320]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.2.1. Oct 28 17:51:02 gateway dhcpcd[321]: eth0: adding route to 192.168.2.0/24 Oct 28 17:51:02 gateway avahi-daemon[320]: New relevant interface eth0.IPv4 for mDNS. Oct 28 17:51:02 gateway avahi-daemon[320]: Registering new address record for 192.168.2.1 on eth0.IPv4. Oct 28 17:51:02 gateway dhcpcd[321]: eth0: adding default route via 192.168.2.254 Oct 28 17:51:02 gateway dhcpcd[321]: forked to background, child pid 584 Oct 28 17:51:02 gateway systemd[1]: Started dhcpcd on all interfaces. Oct 28 17:51:02 gateway systemd[1]: Reached target Network. Oct 28 17:51:02 gateway systemd[1]: Started Mozilla IoT Gateway Client.

flatsiedatsie commented 5 years ago

Interesting:

if I manually try to add a webthing at the 'add things' page, I get:

http://127.0.0.1:8888 -> Web things must be added individually https://127.0.0.1:8888 -> Web thing not found

So that implies it can connect to the WoT server.

JournalCTL also does NOT give an error, but says "Opened a new things socket". So that looks good.

The console logs still starts without mentioning that the WoT server started:

pi@gateway:~/MySController-rs/target/debug $ ./myscontroller-rs INFO 2018-10-28T17:56:14Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-28T17:56:14Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 INFO 2018-10-28T17:56:14Z: myscontroller_rs: Starting proxy server INFO 2018-10-28T17:56:14Z: myscontroller_rs::core::connection: Server listening on -- 0.0.0.0:8090 INFO 2018-10-28T17:56:14Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... INFO 2018-10-28T17:56:14Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 INFO 2018-10-28T17:56:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-10-28T17:56:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" ERROR 2018-10-28T17:56:14Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of Sensor { node_id: 0, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.3.0" } NotFound INFO 2018-10-28T17:56:14Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-28T17:56:14Z: actix_web::server::srv: Starting server on http://0.0.0.0:8888 INFO 2018-10-28T17:56:14Z: actix_web::middleware::logger: 192.168.2.1:59842 [28/Oct/2018:18:56:14 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.001903 INFO 2018-10-28T17:58:31Z: actix_web::middleware::logger: 127.0.0.1:49744 [28/Oct/2018:18:58:31 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.001459 INFO 2018-10-28T17:58:51Z: actix_web::middleware::logger: 127.0.0.1:49746 [28/Oct/2018:18:58:51 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.001568 INFO 2018-10-28T18:03:41Z: actix_web::middleware::logger: 127.0.0.1:49748 [28/Oct/2018:19:03:41 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.001364 INFO 2018-10-28T18:03:54Z: actix_web::middleware::logger: 127.0.0.1:49752 [28/Oct/2018:19:03:54 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.001216 INFO 2018-10-28T18:04:03Z: actix_web::middleware::logger: 127.0.0.1:49754 [28/Oct/2018:19:04:03 +0100] "GET /2 HTTP/1.1" 404 0 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.001198 INFO 2018-10-28T18:04:07Z: actix_web::middleware::logger: 127.0.0.1:49756 [28/Oct/2018:19:04:07 +0100] "GET /1 HTTP/1.1" 404 0 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.001177 INFO 2018-10-28T18:04:10Z: actix_web::middleware::logger: 127.0.0.1:49758 [28/Oct/2018:19:04:10 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.001191

The error (which we saw in the earlier comments I posted too) seems to point to the MySensors gateway itself (node 0).

If I started the MySensors Gateway deamon I get this:

ERROR 2018-10-28T18:13:11Z: myscontroller_rs::core::connection: Error while reading -- reached EOF INFO 2018-10-28T18:13:11Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... INFO 2018-10-28T18:13:11Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 INFO 2018-10-28T18:13:11Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-10-28T18:13:11Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" ERROR 2018-10-28T18:13:11Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of Sensor { node_id: 0, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.3.0" } NotFound

So the MySConroller-rs does neatly reconnect to the MySensors gateway software (nice!), but just has the same error again.

tsathishkumar commented 5 years ago

From the logs, I can see that the node with id 0 is not created in myscontroller database. If you could restart the node (with myscontroller running), then it should create the node. After that it should work fine.

On Sun, Oct 28, 2018 at 11:44 PM flatsiedatsie notifications@github.com wrote:

Interesting:

if I manually try to add a webthing at the 'add things' page, I get:

http://127.0.0.1:8888 -> Web things must be added individually https://127.0.0.1:8888 -> Web thing not found

So that implies it can connect to the WoT server.

JournalCTL also does NOT give an error, but says "Opened a new things socket". So that looks good.

The console logs still starts without mentioning that the WoT server started:

pi@gateway:~/MySController-rs/target/debug $ ./myscontroller-rs INFO 2018-10-28T17:56:14Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-28T17:56:14Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 INFO 2018-10-28T17:56:14Z: myscontroller_rs: Starting proxy server INFO 2018-10-28T17:56:14Z: myscontroller_rs::core::connection: Server listening on -- 0.0.0.0:8090 INFO 2018-10-28T17:56:14Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... INFO 2018-10-28T17:56:14Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 INFO 2018-10-28T17:56:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-10-28T17:56:14Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" ERROR 2018-10-28T17:56:14Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of Sensor { node_id: 0, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.3.0" } NotFound INFO 2018-10-28T17:56:14Z: actix_web::server::srv: Starting 4 http workers INFO 2018-10-28T17:56:14Z: actix_web::server::srv: Starting server on http://0.0.0.0:8888 INFO 2018-10-28T17:56:14Z: actix_web::middleware::logger: 192.168.2.1:59842 [28/Oct/2018:18:56:14 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.001903 INFO 2018-10-28T17:58:31Z: actix_web::middleware::logger: 127.0.0.1:49744 [28/Oct/2018:18:58:31 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+ https://github.com/bitinn/node-fetch)" 0.001459 INFO 2018-10-28T17:58:51Z: actix_web::middleware::logger: 127.0.0.1:49746 [28/Oct/2018:18:58:51 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+ https://github.com/bitinn/node-fetch)" 0.001568 INFO 2018-10-28T18:03:41Z: actix_web::middleware::logger: 127.0.0.1:49748 [28/Oct/2018:19:03:41 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+ https://github.com/bitinn/node-fetch)" 0.001364 INFO 2018-10-28T18:03:54Z: actix_web::middleware::logger: 127.0.0.1:49752 [28/Oct/2018:19:03:54 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+ https://github.com/bitinn/node-fetch)" 0.001216 INFO 2018-10-28T18:04:03Z: actix_web::middleware::logger: 127.0.0.1:49754 [28/Oct/2018:19:04:03 +0100] "GET /2 HTTP/1.1" 404 0 "-" "node-fetch/1.0 (+ https://github.com/bitinn/node-fetch)" 0.001198 INFO 2018-10-28T18:04:07Z: actix_web::middleware::logger: 127.0.0.1:49756 [28/Oct/2018:19:04:07 +0100] "GET /1 HTTP/1.1" 404 0 "-" "node-fetch/1.0 (+ https://github.com/bitinn/node-fetch)" 0.001177 INFO 2018-10-28T18:04:10Z: actix_web::middleware::logger: 127.0.0.1:49758 [28/Oct/2018:19:04:10 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+ https://github.com/bitinn/node-fetch)" 0.001191

The error (which we saw in the earlier comments I posted too) seems to point to the MySensors gateway itself (node 0).

If I started the MySensors Gateway deamon I get this:

ERROR 2018-10-28T18:13:11Z: myscontroller_rs::core::connection: Error while reading -- reached EOF INFO 2018-10-28T18:13:11Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... INFO 2018-10-28T18:13:11Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 INFO 2018-10-28T18:13:11Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-10-28T18:13:11Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" ERROR 2018-10-28T18:13:11Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of Sensor { node_id: 0, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.3.0" } NotFound

So the MySConroller-rs does neatly reconnect to the MySensors gateway software (nice!), but just has the same error again.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tsathishkumar/MySController-rs/issues/14#issuecomment-433728319, or mute the thread https://github.com/notifications/unsubscribe-auth/ABaM5F_62pesaxatYfjWDjE0tRJ2rJ7_ks5upfQSgaJpZM4X1hCn .

flatsiedatsie commented 5 years ago

Node 0 is the MySensors gateway. I tried restarting it, but that didn't change anything.

The Mozilla gateway always shows just two sensors: a temperature and a light sensor. Even though I have no device that contains those sensors.

When I added those devices in the past they never got updated.

I think it might also be related to the generic-sensors-adapter add-on? Can the Mozilla Gateway only support certain specific types of devices?

What MySensors devices do you connect to it?

I think I will wait with further testing and trying until you've tried it on a Raspberry Pi :-)

tsathishkumar commented 5 years ago

ERROR 2018-10-28T18:13:11Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of Sensor { node_id: 0, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.3.0" } NotFound

For gateway this error message fine.

  1. Do you have any other node present in the network?
  2. What is the json output when you hit wot api ?
flatsiedatsie commented 5 years ago

Yes, I have multiple nodes present.

This is what I get when I try to access it:

[]

flatsiedatsie commented 5 years ago

The two devices that the Mozilla Gateway did find, it turns out those are from the GPIO add-on.

So I now realise I've never had a successful connection.

Have you had a chance to test it on a Raspberry Pi yourself?

tsathishkumar commented 5 years ago

I was able to test it in a Raspberry Pi. It works fine. I would suggest you to do things step by step to understand if there is a problem.

  1. Make sure you get to see all the nodes in http://localhost:8000/nodes If you don't see the nodes,
    • Try to reboot the sensor (this works only if you have MySensors bootloader installed in the sensors
    • Try to create them using postman or curl to URL http://localhost:8000/nodes Content-Type: application/json body:
      {
      "node_name": "NewSensor",
      "node_id": 1,
      "firmware_type": 1,
      "firmware_version": 1,
      "auto_update": false,
      "scheduled": false
      }
  2. Restart all the nodes once you have successfully added them, this should automatically create sensors and you should be able to see all the child sensors under http://localhost:8000/sensors
  3. Restart MySController-rs
  4. Make sure you get the things visible under the URL http://localhost:8888
  5. Remove all add-ons and add only Web Thing Adapter in Mozilla Gateway
  6. Click on + in Things page of Mozilla gateway. Now you should be able to see all the things. (You don't even need to configure the things url in Web Thing adapter as it does MDNS publish.

Let me know if you stuck on any of these steps. We can get into a call and figure out the issue.

flatsiedatsie commented 5 years ago

That's great news! I'll try right away!

Did you try it based on the Mozilla Gateway image?

flatsiedatsie commented 5 years ago

Here's the latest build details:

pi@gateway:~/MySController-rs $ git pull remote: Enumerating objects: 15, done. remote: Counting objects: 100% (15/15), done. remote: Compressing objects: 100% (2/2), done. remote: Total 8 (delta 6), reused 8 (delta 6), pack-reused 0 Unpacking objects: 100% (8/8), done. From https://github.com/tsathishkumar/MySController-rs 1a2d16e..c09fd37 master -> origin/master Updating 1a2d16e..c09fd37 Fast-forward .bintray.json 15 +++------------ Cargo.lock 2 +- Cargo.toml 11 ++--------- src/wot/mod.rs 24 +++++++++++++----------- 4 files changed, 19 insertions(+), 33 deletions(-) pi@gateway:~/MySController-rs $ cargo run Compiling myscontroller-rs v0.6.3 (/home/pi/MySController-rs)
warning: cannot find type table in this scope
--> <::diesel::macros::table_body macros>:165:33
165 derive ( Debug , Clone , Copy , QueryId ) ] /// The actual table struct
^^^^^^^ names from parent modules are not accessible without an explicit import
= note: #[warn(proc_macro_derive_resolution_fallback)] on by default                                                                                                                  
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!                                                     
= note: for more information, see issue #50504 <https://github.com/rust-lang/rust/issues/50504>                                                                                       
warning: cannot find type table in this scope
--> <::diesel::macros::table_body macros>:165:33
165 derive ( Debug , Clone , Copy , QueryId ) ] /// The actual table struct ^^^^^^^ names from parent modules are not accessible without an explicit import
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!                                                     
= note: for more information, see issue #50504 <https://github.com/rust-lang/rust/issues/50504>                                                                                       
warning: cannot find type firmware_type in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type firmware_version in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type name in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type blocks in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type crc in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type data in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type Firmware in this scope
--> src/model/firmware.rs:23:10
23 #[derive(Queryable, Serialize, Deserialize, Insertable, Clone)] ^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type firmwares in this scope
--> src/model/firmware.rs:23:45
23 #[derive(Queryable, Serialize, Deserialize, Insertable, Clone)] ^^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type Firmware in this scope
--> src/model/firmware.rs:23:45
23 #[derive(Queryable, Serialize, Deserialize, Insertable, Clone)] ^^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type node_id in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type node_name in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type desired_firmware_type in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type desired_firmware_version in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type auto_update in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type scheduled in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type parent_node_id in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type Node in this scope
--> src/model/node.rs:15:10
15 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug)] ^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type nodes in this scope
--> src/model/node.rs:15:45
15 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug)] ^^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type Node in this scope
--> src/model/node.rs:15:45
15 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug)] ^^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type child_sensor_id in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type sensor_type in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type description in this scope
--> <::diesel::macros::__diesel_column macros>:5:33
5 derive ( Debug , Clone , Copy , QueryId , Default ) ] pub struct $ column_name ^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type PresentationType in this scope
--> src/model/sensor.rs:16:10
16 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug, PartialEq, Clone)] ^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type Sensor in this scope
--> src/model/sensor.rs:16:10
16 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug, PartialEq, Clone)] ^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type sensors in this scope
--> src/model/sensor.rs:16:45
16 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug, PartialEq, Clone)] ^^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type Sensor in this scope
--> src/model/sensor.rs:16:45
16 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug, PartialEq, Clone)] ^^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

warning: cannot find type PresentationType in this scope
--> src/model/sensor.rs:16:45
16 #[derive(Queryable, Serialize, Deserialize, Insertable, Debug, PartialEq, Clone)] ^^^^^^^^^^ names from parent modules are not accessible without an explicit import

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #50504 https://github.com/rust-lang/rust/issues/50504

Finished dev [unoptimized + debuginfo] target(s) in 4m 16s                                                                                                                            
 Running `target/debug/myscontroller-rs`

thread 'main' panicked at 'Failed to create pool.: Error(Some("Unable to open the database file"))', libcore/result.rs:1009:5 stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::print at libstd/sys_common/backtrace.rs:71 at libstd/sys_common/backtrace.rs:59 2: std::panicking::default_hook::{{closure}} at libstd/panicking.rs:211 3: std::panicking::default_hook at libstd/panicking.rs:227 4: std::panicking::rust_panic_with_hook at libstd/panicking.rs:476 5: std::panicking::continue_panic_fmt at libstd/panicking.rs:390 6: rust_begin_unwind at libstd/panicking.rs:325 7: core::panicking::panic_fmt at libcore/panicking.rs:77 8: core::result::unwrap_failed at libcore/macros.rs:26 9: <core::result::Result<T, E>>::expect at libcore/result.rs:835 10: myscontroller_rs::main at src/main.rs:44 11: std::rt::lang_start::{{closure}} at libstd/rt.rs:74 12: std::panicking::try::do_call at libstd/rt.rs:59 at libstd/panicking.rs:310 13: __rust_maybe_catch_panic at libpanic_unwind/lib.rs:102 14: std::panicking::try at libstd/panicking.rs:289 15: std::rt::lang_start_internal at libstd/panic.rs:392 at libstd/rt.rs:58 16: std::rt::lang_start at libstd/rt.rs:74 17: main 18: __libc_start_main

I had deleted the database file for a 'clean start', and had to start MySController-rs from output/debug with sudo to re-create it.

pi@gateway:~/MySController-rs/target/debug $ sudo ./myscontroller-rs INFO 2018-11-19T12:26:58Z: actix_web::server::srv: Starting 4 http workers INFO 2018-11-19T12:26:58Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 Running migration 20180416170858 Running migration 20180425200801 Running migration 20180515193701 Running migration 20180530120000 Running migration 20181012103949 INFO 2018-11-19T12:26:58Z: myscontroller_rs: Starting proxy server INFO 2018-11-19T12:26:58Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... INFO 2018-11-19T12:26:58Z: myscontroller_rs::core::connection: Server listening on -- 0.0.0.0:8090 INFO 2018-11-19T12:26:58Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 INFO 2018-11-19T12:26:58Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-11-19T12:26:58Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" ERROR 2018-11-19T12:26:58Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of Sensor { node_id: 0, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.3.0" } NotFound INFO 2018-11-19T12:26:58Z: actix_web::server::srv: Starting 4 http workers INFO 2018-11-19T12:26:58Z: actix_web::server::srv: Starting server on http://0.0.0.0:8888 INFO 2018-11-19T12:26:58Z: actix_web::middleware::logger: 192.168.2.110:52172 [19/Nov/2018:13:26:58 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.005768 ^C INFO 2018-11-19T12:27:05Z: actix_web::server::srv: SIGINT received, exiting INFO 2018-11-19T12:27:05Z: actix_web::server::srv: SIGINT received, exiting INFO 2018-11-19T12:27:05Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-11-19T12:27:05Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-11-19T12:27:05Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-11-19T12:27:05Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-11-19T12:27:05Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-11-19T12:27:05Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-11-19T12:27:05Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-11-19T12:27:05Z: actix_web::server::worker: Shutting down http worker, 0 connections INFO 2018-11-19T12:27:06Z: myscontroller_rs::wot: WoT Server stopped pi@gateway:~/MySController-rs/target/debug $ ./myscontroller-rs INFO 2018-11-19T12:27:17Z: actix_web::server::srv: Starting 4 http workers INFO 2018-11-19T12:27:17Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 INFO 2018-11-19T12:27:17Z: myscontroller_rs: Starting proxy server INFO 2018-11-19T12:27:17Z: myscontroller_rs::core::connection: Server listening on -- 0.0.0.0:8090 INFO 2018-11-19T12:27:17Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... INFO 2018-11-19T12:27:17Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 INFO 2018-11-19T12:27:17Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-11-19T12:27:17Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" ERROR 2018-11-19T12:27:17Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of Sensor { node_id: 0, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.3.0" } NotFound INFO 2018-11-19T12:27:17Z: actix_web::server::srv: Starting 4 http workers INFO 2018-11-19T12:27:17Z: actix_web::server::srv: Starting server on http://0.0.0.0:8888 INFO 2018-11-19T12:27:17Z: actix_web::middleware::logger: 192.168.2.110:52176 [19/Nov/2018:13:27:17 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.001955 INFO 2018-11-19T12:27:50Z: actix_web::middleware::logger: 127.0.0.1:41134 [19/Nov/2018:13:27:50 +0100] "GET /sensors HTTP/1.1" 404 0 "-" "Wget/1.18 (linux-gnueabihf)" 0.001334 INFO 2018-11-19T12:27:54Z: actix_web::middleware::logger: 127.0.0.1:41138 [19/Nov/2018:13:27:54 +0100] "GET /sensors HTTP/1.1" 404 0 "-" "Wget/1.18 (linux-gnueabihf)" 0.001360 INFO 2018-11-19T12:28:13Z: actix_web::middleware::logger: 127.0.0.1:41142 [19/Nov/2018:13:28:13 +0100] "GET / HTTP/1.1" 200 2 "-" "Wget/1.18 (linux-gnueabihf)" 0.001351 INFO 2018-11-19T12:28:43Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "14;255;3;0;6;0\n" INFO 2018-11-19T12:28:45Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "14;255;3;0;11;CO2 sensor\n" INFO 2018-11-19T12:28:45Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "14;255;3;0;12;1.2\n" INFO 2018-11-19T12:28:45Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "14;0;0;0;22;\n" ERROR 2018-11-19T12:28:45Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of Sensor { node_id: 14, child_sensor_id: 0, sensor_type: AirQuality, description: "" } NotFound INFO 2018-11-19T12:28:47Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "14;0;1;0;37;-1\n" WARN 2018-11-19T12:28:47Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 14, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "-1" } } INFO 2018-11-19T12:29:34Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "14;255;3;0;12;1.2\n" INFO 2018-11-19T12:29:34Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "14;0;0;0;22;\n" ERROR 2018-11-19T12:29:34Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of Sensor { node_id: 14, child_sensor_id: 0, sensor_type: AirQuality, description: "" } NotFound INFO 2018-11-19T12:29:35Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "14;0;1;0;37;-128\n" WARN 2018-11-19T12:29:35Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 14, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "-128" } }

flatsiedatsie commented 5 years ago

I still can't get it to work.

Hardware:

  • Running MySensors ethernet gateway, with a radio directly on the GPIO pins of a Raspberry Pi 3B. Messages get posted to port 5003.
  • Software: Mozilla Gateway 0.6.1. Created an SD card image.

sudo curl https://sh.rustup.rs -sSf | sh -> choose ‘modify installation’ and select to install the beta version of rust. Keep the rest as is. -> install additional requirements: sudo apt-get install libssl-dev libsqlite3-dev

I always get the same errors.

pi@gateway:~/MySController-rs/target/debug $ sudo ./myscontroller-rs INFO 2018-11-19T16:10:59Z: actix_web::server::srv: Starting 4 http workers INFO 2018-11-19T16:10:59Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 INFO 2018-11-19T16:10:59Z: myscontroller_rs: Starting proxy server INFO 2018-11-19T16:10:59Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... INFO 2018-11-19T16:10:59Z: myscontroller_rs::core::connection: Server listening on -- 0.0.0.0:9095 INFO 2018-11-19T16:10:59Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 INFO 2018-11-19T16:10:59Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-11-19T16:10:59Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" ERROR 2018-11-19T16:10:59Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of Sensor { node_id: 0, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.3.0" } NotFound INFO 2018-11-19T16:10:59Z: actix_web::server::srv: Starting 4 http workers INFO 2018-11-19T16:10:59Z: actix_web::server::srv: Starting server on http://0.0.0.0:8888 INFO 2018-11-19T16:10:59Z: actix_web::middleware::logger: 192.168.2.110:33580 [19/Nov/2018:17:10:59 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.001940 INFO 2018-11-19T16:11:01Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;7;2;0;3;\n" INFO 2018-11-19T16:11:03Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "9;2;1;0;37;1.0\n" INFO 2018-11-19T16:11:03Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "9;1;1;0;37;267.0\n" WARN 2018-11-19T16:11:03Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 9, child_sensor_id: 2, ack: 0, value: Value { set_type: Level, value: "1.0" } } WARN 2018-11-19T16:11:03Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 9, child_sensor_id: 1, ack: 0, value: Value { set_type: Level, value: "267.0" } } INFO 2018-11-19T16:11:06Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;9;2;0;3;\n" INFO 2018-11-19T16:11:11Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;11;2;0;3;\n" INFO 2018-11-19T16:11:13Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "9;0;1;0;37;-1\n" WARN 2018-11-19T16:11:13Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 9, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "-1" } } INFO 2018-11-19T16:11:16Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;1;2;0;3;\n" INFO 2018-11-19T16:11:21Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "1;3;2;0;3;\n" INFO 2018-11-19T16:11:22Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "9;2;1;0;37;1.0\n"

flatsiedatsie commented 5 years ago

I created a put request in Postman, as suggested.

http://192.168.2.110:8000/nodes?{&"node_name"= "NewSensor",&"node_id"= 1,&"firmware_type"=

This results in the response:

[]

After that, trying "http://192.168.2.110:8000/nodes" or "http://192.168.2.110:8888/" both still result in:

[]

tsathishkumar commented 5 years ago

You need to create a node with id 14.

On Mon, Nov 19, 2018, 9:45 PM flatsiedatsie <notifications@github.com wrote:

I still can't get it to work.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tsathishkumar/MySController-rs/issues/14#issuecomment-439949527, or mute the thread https://github.com/notifications/unsubscribe-auth/ABaM5LqdW54iHGGmMexGCCHFseg7Ht97ks5uwtkMgaJpZM4X1hCn .

tsathishkumar commented 5 years ago

It should be post request.

On Mon, Nov 19, 2018, 9:56 PM flatsiedatsie <notifications@github.com wrote:

I created a put request in Postman, as suggested.

http://192.168.2.110:8000/nodes?{&"node_name"= "NewSensor",&"node_id"= 1,&"firmware_type"=

This results in the response:

[]

After that, trying "http://192.168.2.110:8000/nodes" or " http://192.168.2.110:8888/" both still result in:

[]

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tsathishkumar/MySController-rs/issues/14#issuecomment-439953751, or mute the thread https://github.com/notifications/unsubscribe-auth/ABaM5Dc9Wj54oJByFfBEok6wPqwbCfBhks5uwtuwgaJpZM4X1hCn .

flatsiedatsie commented 5 years ago

Got the Post to work.

http://192.168.2.110:8000/nodes now gives data.

[{"node_id":1,"node_name":"NewSensor","firmware_type":0,"firmware_version":0,"desired_firmware_type":1,"desired_firmware_version":1,"auto_update":false,"scheduled":false,"parent_node_id":0},{"node_id":14,"node_name":"CO2 sensor","firmware_type":0,"firmware_version":0,"desired_firmware_type":1,"desired_firmware_version":1,"auto_update":true,"scheduled":false,"parent_node_id":0}]

http://192.168.2.110:8888 still results in

[]

flatsiedatsie commented 5 years ago

I restarted from scratch today with a fresh Mozilla Gateway image (0.6.1), and a fresh creation of MySController-rs. But I got to the same place.

  • Are you also using a radio connected to the GPIO? With the MySensors gateway software running as the Ethernet version?
  • What kind of MySensors devices are you running? Perhaps they are very different?
  • Should I use the MySensors bootloader? Currently I don't.
tsathishkumar commented 5 years ago

I think the problem is in the way you post data. The json should go in body and not as query param.

On Mon, Nov 19, 2018, 10:26 PM flatsiedatsie <notifications@github.com wrote:

I restarted from scratch today with a fresh Mozilla Gateway image (0.6.1), and a fresh creation of MySController-rs. But I got to the same place.

  • Are you also using a radio connected to the GPIO? With the MySensors gateway software running as the Ethernet version?
  • What kind of MySensors devices are you running? Perhaps they are very different?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tsathishkumar/MySController-rs/issues/14#issuecomment-439964384, or mute the thread https://github.com/notifications/unsubscribe-auth/ABaM5BWQm3lE9IRLtXAE4C_o96y6yNGhks5uwuK7gaJpZM4X1hCn .

flatsiedatsie commented 5 years ago

yes, I fixed that. I updated my post above.

flatsiedatsie commented 5 years ago

http://192.168.2.110:8000/sensors now gives:

[{"node_id":14,"child_sensor_id":255,"sensor_type":"ArduinoRepeaterNode","description":"2.3.0"},{"node_id":14,"child_sensor_id":0,"sensor_type":"AirQuality","description":""}]

8888 is still empty.

tsathishkumar commented 5 years ago

Did you restart the myscontroller after sensors got added?

tsathishkumar commented 5 years ago

My sensors bootloader would help in

  1. Doing OTA updates
  2. Management of firmwares
  3. Auto detection of nodes by myscontroller

It is not mandatory. But will make your life easier. I'm running MySensors Switches and few sensors like temperature etc. I'm using the ethernet Gateway connection.

flatsiedatsie commented 5 years ago

Thanks for the answers.

Did you restart the myscontroller after sensors got added?

Yes I did. I restarted everything I could restart multiple times :-)

flatsiedatsie commented 5 years ago

I just noticed:

pi@gateway:~/MySController-rs/target/debug $ sudo ./myscontroller-rs INFO 2018-11-20T08:03:55Z: actix_web::server::srv: Starting 4 http workers INFO 2018-11-20T08:03:55Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000 INFO 2018-11-20T08:03:55Z: myscontroller_rs: Starting proxy server INFO 2018-11-20T08:03:55Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ... WARN 2018-11-20T08:03:55Z: myscontroller_rs::wot::adapter: PresentationType ArduinoRepeaterNode is not handled yet! WARN 2018-11-20T08:03:55Z: myscontroller_rs::wot::adapter: PresentationType AirQuality is not handled yet! INFO 2018-11-20T08:03:55Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003 INFO 2018-11-20T08:03:55Z: myscontroller_rs::core::connection: Server listening on -- 0.0.0.0:9095 INFO 2018-11-20T08:03:55Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n" INFO 2018-11-20T08:03:55Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n" ERROR 2018-11-20T08:03:55Z: myscontroller_rs::core::message_handler::presentation: Error while checking for existing node of Sensor { node_id: 0, child_sensor_id: 255, sensor_type: ArduinoRepeaterNode, description: "2.3.0" } NotFound INFO 2018-11-20T08:03:55Z: actix_web::server::srv: Starting 4 http workers INFO 2018-11-20T08:03:55Z: actix_web::server::srv: Starting server on http://0.0.0.0:8888 INFO 2018-11-20T08:03:55Z: actix_web::middleware::logger: 192.168.2.110:38282 [20/Nov/2018:09:03:55 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.039264 INFO 2018-11-20T08:03:57Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "14;0;1;0;37;301\n" WARN 2018-11-20T08:03:57Z: myscontroller_rs::wot: No thing found matching SetMessage { node_id: 14, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "301" } }