Giter Site home page Giter Site logo

tsathishkumar / myscontroller-rs Goto Github PK

View Code? Open in Web Editor NEW
20.0 6.0 9.0 1.09 MB

Controller for MySensors, exposes WoT APIs for the sensors. It supports OTA firmware updates, and also acts as proxy for all requests.

License: GNU Affero General Public License v3.0

Rust 98.80% Shell 0.61% PLpgSQL 0.11% Dockerfile 0.48%
mysensors ota-firmware-updates rust ota mysensors-controller wot-api gateway webofthings mozilla-iot fota

myscontroller-rs's People

Contributors

ashokgowtham avatar flatsiedatsie avatar goutamniwas avatar selvakn avatar tsathishkumar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

myscontroller-rs's Issues

Add support for sendHeartbeat()

Use-case: Heartbeat signals to tell the controller the node(smart lock for example) is still working, even though the status of the node (door status open/closed for example) may not change in days.

Send sketch name to controller

A MySensors node can/will pass along a name (a short description) for the device and for each of the children.

These are sent as internal messages (3;)

This is the name of the sketch:
I_SKETCH_NAME 11 Optional sketch name that can be used to identify sensor in the Controller GUI

Each child can also send a name for itself.
I_PRESENTATION 19 Presentation message

Currently these names don't seem to end up in the WOT data. They are just called "new node". It would be great it both the node name and the child name could be passed along.

