mycontroller-org / mycontroller-v1-legacy

The Open Source Controller
http://www.MyController.org
Apache License 2.0
148 stars 90 forks source link

Cannot add nodes via MQTT #429

Closed dakipro closed 6 years ago

dakipro commented 6 years ago

Hi, trying to install the controller but I cannot add the nodes at all. I use openhab and it works fine, but MyController is struggling with nodes discovery/adding. When I add them manually, everything is green and looks fine, but no data is comming. I see that it gets info about the nodes in the log, but throws an exception

2017-12-13 21:24:50,181 ERROR [Thread-6] [org.mycontroller.standalone.message.MessageMonitorThread:119] Throws exception while processing!, [RawMessage(gatewayId=null, data=Refrigerator Monitor, subData=mygateway1-out/43/255/3/0/11, isTxMessage=false, networkType=MY_SENSORS, timestamp=1513196690174)]
java.lang.NullPointerException: null
    at org.mycontroller.standalone.provider.mysensors.MySensorsRawMessage.<init>(MySensorsRawMessage.java:60)
    at org.mycontroller.standalone.provider.mysensors.MySensorsProviderBridge.executeRawMessage(MySensorsProviderBridge.java:58)
    at org.mycontroller.standalone.message.McMessageUtils.sendToProviderBridge(McMessageUtils.java:571)
    at org.mycontroller.standalone.message.MessageMonitorThread.processRawMessage(MessageMonitorThread.java:107)
    at org.mycontroller.standalone.message.MessageMonitorThread.run(MessageMonitorThread.java:182)
    at java.lang.Thread.run(Unknown Source)
2017-12-13 21:24:50,222 ERROR [Thread-6] [org.mycontroller.standalone.message.MessageMonitorThread:119] Throws exception while processing!, [RawMessage(gatewayId=null, data=1.1, subData=mygateway1-out/43/255/3/0/12, isTxMessage=false, networkType=MY_SENSORS, timestamp=1513196690215)]
java.lang.NullPointerException: null
    at org.mycontroller.standalone.provider.mysensors.MySensorsRawMessage.<init>(MySensorsRawMessage.java:60)
    at org.mycontroller.standalone.provider.mysensors.MySensorsProviderBridge.executeRawMessage(MySensorsProviderBridge.java:58)
    at org.mycontroller.standalone.message.McMessageUtils.sendToProviderBridge(McMessageUtils.java:571)
    at org.mycontroller.standalone.message.MessageMonitorThread.processRawMessage(MessageMonitorThread.java:107)
    at org.mycontroller.standalone.message.MessageMonitorThread.run(MessageMonitorThread.java:182)
    at java.lang.Thread.run(Unknown Source)
2017-12-13 21:24:50,222 ERROR [Thread-6] [org.mycontroller.standalone.message.MessageMonitorThread:119] Throws exception while processing!, [RawMessage(gatewayId=null, data=, subData=mygateway1-out/43/0/0/0/6, isTxMessage=false, networkType=MY_SENSORS, timestamp=1513196690215)]
java.lang.NullPointerException: null
    at org.mycontroller.standalone.provider.mysensors.MySensorsRawMessage.<init>(MySensorsRawMessage.java:60)
    at org.mycontroller.standalone.provider.mysensors.MySensorsProviderBridge.executeRawMessage(MySensorsProviderBridge.java:58)
    at org.mycontroller.standalone.message.McMessageUtils.sendToProviderBridge(McMessageUtils.java:571)
    at org.mycontroller.standalone.message.MessageMonitorThread.processRawMessage(MessageMonitorThread.java:107)
    at org.mycontroller.standalone.message.MessageMonitorThread.run(MessageMonitorThread.java:182)
    at java.lang.Thread.run(Unknown Source)
2017-12-13 21:24:50,263 ERROR [Thread-6] [org.mycontroller.standalone.message.MessageMonitorThread:119] Throws exception while processing!, [RawMessage(gatewayId=null, data=, subData=mygateway1-out/43/1/0/0/6, isTxMessage=false, networkType=MY_SENSORS, timestamp=1513196690256)]
java.lang.NullPointerException: null
    at org.mycontroller.standalone.provider.mysensors.MySensorsRawMessage.<init>(MySensorsRawMessage.java:60)
    at org.mycontroller.standalone.provider.mysensors.MySensorsProviderBridge.executeRawMessage(MySensorsProviderBridge.java:58)
    at org.mycontroller.standalone.message.McMessageUtils.sendToProviderBridge(McMessageUtils.java:571)
    at org.mycontroller.standalone.message.MessageMonitorThread.processRawMessage(MessageMonitorThread.java:107)
    at org.mycontroller.standalone.message.MessageMonitorThread.run(MessageMonitorThread.java:182)
    at java.lang.Thread.run(Unknown Source)
jkandasa commented 6 years ago

@dakipro can you list your gateway details?

dakipro commented 6 years ago

Sure, from the Gateway page?

Name MySensors Enabled Enabled Tx message processing delay 0 Milliseconds Type MQTT Network type MySensors Connection details BrokerHost:tcp://192.168.1.30:1883, ClientId:mycontroller-client Status Up Status since a minute ago Status message Connected Successfully

jkandasa commented 6 years ago

@dakipro for some reason. your gateway id not updated in raw message. can you restart mycontroller and try again?

dakipro commented 6 years ago

I tried that, several restarts and update of the node info and other available actions, but there is so many exceptions in the log I do not think anything is helping. It is publishing data to mqtt, so it is connected, but every time some node sends the info to mqtt, exceptions like from the original message appear. I also tried deleting the gateway several times but no luck. Can I manually add gateway and nodes and sensors? I am most curious to test over the air update of nodes. I will try previous version on the weekend. Any other suggestions I can test? Do you need entire log?

jkandasa commented 6 years ago

@dakipro ok, Send the log file(mycontroller.log) to my email address. Let me have look, is there any hint. jkandasa at gmail dot com

dakipro commented 6 years ago

I've sent you log to email. I now downloaded previous version of myController and filled same gateway info, and main node is added automatically, also I did 'discover" and other nodes appeared automatically. So it seems to work in previous version of mycontroller. Hopefully that helps, as mqtt doesn't seem to work in stable version

jkandasa commented 6 years ago

@dakipro Have you tried this in the recent version? 1.1.0?

jkandasa commented 6 years ago

@dakipro I am unable to reproduce this issue in recent version. Kindly check it with the recent version. Re-open if you see this error.