Closed flatsiedatsie closed 5 years ago
Ah, that makes sense. Airquality sensor has to be handled. I'll work on that.
On Tue, Nov 20, 2018, 1:34 PM flatsiedatsie <notifications@github.com wrote:
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" } }
— 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-440179707, or mute the thread https://github.com/notifications/unsubscribe-auth/ABaM5B8jXbz0ZQqN594rYUFhQhgfLOJxks5uw7epgaJpZM4X1hCn .
It's alive! This time really.
I added another test device with three relays. And after adding that device manually the :8888 shows devices! And they show up in Mozilla Gateway!
It's a start!
So I guess now the only question is:
Why doesn't it add the devices itself?
This is because - in our setup we create the nodes by sending firmwares over the air (and the node_id gets assigned automatically by the controller). But in your case the node ids are already set, but the controller doesn't know about the node_id. I have a solution in mind. If there is a presentation message from node, we can auto create it with no firmware.
Can I help with adding more sensor types? I am not a good programmer, but if I can just repeat a pattern, perhaps that's useful? Which files should I check out?
Definitely. I need help in understanding about the sensor outputs. What kind of values will be coming from the sensor, so that I can map it correctly to the Mozilla WoT thing.
To start with, what is the output of AirQuality Sensor, quick look at the mysensors API tells that V_LEVEL and V_UNIT_PREFIX are applicable for S_AIR_QUALITY. Is that all?
And it would be better to use some other medium or another issue. Because this issue is filled with long logs and Github is struggling to load this page :D
Perhaps it's useful, so here are the latest results from "cargo run":
warning: unused import:
hex
--> src/core/message/internal.rs:2:5
= note: #[warn(unused_imports)] on by default
warning: unused import:
std::mem
--> src/core/message/internal.rs:5:5
|
5 | use std::mem;
| ^^^^^^^^
--> src/core/message_handler/internal.rs:82:14
= note: #[warn(unused_parens)] on by default
table
in this scope--> <::diesel::macros::table_body macros>:165:33
table
in this scope--> <::diesel::macros::table_body macros>:165:33
firmware_type
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
firmware_version
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
name
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
blocks
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
crc
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
data
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
Firmware
in this scope--> src/model/firmware.rs:23:10
= 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
firmwares
in this scope--> src/model/firmware.rs:23:45
= 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
Firmware
in this scope--> src/model/firmware.rs:23:45
= 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
node_id
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
node_name
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
desired_firmware_type
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
desired_firmware_version
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
auto_update
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
scheduled
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
parent_node_id
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
Node
in this scope--> src/model/node.rs:15:10
= 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
nodes
in this scope--> src/model/node.rs:15:45
= 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
Node
in this scope--> src/model/node.rs:15:45
= 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
child_sensor_id
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
sensor_type
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
description
in this scope--> <::diesel::macros::__diesel_column macros>:5:33
= 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
PresentationType
in this scope--> src/model/sensor.rs:16:10
= 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
Sensor
in this scope--> src/model/sensor.rs:16:10
= 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
sensors
in this scope--> src/model/sensor.rs:16:45
= 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
Sensor
in this scope--> src/model/sensor.rs:16:45
= 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
PresentationType
in this scope--> src/model/sensor.rs:16:45
= 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
ack
--> src/core/message_handler/internal.rs:38:65
ack: _
= note: #[warn(unused_variables)] on by default
MAX_MESSAGE_LENGTH
--> src/core/message/internal.rs:7:1
= note: #[warn(dead_code)] on by default
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 anErr
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 $