[SOLVED] OH not communicating with MySensors PI gateway


I am using rfm69 with rpi 3 gateway.
The MySensors gateway configuration is all good, it is receiving and sending messages, I can see them in the log.
I am able to add the gateway to OH. gateway comes online. Successfully connected to MySensors Bridge.

But for some reason OH is not receiving any messages although the MySensor gateway is…
Any ideas?

Did you add things? Did you do a things search?
What do the log say?

Yes things were added.
I did a thing search but no result.
I added the things manually, here is my conf file:

Bridge mysensors:bridge-ser:gateway [ serialPort="/dev/ttyAMA0", sendDelay=50, startupCheckEnabled=false, baudRate=115200] {
door door02 [ nodeId=20, childId=3 ]

log results when added the node:

[hingStatusInfoChangedEvent] - ‘mysensors:door:gateway:door02’ changed from UNINITIALIZED to INITIALIZING

==> /var/log/openhab2/openhab.log <==

[DEBUG] [ensors.handler.MySensorsThingHandler] - Configuration: MySensorsSensorConfiguration{nodeId=20, childId=3, requestAck=false, revertState=true, smartSleep=false, childUpdateTimeout=-1, nodeUpdateTimeout=-1, requestHeartbeatResponse=false, usePureWhiteLightInRGBW=false}

[DEBUG] [rs.internal.gateway.MySensorsGateway] - Adding device MySensorsNode [nodeId=20, childNumber=1, chidldList={3=MySensorsChild [childId=3, nodeValue={V_VAR4=MySensorsVariableVVar4 [value=null], V_TRIPPED=MySensorsVariableVTripped [value=null], V_VAR1=MySensorsVariableVVar1 [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_ARMED=MySensorsVariableVArmed [value=null], V_VAR5=MySensorsVariableVVar5 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null]}]}]

[DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 20-3 not registered yet, registering…

==> /var/log/openhab2/events.log <==

2019-09-09 19:56:56.797 [hingStatusInfoChangedEvent] - ‘mysensors:door:gateway:door02’ changed from INITIALIZING to ONLINE

The door switch also carries nodeID 20 and childID 3.
no message coming in…

I am still stuck on this matter, Please community help!

Did you associate an item with the thing?
Does the debug console show any incoming MySensors messages?

Yes I have setup and linked items, no messages are coming in the openHAB logs, but they are in the Mysensor pty console log.

Try to connect with minicom to the serial port and check if there are messages incoming. In the console enter something like
minicom -b 115200 - D /dev/ttyAMA0

No messages are coming on ttyAMA0.

But when I do minicom -b 115200 - D /dev/ttyMySensorsGateway there are messages incoming.

here is the conf that I used for MySensors
./configure --my-transport=rfm69 --my-rfm69-frequency=868 --my-gateway=serial --my-serial-port=/dev/ttyMySensorsGateway --my-serial-baudrate=115200 --my-serial-is-pty --my-serial-groupname=tty

in mySensor config, if I change the port from ttyMySensorsGateway to ttyAMA0, I get /dev/ttyAMA0 no such port in OH, after three reboots of the pi no more error, OH is getting the messages.
But only the first three first messages then nothing…

Openhab does not recognize this port as a serial port.
Look at this page: https://www.openhab.org/docs/installation/linux.html#privileges-for-common-peripherals

Especially the part about the Java Extra Options. That’s what you need to add.

When you are using the openHABian image, this can be done in the openhabian-config menus.
To clear this issue, my problem was the following, I was not configuring MySensors correctly.
The params --my-serial-port=/dev/ttyAMA0 --my-serial-is-pty --my-serial-groupname=tty must be passed along the other basic ones. if one is missing then it wont working if RPI is the gateway and the OH controler.
Also for communication stability, it is better to have identical MySensors versions on both the gateway and the sensor. I am running v2.3.1 on both.

Now everything is working properly for me.
Thank you for help Timo. Your post with the minicom idea helped me out a lot.