ridiekel / jeletask

An open source java API for Teletask domotics (https://www.teletask.be/).
https://github.com/ridiekel/jeletask
GNU General Public License v3.0
5 stars 4 forks source link

HA Autodiscovery stopped working #28

Open VNDCK opened 2 years ago

VNDCK commented 2 years ago

Hi Guy's! First of all a BIG thank you to Ridiekel & SanderM2 for making this happen. I Have this fully integrated in my HA setup and everything is (was :p) working just fine! Never touched the native old/ugly/slow Teletask App again, just GREAT.

However, since a few days my setup stopped working and I'm not sure why. I've updated to the lastest version (of HA, Jeletask, Mosquitto) but this maded things worse. After restarting HA, it detects a new MQTT devices (my MQTT Broker), but after adding it, it doesn't detect any devices. My knowledge is to limited to see if this is an Mosquitto, HA or Jeletask issue?

sudo docker run --name jeletaskMQTT \ -v "/setup/teletask/config.json:/teletask2mqtt/config.json" \ -e TELETASK_HOST="192.168.1.100" \ -e TELETASK_PORT="55957" \ -e TELETASK_ID="TELETASK" \ -e TELETASK_MQTT_HOST="192.168.1.99" \ -e TELETASK_MQTT_USERNAME="mqtt" \ -e TELETASK_MQTT_PASSWORD="xxxx" \ --restart=always \ ridiekel/jeletask2mqtt:latest-native

mqtt: broker: 192.168.1.99 username: mqtt password: xxx port: 1883

{ "type": "MICROS_PLUS", "componentsTypes": { "RELAY": [ { "number": 1, "description": "Inkomhal, Spots" } ] } }

logs.txt

thank you for thinking along!


EDIT: I've changed my docker run command, to included the advanced logging. However, it seems that I get less logging?

sudo docker run --name jeletaskMQTT \ -v "/setup/teletask/config.json:/teletask2mqtt/config.json" \ -e TELETASK_HOST="192.168.1.100" \ -e TELETASK_PORT="55957" \ -e TELETASK_ID="TELETASK" \ -e TELETASK_MQTT_HOST="192.168.1.99" \ -e TELETASK_MQTT_USERNAME="mqtt" \ -e TELETASK_MQTT_PASSWORD="xxx" \ -e TELETASK_LOG_HACONFIG_ENABLED="true" \ -e TELETASK_LOG_TOPIC_ENABLED="true" \ --restart=always \ ridiekel/jeletask2mqtt:latest-native

08:23:34.910 [main] INFO io.github.ridiekel.jeletask.mqtt.Teletask2MqttNative - Starting in native mode 2022-10-31 08:23:34.916 - INFO - o.s.nativex.NativeListener : AOT mode enabled

08:29:28.086 [main] INFO io.github.ridiekel.jeletask.mqtt.Teletask2MqttNative - Starting in native mode
2022-10-31 08:29:28.092 - INFO - o.s.nativex.NativeListener               : AOT mode enabled
2022-10-31 08:29:30.237 -ERROR - i.g.r.j.c.b.m.executor.MessageExecutor   : Problem running message: {}
io.github.ridiekel.jeletask.client.TeletaskClientImpl$CommunicationException: Problem sending message to teletask central unit
    at io.github.ridiekel.jeletask.client.TeletaskClientImpl.send(TeletaskClientImpl.java:241) ~[na:na]
    at io.github.ridiekel.jeletask.client.builder.message.messages.MessageSupport.execute(MessageSupport.java:54) ~[io.github.ridiekel.jeletask.mqtt.Teletask2MqttNative:4.1.1]
    at io.github.ridiekel.jeletask.client.builder.message.executor.MessageExecutor.run(MessageExecutor.java:22) ~[na:na]
    at io.github.ridiekel.jeletask.client.builder.composer.microsplus.MicrosPlusMessageHandler$MicrosPlusGroupGetStrategy.execute(MicrosPlusMessageHandler.java:137) ~[na:na]
    at io.github.ridiekel.jeletask.client.TeletaskClientImpl$GroupGetTask.lambda$run$0(TeletaskClientImpl.java:545) ~[na:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[io.github.ridiekel.jeletask.mqtt.Teletask2MqttNative:na]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
    at java.lang.Thread.run(Thread.java:833) ~[io.github.ridiekel.jeletask.mqtt.Teletask2MqttNative:na]
    at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:705) ~[io.github.ridiekel.jeletask.mqtt.Teletask2MqttNative:na]
    at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:202) ~[na:na]
Caused by: java.net.SocketException: Connection reset by peer
    at sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:420) ~[na:na]
    at sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:440) ~[na:na]
    at sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:826) ~[na:na]
    at java.net.Socket$SocketOutputStream.write(Socket.java:1035) ~[na:na]
    at java.io.OutputStream.write(OutputStream.java:127) ~[io.github.ridiekel.jeletask.mqtt.Teletask2MqttNative:na]
    at io.github.ridiekel.jeletask.client.builder.message.MessageUtilities.send(MessageUtilities.java:101) ~[na:na]
    at io.github.ridiekel.jeletask.client.TeletaskClientImpl.send(TeletaskClientImpl.java:239) ~[na:na]
    ... 9 common frames omitted
2022-10-31 08:29:30.238 -ERROR - i.g.r.j.c.b.m.executor.MessageExecutor   : Problem running message: {}
VNDCK commented 2 years ago

Hi Guy's! Some more information.

So, i'm now up-and-running on version 3.3.6. Is my workflow wrong?

EDIT: Ok, sorry - got it working with 4.1.1. When changing "config.json", I need to follow these steps to have it work consistently.

Thx!

ridiekel commented 2 years ago

Glad you got it working.

Can I close this isse?

VNDCK commented 2 years ago

Glad you got it working.

Can I close this isse?

Yes, you can close the issue - I got it fixed. But there does seem to be some extra problems after 3.6 (going to 4.x). I get a lot of errors within Jeletask, but also in Prosoft (regarding connections).

-- EDIT

Sadly, problem is back. I Keep getting the following error in Prosoft, but of course my license is correct. I'm not sure if this is expected?

20:19:07    INFO;GUI Connection  removed from connection list, number of connections remaining = 3
20:19:08    INFO;No license available for connection 192.168.1.99/192.168.1.99
20:19:08    INFO;GUI Connection  removed from connection list, number of connections remaining = 3
20:19:09    INFO;No license available for connection 192.168.1.99/192.168.1.99
20:19:09    INFO;GUI Connection  removed from connection list, number of connections remaining = 3
20:19:10    INFO;No license available for connection 192.168.1.99/192.168.1.99
20:19:10    INFO;GUI Connection  removed from connection list, number of connections remaining = 3
20:19:11    INFO;No license available for connection 192.168.1.99/192.168.1.99
20:19:11    INFO;GUI Connection  removed from connection list, number of connections remaining = 3
20:19:12    INFO;No license available for connection 192.168.1.99/192.168.1.99
20:19:12    INFO;GUI Connection  removed from connection list, number of connections remaining = 3
20:19:13    INFO;No license available for connection 192.168.1.99/192.168.1.99
20:19:13    INFO;GUI Connection  removed from connection list, number of connections remaining = 3

You can close this issue. Something is up with > 3.6, but I think I know how to do the workaround.