For example, I have an irrigation device that can monitor and water 6 plants. When it first presents itself, it presents 12 different devices:

  • 6 moisture sensors
  • 6 dimmers (to set the level at which the plant's irrigation should start)

They are all named so that the user knows sensor and dimmer belong together.

In an upcoming version of MySensors naming the children will be even easier to do, as it no longer comes with a memory penalty.

Installation on Mozilla Gateway Pi image

For anyone looking for some help, here is the step-by-step process of getting this to run on the Mozilla Gateway Raspberry Pi image (0.6.1).

1. Get all the supporting software

First, login to your Raspberry Pi via SSH. Make sure the "enable SSH" option is set in the Mozilla Gateway interface (under Settings -> Developer).

Let's get the latest versions of the repositories, so your system knows what all the latest versions are, using this command:

sudo apt-get update

Next, we need to install Rust. It's the programming language in which MySController-rs was written.

sudo curl https://sh.rustup.rs -sSf | sh

Here you will be asked a question during the installation procedure. Choose ‘modify installation’ and select to install the beta version of rust. Keep the rest of the options at their defaults (simply press enter in those cases).

Next, we need to install some things this project relies on.

sudo apt-get install libssl-dev libsqlite3-dev

2. Create a settings file

Let's also create a settings file now. (And you use the same command again later if you want to change the settings). Type:

sudo nano /etc/myscontroller-rs/conf.ini

You are now editing a text file with a program called 'nano', a rudimentary text editor. Depending on that need, copy one of these two texts into it (ctrl-C and ctrl V on windows/linux, CMD-C and CMD-V on mac):

Option A.
If you are using a serial gateway for MySensors (an Arduino connected via USB), use this:

[Gateway]
;type=TCP
;port=0.0.0.0:5003
type=SERIAL
port=/dev/ttyUSB0
baud_rate=115200

[Controller]
type=TCP
port=0.0.0.0:8088

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

Option B.
If you are using the ethernet variety, use this:

[Gateway]
type=TCP
port=0.0.0.0:5003
;type=SERIAL
;port=/dev/ttyUSB0
;baud_rate=115200

[Controller]
type=TCP
port=0.0.0.0:8088

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

(and don't forget to also install the MySensors gateway software)

3. Get the code

OK, time to get the code and turn that code into the actual program. Type:

git clone https://github.com/tsathishkumar/MySController-rs.git

then

cd MySController-rs

and then

sudo cargo run

Great, now go make yourself a cup of tea. This should take about 15 minutes.

A lot of things will scroll by in the mean time. It will start with:

    Updating crates.io index
  Downloaded http v0.1.14                                                       
  Downloaded log v0.4.6                                                         
  Downloaded serde_derive v1.0.80                                               
  Downloaded byteorder v1.2.7                                                   
  Downloaded smallvec v0.6.6                                                    
  Downloaded r2d2 v0.8.3                                                        
  Downloaded actix-web v0.7.14                                                  
  Downloaded lazy_static v1.2.0  

..followed by things like this..

   Compiling libc v0.2.44                                                       
   Compiling proc-macro2 v0.4.24                                                
   Compiling rand_core v0.3.0                                                   
   Compiling cfg-if v0.1.6                                                      
   Compiling nodrop v0.1.13                                                     
   Compiling byteorder v1.2.7                                                   
   Compiling lazy_static v1.2.0                                                 
   Compiling failure_derive v0.1.3                                              

..and as it finally gets to the heart of the matter, the MySController code itself, you may start to see a lot of warnings like:

   Compiling myscontroller-rs v0.6.5 (/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>

Don't be alarmed. They are not a problem.

Finally, you will see:

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

The controller should now be running.

Now, it may well crash now with an error at this point. Something like:

thread 'main' panicked at 'called Result::unwrap()on anErr value:
.. followed by the precise error message.

If so, do a search here and in google to learn more about the issue. You might find tips on how to fix it yourself. If you don't see any reference to the error, create a new issue here, and share in detail how you arrived at the issue. Mention things like the version of the Mozilla Gateway, the hardware you're running, that type of MySensors gateway you use (software or Serial Arduino).

Done!

Keep your terminal window open for now, as it will allow us to see what is going on under the hood.

4. Get the devices into Mozilla Gateway.

Finally open the Mozilla Gateway interface and go to Settings -> Add-ons. Configure the Web Things add-on, and add this url there:

http://127.0.0.1:8888

Now, you can try powering up your MySensors devices one by one. You should see a lot of activity in the terminal window. After finding each device the software should restart itself. Give it a few minutes. Restart your arduino's after they have been found too.

Try clicking the "add things" button in the Mozilla Gateway interface. You should now see the devices.

TROUBLESHOOTING

During the device discovery phase you can 'look under the hood' by opening these url's in your browser:

http://[YOUR CONTROLLER'S IP ADDRESS HERE]:8000/nodes
http://[YOUR CONTROLLER'S IP ADDRESS HERE]:8000/sensors
http://[YOUR CONTROLLER'S IP ADDRESS HERE]:8888

(so for example: http://192.168.1.110:8000/nodes)

They will list all the devices that have been found. If they haven't (yet), then you will only see:
[]

Trying to install via Apt-Get on Raspberry Pi

I used Mozilla's image and Etcher to create an SD card.

I then enabled SSH in the interface, and connected to it.

Trying to follow your installation instructions fails though. It feels as it it assumes things will be running in a docker container?

pi@gateway:~ $ sudo apt-get update
Hit:1 http://archive.raspberrypi.org/debian stretch InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Ign:3 http://dl.bintray.com/tsathishkumar/myscontroller-rs vivid InRelease
Hit:4 http://dl.bintray.com/tsathishkumar/myscontroller-rs vivid Release
Get:5 http://dl.bintray.com/tsathishkumar/myscontroller-rs vivid Release.gpg [821 B]
Ign:5 http://dl.bintray.com/tsathishkumar/myscontroller-rs vivid Release.gpg
Fetched 821 B in 1s (645 B/s)
Reading package lists... Done
W: GPG error: http://dl.bintray.com/tsathishkumar/myscontroller-rs vivid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 379CE192D401AB61
W: The repository 'http://dl.bintray.com/tsathishkumar/myscontroller-rs vivid Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Skipping acquire of configured file 'main/binary-armhf/Packages' as repository 'http://dl.bintray.com/tsathishkumar/myscontroller-rs vivid InRelease' doesn't support architecture 'armhf'

Crash if [controller] is not defined in the ini

Even though the [controller] part of the ini file is technically optional, not adding a controller leads to an immediate crash.

pi@gateway:~/MySController-rs/target/debug $ sudo ./myscontroller-rs
INFO 2018-11-19T15:31:52Z: actix_web::server::srv: Starting 4 http workers
INFO 2018-11-19T15:31:52Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000
INFO 2018-11-19T15:31:52Z: myscontroller_rs: Starting proxy server
thread '' panicked at 'Controller port is not specified. Ex:
[Controller]
type=SERIAL
port=/dev/tty1
or

[Controller]
type=SERIAL
port=port=0.0.0.0:5003', libcore/option.rs:1008:5
INFO 2018-11-19T15:31:53Z: actix_web::server::srv: Starting 4 http workers
INFO 2018-11-19T15:31:53Z: 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-11-19T15:31:53Z: actix_web::middleware::logger: 192.168.2.22:60908 [19/Nov/2018:16:31:53 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.356569
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::option::expect_failed
at libcore/option.rs:1008
9: <core::option::Option>::expect
at libcore/option.rs:322
10: myscontroller_rs::get_mys_controller
at src/main.rs:174
11: myscontroller_rs::main::{{closure}}
at src/main.rs:106

Pick up on automatically assigned node ID's

In MySensors node ID's are often generated automatically.

As discussed, the MySController-rs software could pick up on these ID's.

Here's a typical ID message:
Nov 20 09:06:07 DEBUG TSF:MSG:READ,15-15-0,s=255,c=3,t=11,pt=0,l=21,sg=0:SMS & password relays

Here's another one from a temperature-humidity-barometer node (using the popular Bosch BME280 sensor).

Nov 20 10:31:23 DEBUG TSF:MSG:BC
Nov 20 10:31:23 DEBUG TSF:MSG:FPAR REQ,ID=3
Nov 20 10:31:23 DEBUG TSF:PNG:SEND,TO=0
Nov 20 10:31:23 DEBUG TSF:CKU:OK
Nov 20 10:31:23 DEBUG TSF:MSG:GWL OK
Nov 20 10:31:24 DEBUG TSF:MSG:SEND,0-0-3-3,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
Nov 20 10:31:24 DEBUG TSF:MSG:READ,14-14-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
Nov 20 10:31:24 DEBUG TSF:MSG:PINGED,ID=14,HP=1
Nov 20 10:31:24 DEBUG TSF:MSG:SEND,0-0-14-14,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
Nov 20 10:31:25 DEBUG TSF:MSG:READ,3-3-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
Nov 20 10:31:25 DEBUG TSF:MSG:PINGED,ID=3,HP=1
Nov 20 10:31:25 DEBUG TSF:MSG:SEND,0-0-3-3,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
Nov 20 10:31:25 DEBUG TSF:MSG:READ,3-3-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
Nov 20 10:31:25 DEBUG TSF:MSG:SEND,0-0-3-3,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
Nov 20 10:31:25 DEBUG TSF:MSG:READ,3-3-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.3.0
Nov 20 10:31:25 DEBUG TSF:MSG:READ,3-3-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
Nov 20 10:31:27 DEBUG TSF:MSG:READ,3-3-0,s=255,c=3,t=11,pt=0,l=25,sg=0:Temperature and more sens
Nov 20 10:31:27 DEBUG TSF:MSG:READ,3-3-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.2
Nov 20 10:31:27 DEBUG TSF:MSG:READ,3-3-0,s=0,c=0,t=6,pt=0,l=0,sg=0:
Nov 20 10:31:27 DEBUG TSF:MSG:READ,3-3-0,s=1,c=0,t=7,pt=0,l=0,sg=0:
Nov 20 10:31:27 DEBUG TSF:MSG:READ,3-3-0,s=2,c=0,t=8,pt=0,l=0,sg=0:
Nov 20 10:31:27 DEBUG TSF:MSG:READ,3-3-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2

Data is not getting through - missing newline?

There are still a few small bugs in the system that usually disappear after a few reboots. But those bugs can still be very confusing.

For example, I have added some moisture sensors and dimmers from my Plant Health sensor.

I then change the value in Mozilla Gateway, hoping to see the value reflected in the node.

The MyController-RS seems to send this:

INFO 2018-12-10T21:31:27Z: myscontroller_rs::wot::adapter: **Property forwarded 67 for sensor Sensor { node_id: 1, child_sensor_id: 5, sensor_type: Dimmer, description: "3" }**
 INFO 2018-12-10T21:31:27Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << "1;5;1;0;3;67\n"
 INFO 2018-12-10T21:31:27Z: actix_web::middleware::logger: 127.0.0.1:58796 "PUT /8/properties/level HTTP/1.1" 200 12 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.005710
 INFO 2018-12-10T21:31:27Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;2;2.3.0\n"
 INFO 2018-12-10T21:31:27Z: myscontroller_rs::core::connection: 0.0.0.0:8088 << "0;255;3;0;2;2.3.0\n"

And then there is this message in the MySensors gateway has 67 as its payload:

Dec 10 22:31:20 DEBUG GWT:RFC:C=0,MSG=0;0;3;0;18;PING
Dec 10 22:31:27 DEBUG GWT:RFC:C=0,MSG=**0;255;3;0;2;1;5;1;0;3;67**
Dec 10 22:31:30 DEBUG GWT:RFC:C=0,MSG=0;0;3;0;18;PING
Dec 10 22:31:36 DEBUG TSF:SAN:OK

I don't receive the data in my node.

The MySensors gateway debug lines seem a bit odd? The line seems to be a concatenation of two messages. The first part is 0;255;3;0;2 and the second part is 1;5;1;0;3;67

Could it be that there are two message concatenated here, causing the second message to not be sent? Perhaps a newline is missing?

In general there are A LOT of 0;255;3;0;2; messages in the log:
0; (gateway node)
255; (repeater child? System child?)
3; (system message)
0; (no ACK)
2 (I_VERSION, Used to request gateway version from controller)

 INFO 2018-12-10T21:40:20Z: myscontroller_rs::core::connection: 0.0.0.0:8088 >> "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:40:20Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:40:20Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;22;1423834\n"
 INFO 2018-12-10T21:40:20Z: myscontroller_rs::core::connection: 0.0.0.0:8088 << "0;255;3;0;22;1423834\n"
 INFO 2018-12-10T21:40:30Z: myscontroller_rs::core::connection: 0.0.0.0:8088 >> "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:40:30Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:40:30Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;22;1433838\n"
 INFO 2018-12-10T21:40:30Z: myscontroller_rs::core::connection: 0.0.0.0:8088 << "0;255;3;0;22;1433838\n"
 INFO 2018-12-10T21:40:40Z: myscontroller_rs::core::connection: 0.0.0.0:8088 >> "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:40:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:40:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;22;1443831\n"
 INFO 2018-12-10T21:40:40Z: myscontroller_rs::core::connection: 0.0.0.0:8088 << "0;255;3;0;22;1443831\n"
 INFO 2018-12-10T21:40:40Z: myscontroller_rs::core::connection: 0.0.0.0:8088 << 0;255;3;0;2;
 INFO 2018-12-10T21:40:45Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << 0;255;3;0;2;
 INFO 2018-12-10T21:40:50Z: myscontroller_rs::core::connection: 0.0.0.0:8088 >> "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:40:50Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:40:50Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;2;2.3.0\n"
 INFO 2018-12-10T21:40:50Z: myscontroller_rs::core::connection: 0.0.0.0:8088 << "0;255;3;0;2;2.3.0\n"
 INFO 2018-12-10T21:41:00Z: myscontroller_rs::core::connection: 0.0.0.0:8088 >> "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:41:00Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:41:00Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;22;1463834\n"
 INFO 2018-12-10T21:41:00Z: myscontroller_rs::core::connection: 0.0.0.0:8088 << "0;255;3;0;22;1463834\n"
 INFO 2018-12-10T21:41:10Z: myscontroller_rs::core::connection: 0.0.0.0:8088 >> "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:41:10Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:41:10Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;22;1473840\n"
 INFO 2018-12-10T21:41:10Z: myscontroller_rs::core::connection: 0.0.0.0:8088 << "0;255;3;0;22;1473840\n"
 INFO 2018-12-10T21:41:20Z: myscontroller_rs::core::connection: 0.0.0.0:8088 >> "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:41:20Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:41:20Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;22;1483835\n"
 INFO 2018-12-10T21:41:20Z: myscontroller_rs::core::connection: 0.0.0.0:8088 << "0;255;3;0;22;1483835\n"

Which looks like this in the MySensors Gateway log:

 INFO 2018-12-10T21:43:10Z: myscontroller_rs::core::connection: 0.0.0.0:8088 >> "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:43:10Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:43:10Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;22;1593842\n"
 INFO 2018-12-10T21:43:10Z: myscontroller_rs::core::connection: 0.0.0.0:8088 << "0;255;3;0;22;1593842\n"
 INFO 2018-12-10T21:43:20Z: myscontroller_rs::core::connection: 0.0.0.0:8088 >> "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:43:20Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:43:20Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;22;1603843\n"
 INFO 2018-12-10T21:43:20Z: myscontroller_rs::core::connection: 0.0.0.0:8088 << "0;255;3;0;22;1603843\n"
 INFO 2018-12-10T21:43:20Z: myscontroller_rs::core::connection: 0.0.0.0:8088 << 0;255;3;0;2;
 INFO 2018-12-10T21:43:25Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << 0;255;3;0;2;
 INFO 2018-12-10T21:43:30Z: myscontroller_rs::core::connection: 0.0.0.0:8088 >> "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:43:30Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:43:30Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;2;2.3.0\n"
 INFO 2018-12-10T21:43:30Z: myscontroller_rs::core::connection: 0.0.0.0:8088 << "0;255;3;0;2;2.3.0\n"
 INFO 2018-12-10T21:43:40Z: myscontroller_rs::core::connection: 0.0.0.0:8088 >> "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:43:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << "0;0;3;0;18;PING\n"
 INFO 2018-12-10T21:43:40Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;22;1623848\n"
 INFO 2018-12-10T21:43:40Z: myscontroller_rs::core::connection: 0.0.0.0:8088 << "0;255;3;0;22;1623848\n"

Add automatic detection of additional devices

Currently the software will scan all devices that exist once, and show them. If you then choose the 'add devices' option at a later time, newly powered up MySensors devices do not automatically show up in the Mozilla Gateway interface.

support for multiple gateways

Right now the controller can connect to only one gateway at a time.
But to scale the setup, sometimes we need to connect and publish the messages through multiple physical gateways.

Data is received multiple times?

The code below shows what happens after a single "requestTime();"

Hello world!
Connected to gateway!
**Received time: 1544457418
Received time: 15:56
Received time: 1544457418
Received time: 15:56
Received time: 1544457418
Received time: 15:56
Received time: 1544457418
Received time: 15:56
Received time: 1544457418
Received time: 15:56
Received time: 1544457418
Received time: 15:56**
-1-2Received time: 15:57
Loop number and motion sensor movements: 1 -> 2
Sending motion total:2
Connection is ok
__Incoming change for child: 1

__Incoming change for child: 1

__Incoming change for child: 1

__Incoming change for child: 1

__Incoming change for child: 1

__Incoming change for child: 1

__Incoming change for child: 1

Similarly, as you can see above, there are 7 incoming messages for child 1. This child is a temperature sensor value, so there should be no reason for it to be receiving messages.

Show value inside 'thing'

I don't know if this is a MySController-rs or Mozilla Gateway issue. But I noticed that in the things overview all the devices created with MySController-rs just say 'thing' in the middle of them. While picture by Mozilla show that devices can also directly show their most relevant value in the middle of them.

Currently I have to click on a device to see its value.

This might be a reason not to merge devices into more complex versions, since then you will always need to click on them to see all the values they represent. I wonder how Mozilla is planning to handle this.

Support for Barometric sensor

Air pressure is used by barometers. Tracking it is useful for local weather prediction. It is measured in mbar, and oscillates around a value of 1013. (900-1100).

https://en.wikipedia.org/wiki/Atmospheric_pressure

in MySensors this is initiated as follows:

MyMessage pressureMsg(BARO_CHILD_ID, V_PRESSURE);
MyMessage forecastMsg(BARO_CHILD_ID, V_FORECAST);

So a child can receive two values:

  • pressure in mbar
  • a code value that indicates upcoming weather.

The codes are:
#define STABLE 0 // "Stable Weather Pattern"
#define SUNNY 1 // "Slowly rising Good Weather", "Clear/Sunny "
#define CLOUDY 2 // "Slowly falling L-Pressure ", "Cloudy/Rain "
#define UNSTABLE 3 // "Quickly rising H-Press", "Not Stable"
#define THUNDERSTORM 4 // "Quickly falling L-Press", "Thunderstorm"
#define UNKNOWN 5 // "Unknown (More Time needed)

Supporting just the pressure would already be great. A lot of controllers can calculate the weather prediction from that themselves.

Another solution to the "human readable" issue would be the support of text sensors. There is an issue about that already.

Add V_TEXT support to allow passing text to sensors

requesting/passing along V_TEXT updates that happen on the server.

Use-case: My smart door lock uses this to get the latest password from the controller. I can then open the door with an SMS by checking if the SMS content matches the password set in the controller.

Ensure connection to gateway exists by checking periodically.

If the connection to gateway from myscontroller-rs breaks abruptly (like pulling the ethernet cable off), then myscontroller-rs doesn't try to reconnect.
Home Assistant handles this scenario by sending I_VERSION(2) INTERNAL(3) messages once every 10 seconds and expects a response back with a timeout of 10 seconds.
If the response doesn't come back within timeout, then it disconnects the connection and attempts reconnect and sends the I_VERSION message again.

Strange data passed along to other optional controller?

I used the [controller] option to send the data along to Domoticz (fresh install). This is with an Ethernet gateway.

There I'm getting some.. odd things. Devices seem merged together there.

For example, suddenly it seems that I have a plant moisture sensor where the first two children (mostire sensors and dimmer) have both magically been turned into dust sensors.

irrigation-weird
(normally this would be 6 moisture sensors and 6 dimmers).

Wait, it now also magically has a HVAC setpoint child :-D I'm not even sure where that came from, as I don't have any device connected currently that has a child like that.

irrigation-weird-2

I have a similar weird issue with a dust sensor. It also suddenly has a HVAC setpoint setting.:

setpoint-heat

The smart door lock has an "unknown!" child:

doorlock

Hmm, door 1 is now "eOor1". It might be a bad wireless connection.

Could it be caused by the two controllers trying to use the radio at the same time?

Latest build results

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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 rust-lang/rust#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 $

Is UnitPrefix implemented in the best way?

I don't know what I'm talking about, but currently the "UnitPrefix" data type seems a bit strange. Right now it can be a property of a thing. This results in something like "pressure" being displayed as a separate string in the interface (in the cases that a MySensors device actually sends a prefix along)

When I looked at set.rs I noticed that there actually is a way to set the pre/postfix of a device.

    pub fn unit(&self) -> &'static str {
        match *self {
            SetReqType::Temp => "celsius",
            SetReqType::Percentage => "%",
            _ => "",
        }
    }

Shouldn't the UnitPrefix data (if MySensors sends it at all) end up in that list?

From my limited understanding, for a device that measures barometric pressure it should send the string "mBar" as the V_UNIT_PREFIX.

V_UNIT_PREFIX is only sent once I think, when the device starts. It has the same child ID as the actual sensor data that will be coming in after it.

Serial MySensors gateway is polled too often?

To try something different I connected an Arduino Nano (FTDI) as a MySensors gateway.

This is the ini file:

`
[Gateway]
;type=TCP
;port=0.0.0.0:5003
type=SERIAL
port=/dev/ttyUSB0

[Controller]
type=TCP
port=0.0.0.0:9095
;type=SERIAL
;port=/dev/ttyUSB0

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

This is the result:

Perhaps a speed issue?

pi@gateway:~/MySController-rs/target/debug $ sudo ./myscontroller-rs
INFO 2018-11-19T15:33:12Z: actix_web::server::srv: Starting 4 http workers
INFO 2018-11-19T15:33:12Z: actix_web::server::srv: Starting server on http://0.0.0.0:8000
INFO 2018-11-19T15:33:12Z: myscontroller_rs: Starting proxy server
INFO 2018-11-19T15:33:12Z: myscontroller_rs::core::connection: Waiting for serial connection in -- /dev/ttyUSB0 ...
INFO 2018-11-19T15:33:12Z: myscontroller_rs::core::connection: Server listening on -- 0.0.0.0:9095
INFO 2018-11-19T15:33:12Z: myscontroller_rs::core::connection: Connected to -- /dev/ttyUSB0
INFO 2018-11-19T15:33:12Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:12Z: myscontroller_rs::core::connection: Error while reading -- reached EOF
INFO 2018-11-19T15:33:12Z: myscontroller_rs::core::connection: Waiting for serial connection in -- /dev/ttyUSB0 ...
ERROR 2018-11-19T15:33:12Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:12Z: myscontroller_rs::core::connection: Connected to -- /dev/ttyUSB0
INFO 2018-11-19T15:33:12Z: actix_web::server::srv: Starting 4 http workers
INFO 2018-11-19T15:33:12Z: actix_web::server::srv: Starting server on http://0.0.0.0:8888
INFO 2018-11-19T15:33:13Z: actix_web::middleware::logger: 192.168.2.22:60912 [19/Nov/2018:16:33:13 +0100] "GET / HTTP/1.1" 200 2 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.002739
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "cc"
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "\u{c}s"
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "!"
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "wA"
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "x"
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "2]"
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "cuf" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "\u{11}" INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "ca" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "\u{6}" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "hj" INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "c" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "u\u{15}N1B" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ")]" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "\r" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "5" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "(" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "a" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "qe" INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "\u{f}r:z" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "c"
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "q"
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "p"
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "c" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "G" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "a" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "" ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "u5Wr"
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:14Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:14Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:16Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
INFO 2018-11-19T15:33:16Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:16Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
ERROR 2018-11-19T15:33:16Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:16Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "c"
ERROR 2018-11-19T15:33:16Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:16Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:16Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:16Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:16Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:16Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "2u\u{15}Dq"
ERROR 2018-11-19T15:33:16Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:16Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "a"
ERROR 2018-11-19T15:33:16Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:16Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:16Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:16Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "q"
INFO 2018-11-19T15:33:16Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:16Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:16Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:16Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:16Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "F"
ERROR 2018-11-19T15:33:16Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:16Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> "/O "
ERROR 2018-11-19T15:33:16Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
ERROR 2018-11-19T15:33:16Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:20Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
INFO 2018-11-19T15:33:20Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:20Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:20Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:20Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:20Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""
ERROR 2018-11-19T15:33:20Z: myscontroller_rs::core::interceptor: Error while parsing command message InvalidCommandMessage, simply forwarding to controller
INFO 2018-11-19T15:33:20Z: myscontroller_rs::core::connection: /dev/ttyUSB0 >> ""

Build fails on Raspberry Pi

Getting quite a few errors from the build proces:

   Compiling diesel_migrations v1.3.0
   Compiling myscontroller-rs v0.5.6 (file:///home/pi/MySController-rs)
error[E0433]: failed to resolve. Use of undeclared type or module `PresentationType`
 --> src/core/message/presentation.rs:7:14
  |
7 |     #[derive(DbEnum, Debug, PartialEq, Clone, Copy, Serialize, Deserialize)]
  |              ^^^^^^ Use of undeclared type or module `PresentationType`

error[E0412]: cannot find type `PresentationType` in this scope
 --> src/core/message/presentation.rs:7:14
  |
7 |     #[derive(DbEnum, Debug, PartialEq, Clone, Copy, Serialize, Deserialize)]
  |              ^^^^^^ not found in this scope

warning: cannot find type `PresentationType` in this scope
 --> src/core/message/presentation.rs:7:14
  |
7 |     #[derive(DbEnum, Debug, PartialEq, Clone, Copy, Serialize, Deserialize)]
  |              ^^^^^^ 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 `PresentationType` in this scope
 --> src/core/message/presentation.rs:7:14
  |
7 |     #[derive(DbEnum, Debug, PartialEq, Clone, Copy, Serialize, Deserialize)]
  |              ^^^^^^ 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 `table` in this scope
   --> <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_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_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_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_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_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_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_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_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_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_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_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_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:14:10
   |
14 | #[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:14:45
   |
14 | #[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:14:45
   |
14 | #[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_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_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_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>

error[E0277]: the trait bound `core::message::presentation::PresentationType: diesel::Queryable<core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, _>` is not satisfied
  --> src/core/message_handler/presentation.rs:42:10
   |
42 |         .first::<Sensor>(conn)
   |          ^^^^^ the trait `diesel::Queryable<core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, _>` is not implemented for `core::message::presentation::PresentationType`
   |
   = note: required because of the requirements on the impl of `diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Integer, core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, diesel::sql_types::Text), _>` for `(i32, i32, core::message::presentation::PresentationType, std::string::String)`
   = note: required because of the requirements on the impl of `diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Integer, core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, diesel::sql_types::Text), _>` for `model::sensor::Sensor`
   = note: required because of the requirements on the impl of `diesel::query_dsl::LoadQuery<_, model::sensor::Sensor>` for `diesel::query_builder::SelectStatement<model::sensor::sensors::table, diesel::query_builder::select_clause::DefaultSelectClause, diesel::query_builder::distinct_clause::NoDistinctClause, diesel::query_builder::where_clause::WhereClause<diesel::expression::operators::And<diesel::expression::operators::Eq<model::sensor::sensors::columns::node_id, diesel::expression::bound::Bound<diesel::sql_types::Integer, i32>>, diesel::expression::operators::Eq<model::sensor::sensors::columns::child_sensor_id, diesel::expression::bound::Bound<diesel::sql_types::Integer, i32>>>>, diesel::query_builder::order_clause::NoOrderClause, diesel::query_builder::limit_clause::LimitClause<diesel::expression::bound::Bound<diesel::sql_types::BigInt, i64>>>`

error[E0277]: the trait bound `core::message::presentation::PresentationType: diesel::Queryable<core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, _>` is not satisfied
  --> src/handler/sensor.rs:41:14
   |
41 |             .load::<Sensor>(conn)
   |              ^^^^ the trait `diesel::Queryable<core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, _>` is not implemented for `core::message::presentation::PresentationType`
   |
   = note: required because of the requirements on the impl of `diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Integer, core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, diesel::sql_types::Text), _>` for `(i32, i32, core::message::presentation::PresentationType, std::string::String)`
   = note: required because of the requirements on the impl of `diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Integer, core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, diesel::sql_types::Text), _>` for `model::sensor::Sensor`
   = note: required because of the requirements on the impl of `diesel::query_dsl::LoadQuery<_, model::sensor::Sensor>` for `model::sensor::sensors::table`

error[E0277]: the trait bound `core::message::presentation::PresentationType: diesel::Queryable<core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, _>` is not satisfied
  --> src/handler/sensor.rs:88:14
   |
88 |             .first::<Sensor>(conn)
   |              ^^^^^ the trait `diesel::Queryable<core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, _>` is not implemented for `core::message::presentation::PresentationType`
   |
   = note: required because of the requirements on the impl of `diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Integer, core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, diesel::sql_types::Text), _>` for `(i32, i32, core::message::presentation::PresentationType, std::string::String)`
   = note: required because of the requirements on the impl of `diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Integer, core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, diesel::sql_types::Text), _>` for `model::sensor::Sensor`
   = note: required because of the requirements on the impl of `diesel::query_dsl::LoadQuery<_, model::sensor::Sensor>` for `diesel::query_builder::SelectStatement<model::sensor::sensors::table, diesel::query_builder::select_clause::DefaultSelectClause, diesel::query_builder::distinct_clause::NoDistinctClause, diesel::query_builder::where_clause::WhereClause<diesel::expression::operators::And<diesel::expression::operators::Eq<model::sensor::sensors::columns::node_id, diesel::expression::bound::Bound<diesel::sql_types::Integer, i32>>, diesel::expression::operators::Eq<model::sensor::sensors::columns::child_sensor_id, diesel::expression::bound::Bound<diesel::sql_types::Integer, i32>>>>, diesel::query_builder::order_clause::NoOrderClause, diesel::query_builder::limit_clause::LimitClause<diesel::expression::bound::Bound<diesel::sql_types::BigInt, i64>>>`

error[E0277]: the trait bound `core::message::presentation::PresentationType: diesel::Queryable<core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, _>` is not satisfied
  --> src/wot/mod.rs:58:31
   |
58 |                 match sensors.load::<Sensor>(&conn) {
   |                               ^^^^ the trait `diesel::Queryable<core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, _>` is not implemented for `core::message::presentation::PresentationType`
   |
   = note: required because of the requirements on the impl of `diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Integer, core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, diesel::sql_types::Text), _>` for `(i32, i32, core::message::presentation::PresentationType, std::string::String)`
   = note: required because of the requirements on the impl of `diesel::Queryable<(diesel::sql_types::Integer, diesel::sql_types::Integer, core::message::presentation::db_enum_impl_PresentationType::PresentationTypeMapping, diesel::sql_types::Text), _>` for `model::sensor::Sensor`
   = note: required because of the requirements on the impl of `diesel::query_dsl::LoadQuery<_, model::sensor::Sensor>` for `model::sensor::sensors::table`

error: aborting due to 6 previous errors

Some errors occurred: E0277, E0412, E0433.
For more information about an error, try `rustc --explain E0277`.
error: Could not compile `myscontroller-rs`.

Latest build results

// scroll down to the end. The problem was fixed. But there are still two error messages.

Some results from the latest version:

  • Messages from the serial gateway didn't seem to result in any actions.
  • I then tried the Ethernet gateway. This results in messages like:

Nov 28 22:51:58 DEBUG Ethernet client disconnected.
Nov 28 22:52:33 DEBUG Ethernet client disconnected.

Nov 28 22:52:33 DEBUG New connection from 127.0.0.1
Nov 28 22:52:33 DEBUG GWT:TSA:C=0,CONNECTED
Nov 28 22:52:33 DEBUG GWT:TSA:C=1,DISCONNECTED
Nov 28 22:53:01 DEBUG TSF:MSG:READ,14-14-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
Nov 28 22:53:01 DEBUG TSF:MSG:PINGED,ID=14,HP=1
Nov 28 22:53:01 DEBUG TSF:MSG:SEND,0-0-14-14,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
Nov 28 22:53:01 DEBUG TSF:MSG:READ,14-14-0,s=255,c=3,t=24,pt=1,l=5,sg=0:1
Nov 28 22:53:01 DEBUG !TSF:MSG:LEN,8!=12
Nov 28 22:53:03 DEBUG TSF:MSG:READ,9-14-0,s=255,c=3,t=24,pt=1,l=1,sg=0:2
Nov 28 22:53:03 DEBUG TSF:MSG:PINGED,ID=9,HP=2
Nov 28 22:53:03 DEBUG !TSF:MSG:SEND,0-0-14-9,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
Nov 28 22:53:05 DEBUG TSF:MSG:READ,9-14-0,s=255,c=0,t=17,pt=0,l=10,sg=0:2.2.0-beta
Nov 28 22:53:05 DEBUG TSF:MSG:READ,9-14-0,s=255,c=3,t=6,pt=1,l=1,sg=0:14
Nov 28 22:53:05 DEBUG TSF:MSG:READ,9-14-0,s=255,c=3,t=6,pt=1,l=1,sg=0:14
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=255,c=3,t=11,pt=0,l=25,sg=0:AIQ Sensor CO2 MH-Z19 and
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=0,c=0,t=22,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=0,c=0,t=150,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=1,c=0,t=22,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=0,c=0,t=22,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=18,c=0,t=24,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=2,c=0,t=24,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=2,c=0,t=24,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=2,c=0,t=24,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=3,c=0,t=24,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=3,c=0,t=24,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=3,c=0,t=24,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=5,c=0,t=24,pt=1,l=0,sg=0:0
Nov 28 22:53:07 DEBUG TSF:MSG:ACK
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=5,c=0,t=24,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=5,c=0,t=24,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=5,c=0,t=24,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-30-0,s=5,c=0,t=24,pt=0,l=0,sg=0:
Nov 28 22:53:07 DEBUG TSF:MSG:READ,9-14-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
Nov 28 22:53:07 DEBUG TSF:MSG:SEND,0-0-14-9,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
Nov 28 22:53:08 DEBUG New connection from 127.0.0.1
Nov 28 22:53:08 DEBUG GWT:TSA:C=1,CONNECTED
Nov 28 22:53:13 DEBUG GWT:TSA:C=0,DISCONNECTED
Nov 28 22:53:13 DEBUG Ethernet client disconnected.

Nov 28 22:53:19 DEBUG TSF:MSG:READ,14-14-0,s=0,c=1,t=37,pt=2,l=2,sg=0:4744
Nov 28 22:53:19 DEBUG TSF:MSG:ACK REQ
Nov 28 22:53:19 DEBUG TSF:MSG:SEND,0-0-14-14,s=0,c=1,t=37,pt=2,l=2,sg=0,ft=0,st=OK:4744
Nov 28 22:53:28 DEBUG TSF:MSG:READ,9-14-0,s=2,c=1,t=37,pt=7,l=5,sg=0:5.0
Nov 28 22:53:28 DEBUG TSF:MSG:READ,9-14-0,s=5,c=1,t=37,pt=7,l=5,sg=0:9.0
Nov 28 22:53:29 DEBUG TSF:MSG:READ,9-14-0,s=4,c=1,t=37,pt=7,l=5,sg=0:2.0
Nov 28 22:53:30 DEBUG TSF:MSG:READ,9-14-0,s=0,c=1,t=37,pt=4,l=4,sg=0:-1
Nov 28 22:53:31 DEBUG TSF:MSG:READ,15-15-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
Nov 28 22:53:31 DEBUG TSF:MSG:PINGED,ID=15,HP=1
Nov 28 22:53:31 DEBUG TSF:MSG:SEND,0-0-15-15,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
Nov 28 22:54:03 DEBUG New connection from 127.0.0.1
Nov 28 22:54:03 DEBUG GWT:TSA:C=0,CONNECTED
Nov 28 22:54:28 DEBUG GWT:TSA:C=1,DISCONNECTED
Nov 28 22:54:28 DEBUG Ethernet client disconnected.
Nov 28 22:54:38 DEBUG New connection from 127.0.0.1
Nov 28 22:54:38 DEBUG GWT:TSA:C=1,CONNECTED
Nov 28 22:54:43 DEBUG GWT:TSA:C=0,DISCONNECTED
Nov 28 22:54:43 DEBUG Ethernet client disconnected.

Nov 28 22:55:00 DEBUG TSF:MSG:READ,15-15-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
Nov 28 22:55:00 DEBUG !TSF:MSG:LEN,0!=8
Nov 28 22:55:02 DEBUG TSF:MSG:READ,9-46-16,s=1,c=3,t=165,pt=7,l=5,sg=0:1107.0
Nov 28 22:55:02 DEBUG TSF:MSG:REL MSG
Nov 28 22:55:02 DEBUG !TSF:RTE:16 UNKNOWN
Nov 28 22:55:02 DEBUG !TSF:MSG:SEND,9-0-16-16,s=1,c=3,t=165,pt=7,l=5,sg=0,ft=0,st=NACK:1107.0
Nov 28 22:55:13 DEBUG New connection from 127.0.0.1
Nov 28 22:55:13 DEBUG GWT:TSA:C=0,CONNECTED
Nov 28 22:55:18 DEBUG GWT:TSA:C=1,DISCONNECTED
Nov 28 22:55:18 DEBUG Ethernet client disconnected.

The server itself says this:

INFO 2018-11-28T21:53:48Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << 0;255;3;0;2;
ERROR 2018-11-28T21:54:01Z: myscontroller_rs::core::connection: Error while reading -- Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }
INFO 2018-11-28T21:54:03Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ...
INFO 2018-11-28T21:54:03Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003
INFO 2018-11-28T21:54:03Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << 0;255;3;0;2;
INFO 2018-11-28T21:54:03Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n"
INFO 2018-11-28T21:54:03Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n"
INFO 2018-11-28T21:54:28Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << 0;255;3;0;2;
ERROR 2018-11-28T21:54:33Z: myscontroller_rs::core::connection: Error while reading -- Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }
INFO 2018-11-28T21:54:38Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ...
INFO 2018-11-28T21:54:38Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003
INFO 2018-11-28T21:54:38Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << 0;255;3;0;2;
INFO 2018-11-28T21:54:38Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n"
INFO 2018-11-28T21:54:38Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n"
INFO 2018-11-28T21:54:43Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << 0;255;3;0;2;
ERROR 2018-11-28T21:55:08Z: myscontroller_rs::core::connection: Error while reading -- Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }
INFO 2018-11-28T21:55:13Z: myscontroller_rs::core::connection: Waiting for server connection -- 0.0.0.0:5003 ...
INFO 2018-11-28T21:55:13Z: myscontroller_rs::core::connection: Connected to -- 0.0.0.0:5003
INFO 2018-11-28T21:55:13Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << 0;255;3;0;2;
INFO 2018-11-28T21:55:13Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;3;0;14;Gateway startup complete.\n"
INFO 2018-11-28T21:55:13Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "0;255;0;0;18;2.3.0\n"
INFO 2018-11-28T21:55:18Z: myscontroller_rs::core::connection: 0.0.0.0:5003 << 0;255;3;0;2;
INFO 2018-11-28T21:55:19Z: myscontroller_rs::core::connection: 0.0.0.0:5003 >> "14;0;1;0;37;643\n"
INFO 2018-11-28T21:55:19Z: myscontroller_rs::wot: Received SetMessage { node_id: 14, child_sensor_id: 0, ack: 0, value: Value { set_type: Level, value: "643" } }
INFO 2018-11-28T21:55:19Z: myscontroller_rs::wot: Notifying property "level" with value Number(643.0)

Data ending up at wrong device?

I just noticed something odd.

In the Mozilla interface, one of the locks on my smart lock got a multi-value option. I noticed that earlier and thought it was weird.

Now I noticed that it is showing the data from my CO2 sensor.

And looking closer:

  • the temperature sensor is now a switch.
  • the humidity sensor is now the temperature sensor

Could it be that everything has 'scooted over' now that the CO2 sensor gives data?

Future wish: change MySensors 'simple security' password through a web interface.

MySensors has a 'simple security' option where the user simply has to set a password in a sketch and in the gateway configure parameters. This makes setting up basic encryption and signing much easier.

While changing the password inside Arduino nodes is easy (just change the password in the code), changing the password used by the gateway software is a bit more difficult.

If MySController would build its own web interface, perhaps it could offer the ability to change the password?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.