[SOLVED] OH2 - Mosquito - Raspi Mysensors Gateway
-
Hello!
While i'm waiting for my hardware (ordered a couple Sensebender Micro) i tried to set up Controller and Gateway.
I followed the instructions from here here and configured with./configure --my-gateway=mqtt --my-controller-ip-address=192.168.178.160 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1
But the Gateway doesn't connect to the controller:
pi@raspgateway:~/MySensors $ sudo mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1 mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: Listening for connections on 0.0.0.0:5003 mysgw: MCO:BGN:STP mysgw: MCO:BGN:INIT OK,TSP=1 ...
Then nothing more follows...
On openhabian (Raspberry) i installed the MQTT Binding (via OH2 paperUI) and Mosquitto (via openhabian config tool).
What am i missing?Thanks in advance!
Narf!
-
anybody?
-
@narf said in OH2 - Mosquito - Raspi Mysensors Gateway:
mysgw: Listening for connections on 0.0.0.0:5003
That doesn't seem to be right...
It seems it switches to listening (server) mode, while you are trying to configure an mqtt client connection. Myabe @marceloaqno has a clue?
-
Did you try to recompile the gateway?
-
no - but i can try!
i'll just have to runmake
and
sudo make install
again, right?
-
recompiling did the trick:
pi@raspgateway:~/MySensors $ sudo ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1 mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: MCO:BGN:STP mysgw: MCO:BGN:INIT OK,TSP=1 mysgw: Attempting MQTT connection... mysgw: connected to 192.168.178.160 mysgw: MQTT connected mysgw: Sending message on topic: mysensors-out/0/255/0/0/18
-
You probably compiled it before setting some parameters and with last build they were used. I'm glad you solved it.
-
i'm a simple man, i do what the tutorials says
Thank you very much!
-
alright! today (finally!) i got my sensebender micro. they should send something right away, right?
so i plugged one in and got this on the gateway:pi@raspgateway:~/MySensors $ sudo ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1 mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: MCO:BGN:STP mysgw: MCO:BGN:INIT OK,TSP=1 mysgw: Attempting MQTT connection... mysgw: connected to 192.168.178.183 mysgw: MQTT connected mysgw: Sending message on topic: mysensors-out/0/255/0/0/18 mysgw: TSF:MSG:READ,255-255-255,s=255,c=7,t=255,pt=7,l=25,sg=1: 0 mysgw: !TSF:MSG:LEN,7!=32 mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0: mysgw: Sending message on topic: mysensors-out/255/255/3/0/3 mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0: mysgw: !TSF:MSG:LEN,0!=7 mysgw: TSF:MSG:READ,255-255-255,s=255,c=7,t=255,pt=7,l=25,sg=1: 0 mysgw: !TSF:MSG:LEN,7!=32
does this mean anything? i don't get it at all...
-
Something is not quite right... See parsed log.
Message length seems to be a bit off and command type=7 ?? Doesn't make any sense.
-
what's next? i tried to upload the sensebender micro sketch (couldn't find it in the lib) but had several errors. couldn't find a beginner-beginner tutorial on how to upload a first sketch.
Generally this output points to an error with gateway or with sensor?
-
You must add the micro to your board manager first. Instructions here:
https://github.com/mysensors/ArduinoBoardsThe Sensebender Micro sketch is available here:
https://github.com/mysensors/SensebenderMicro/tree/master/Arduino/SensebenderMicroDid you decoupling capacitor on gateway? Do you have more radios to test with in the case one is broken?
-
i found the board but i don't get how to load the sketch ON the board
first thought was to c&p the code from https://github.com/mysensors/SensebenderMicro/tree/master/Arduino/SensebenderMicrofatal error: SI7021.h: No such file or directory
second thought was to look for an example sketch. no luck.
i have other radios. but i'd really love to upload the (right) sketch first... just... how?
@hek said in [SOLVED] OH2 - Mosquito - Raspi Mysensors Gateway:
Did you decoupling capacitor on gateway? Do you have more radios to test with in the case one is broken?
did i what exactly?
all i can say that i wired the gateway with one of the specified NRF24L01+ Radios.
Same radio on sensebender.
-
you need to install library for SI7021
-
@gohan said in [SOLVED] OH2 - Mosquito - Raspi Mysensors Gateway:
you need to install library for SI7021
took libraries from here: https://github.com/mysensors/MySensorsArduinoExamples
will investigate further.i think i got the sensor up and running and it can't find a gateway?
-
In Arduino ide open library manager and search for that library or manually download it and choose to install new library as zip file.
For debug you posted it looks the node it is missing the node ID
-
ok, thought this would be auto assigned: "Define a static node address, remove if you want auto address assignment"
new debug: everything ok with this sensor?
debugNext Stop Gateway? Should i just try another radio?
-
Auto assign works if everything else is working and you have a controller that is able to assign node id.
Now it seems there is no communication with gateway: do you also have a log for the gateway? Did you put capacitors on the vcc/gnd on both gateway and node? Keep in mind that RPI is not very suited to power the nrf24 radio.
-
the gateway "log" is some posts above.
pi@raspgateway:~/MySensors $ sudo ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1 mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: MCO:BGN:STP mysgw: MCO:BGN:INIT OK,TSP=1 mysgw: Attempting MQTT connection... mysgw: connected to 192.168.178.183 mysgw: MQTT connected mysgw: Sending message on topic: mysensors-out/0/255/0/0/18 mysgw: TSF:MSG:READ,255-255-255,s=255,c=7,t=255,pt=7,l=25,sg=1: 0 mysgw: !TSF:MSG:LEN,7!=32 mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0: mysgw: Sending message on topic: mysensors-out/255/255/3/0/3 mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0: mysgw: !TSF:MSG:LEN,0!=7 mysgw: TSF:MSG:READ,255-255-255,s=255,c=7,t=255,pt=7,l=25,sg=1: 0
should i provide another log?
i didn't use any capacitors, neither gateway, nor node.
here isn't anything regarding capacitors.
and [here](lhttps://www.mysensors.org/build/raspberry under section "NRF24L01+ Radio" it only says "If you are using the nrf24 PA/LNA version you need to use a 5V->3.3V regulator.", but i'm using these so i thought it's ok without using regulators.
or is a regulator something different than a capacitor?
-
Voltage regulator is OK but you need a capacitor 4.7uF or bigger on vcc/gnd of radio module. Those modules are probably the same as I bought 4 months ago and they are cheap clones and don't have good range but they work with the proper capacitor.
-
okay
i'll take a look around, hopefully i can get a few somewhere.
does the log indicate that there's a problem with radio? (length?)
-
I bought the adapters for nrf24 on gearbest, they have ams1117 regulator and capacitor. Very easy to use.