Hello there!
First of all, thanks for this project... I'm still in my first steps but that looks pretty cool: simple, feature full, efficient and tightly bound to MySensors (looks better than most of other gateway I could have tested till now).
I face a problem just after having successfully configured my MySensors serial gateway, when I try to make my first node join: I see two rows whereas I expect only one (only one node is up).
The node is a simple S_BINARY
node, that runs over RFM69HW (moteino, same for gateway).
In addition, mycontroller logs several errors:
2018-06-06T20:51:36.187+0000 [Thread-15] ERROR o.m.s.g.s.SerialDataListenerjSerialComm - Exception,
org.mycontroller.standalone.exceptions.MessageParserException: Unknown message format:[], gatewayId:1
at org.mycontroller.standalone.provider.mysensors.MessageParserAbstract.update(MessageParserAbstract.java:118)
at org.mycontroller.standalone.provider.mysensors.MessageParserSerial.getMessage(MessageParserSerial.java:32)
at org.mycontroller.standalone.provider.mysensors.MessageParserSerial.getMessage(MessageParserSerial.java:28)
at org.mycontroller.standalone.gateway.serial.SerialDataListenerjSerialComm.serialEvent(SerialDriverJSerialComm.java:146)
at com.fazecast.jSerialComm.SerialPort$SerialPortEventListener.waitForSerialEvent(SerialPort.java:937)
at com.fazecast.jSerialComm.SerialPort$SerialPortEventListener$1.run(SerialPort.java:885)
at java.lang.Thread.run(Thread.java:745)
2018-06-06T20:51:36.206+0000 [Thread-15] ERROR o.m.s.db.dao.BaseAbstractDaoImpl - unable to update item:[GatewayTable(id=1, enabled=true, name=MySensors, networkType=MY_SENSORS, timestamp=1528318294769, state=DOWN, statusMessage=ERROR: Unknown message format:[], gatewayId:1, statusSince=1528318296197, type=SERIAL, properties={br=115200, ackEnabled=true, txDelay=0, ackWaitTime=20, failedRetryCount=1, reconnectDelay=120, dr=Auto, pn=/dev/ttyUSB0})]
java.sql.SQLException: Unable to run update stmt on object GatewayTable(id=1, enabled=true, name=MySensors, networkType=MY_SENSORS, timestamp=1528318294769, state=DOWN, statusMessage=ERROR: Unknown message format:[], gatewayId:1, statusSince=1528318296197, type=SERIAL, properties={br=115200, ackEnabled=true, txDelay=0, ackWaitTime=20, failedRetryCount=1, reconnectDelay=120, dr=Auto, pn=/dev/ttyUSB0}): UPDATE "gateway" SET "enabled" = ?, "name" = ?, "networkType" = ?, "timestamp" = ?, "state" = ?, "statusMessage" = ?, "statusSince" = ?, "type" = ?, "properties" = ? WHERE "id" = ?
at com.j256.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:25)
at com.j256.ormlite.stmt.mapped.MappedUpdate.update(MappedUpdate.java:129)
at com.j256.ormlite.stmt.StatementExecutor.update(StatementExecutor.java:472)
at com.j256.ormlite.dao.BaseDaoImpl.update(BaseDaoImpl.java:409)
at org.mycontroller.standalone.db.dao.BaseAbstractDaoImpl.update(BaseAbstractDaoImpl.java:276)
at org.mycontroller.standalone.gateway.config.GatewayConfig.setStatus(GatewayConfig.java:109)
at org.mycontroller.standalone.gateway.serial.SerialDataListenerjSerialComm.serialEvent(SerialDriverJSerialComm.java:179)
at com.fazecast.jSerialComm.SerialPort$SerialPortEventListener.waitForSerialEvent(SerialPort.java:937)
at com.fazecast.jSerialComm.SerialPort$SerialPortEventListener$1.run(SerialPort.java:885)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2458)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2158)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:291)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:432)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:358)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:171)
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:138)
at com.j256.ormlite.jdbc.JdbcDatabaseConnection.update(JdbcDatabaseConnection.java:289)
at com.j256.ormlite.jdbc.JdbcDatabaseConnection.update(JdbcDatabaseConnection.java:212)
at com.j256.ormlite.stmt.mapped.MappedUpdate.update(MappedUpdate.java:101)
... 8 common frames omitted
2018-06-06T20:51:36.210+0000 [Thread-15] ERROR o.m.s.g.s.SerialDataListenerjSerialComm - Exception,
org.mycontroller.standalone.exceptions.MessageParserException: Unknown message format:[], gatewayId:1
at org.mycontroller.standalone.provider.mysensors.MessageParserAbstract.update(MessageParserAbstract.java:118)
at org.mycontroller.standalone.provider.mysensors.MessageParserSerial.getMessage(MessageParserSerial.java:32)
at org.mycontroller.standalone.provider.mysensors.MessageParserSerial.getMessage(MessageParserSerial.java:28)
at org.mycontroller.standalone.gateway.serial.SerialDataListenerjSerialComm.serialEvent(SerialDriverJSerialComm.java:146)
at com.fazecast.jSerialComm.SerialPort$SerialPortEventListener.waitForSerialEvent(SerialPort.java:937)
at com.fazecast.jSerialComm.SerialPort$SerialPortEventListener$1.run(SerialPort.java:885)
at java.lang.Thread.run(Thread.java:745)
2018-06-06T20:51:52.572+0000 [mc-th-pool-0] INFO o.m.s.provider.EngineAbstract - Seems like failed to send this message. There is no ACK received! Retried 1 time(s). MessageImpl(gatewayId=1, nodeEui=1, sensorId=SENSOR_BC, type=Internal, subType=Config, ack=1, payload=M, isTxMessage=true, timestamp=1528318312029, properties=null)
It looks like I receive weird payloads:
Unknown message format:[^@]
or even
java.lang.NumberFormatException: For input string: "^@^@0"
Do you have any idea?
Cheers,
Nicolas