proditaki / OTGW-Domoticz-MQTT-Client

MQTT Client for OTGW project https://github.com/rvdbreemen/OTGW-firmware
3 stars 1 forks source link

No devices are created in domoticz #8

Open etmmvdp opened 1 year ago

etmmvdp commented 1 year ago

Hello,

I have your plugin running in domoticz Version: 2022.1 with OTMonitor version 6.4 and gateway firmware, version 4.3. Otmonitor runs on a raspberry pi connected with the classic otmonitor hardware.

The plugin is running ok, ie it is receiving messages over mqtt from otmonitor. See below for some debug logging I added to plugin.py. My question is what I need to do to allow the pluging to create devices. When I allow hardware detecting in domotizc nothing happens. I believe the plugin expects mqtt events with the word "config" in its topic with a payload describing the device to add. Could you help me to run this and provide me an example debug trace of these config events?

Thanks, Martin

... 2023-01-27 14:08:29.924 OTGW: Received 53 bytes of data 2023-01-27 14:08:29.924 OTGW: onMessage Name: '192.168.1.3', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.1.3', Port: '1883', Baud: -1, Timeout: 0, Bytes: 709007, Connected: True, Last Seen: 2023-01-27 14:08:29, Parent: 'None' {'Verb': 'PUBLISH', 'DUP': False, 'QoS': 0, 'Retain': False, 'Topic': 'events/central_heating/otmonitor/Message', 'Payload': b'BE01C0000'} 2023-01-27 14:08:29.924 OTGW: onMQTTPublish 2023-01-27 14:08:29.924 OTGW: onMQTTPublish events/central_heating/otmonitor/Message BE01C0000 2023-01-27 14:08:29.925 OTGW: no config in topic 2023-01-27 14:08:29.925 OTGW: onPublish: BE01C0000 2023-01-27 14:08:29.925 OTGW: onMessage Name: '192.168.1.3', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.1.3', Port: '1883', Baud: -1, Timeout: 0, Bytes: 709007, Connected: True, Last Seen: 2023-01-27 14:08:29, Parent: 'None' {'Verb': 'PUBLISH', 'DUP': False, 'QoS': 0, 'Retain': False, 'Topic': 'events/central_heating/otmonitor/Message', 'Payload': b'AC0090F00'} 2023-01-27 14:08:29.926 OTGW: onMQTTPublish 2023-01-27 14:08:29.926 OTGW: onMQTTPublish events/central_heating/otmonitor/Message AC0090F00 2023-01-27 14:08:29.926 OTGW: no config in topic 2023-01-27 14:08:29.926 OTGW: onPublish: AC0090F00 2023-01-27 14:08:30.778 OTGW: Received 53 bytes of data 2023-01-27 14:08:30.779 OTGW: onMessage Name: '192.168.1.3', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.1.3', Port: '1883', Baud: -1, Timeout: 0, Bytes: 709060, Connected: True, Last Seen: 2023-01-27 14:08:30, Parent: 'None' {'Verb': 'PUBLISH', 'DUP': False, 'QoS': 0, 'Retain': False, 'Topic': 'events/central_heating/otmonitor/Message', 'Payload': b'T00630000'} 2023-01-27 14:08:30.779 OTGW: onMQTTPublish 2023-01-27 14:08:30.779 OTGW: onMQTTPublish events/central_heating/otmonitor/Message T00630000 2023-01-27 14:08:30.780 OTGW: no config in topic 2023-01-27 14:08:30.780 OTGW: onPublish: T00630000 2023-01-27 14:08:30.880 OTGW: Received 53 bytes of data 2023-01-27 14:08:30.881 OTGW: onMessage Name: '192.168.1.3', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.1.3', Port: '1883', Baud: -1, Timeout: 0, Bytes: 709113, Connected: True, Last Seen: 2023-01-27 14:08:30, Parent: 'None' {'Verb': 'PUBLISH', 'DUP': False, 'QoS': 0, 'Retain': False, 'Topic': 'events/central_heating/otmonitor/Message', 'Payload': b'R801C0000'} 2023-01-27 14:08:30.881 OTGW: onMQTTPublish 2023-01-27 14:08:30.881 OTGW: onMQTTPublish events/central_heating/otmonitor/Message R801C0000 2023-01-27 14:08:30.881 OTGW: no config in topic 2023-01-27 14:08:30.881 OTGW: onPublish: R801C0000 2023-01-27 14:08:30.932 OTGW: Received 53 bytes of data 2023-01-27 14:08:30.932 OTGW: Received 53 bytes of data 2023-01-27 14:08:30.933 OTGW: onMessage Name: '192.168.1.3', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.1.3', Port: '1883', Baud: -1, Timeout: 0, Bytes: 709219, Connected: True, Last Seen: 2023-01-27 14:08:30, Parent: 'None' {'Verb': 'PUBLISH', 'DUP': False, 'QoS': 0, 'Retain': False, 'Topic': 'events/central_heating/otmonitor/Message', 'Payload': b'BE01C0000'} 2023-01-27 14:08:30.933 OTGW: onMQTTPublish 2023-01-27 14:08:30.933 OTGW: onMQTTPublish events/central_heating/otmonitor/Message BE01C0000 2023-01-27 14:08:30.933 OTGW: no config in topic 2023-01-27 14:08:30.933 OTGW: onPublish: BE01C0000 2023-01-27 14:08:30.934 OTGW: onMessage Name: '192.168.1.3', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.1.3', Port: '1883', Baud: -1, Timeout: 0, Bytes: 709219, Connected: True, Last Seen: 2023-01-27 14:08:30, Parent: 'None' {'Verb': 'PUBLISH', 'DUP': False, 'QoS': 0, 'Retain': False, 'Topic': 'events/central_heating/otmonitor/Message', 'Payload': b'AF0630000'} 2023-01-27 14:08:30.934 OTGW: onMQTTPublish 2023-01-27 14:08:30.934 OTGW: onMQTTPublish events/central_heating/otmonitor/Message AF0630000 2023-01-27 14:08:30.934 OTGW: no config in topic 2023-01-27 14:08:30.934 OTGW: onPublish: AF0630000 2023-01-27 14:08:31.085 OTGW: onHeartbeat 2023-01-27 14:08:31.085 OTGW: MqttClient::ping 2023-01-27 14:08:31.085 OTGW: Sending 2 bytes of data 2023-01-27 14:08:31.136 OTGW: Received 2 bytes of data 2023-01-27 14:08:31.136 OTGW: onMessage Name: '192.168.1.3', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.1.3', Port: '1883', Baud: -1, Timeout: 0, Bytes: 709223, Connected: True, Last Seen: 2023-01-27 14:08:31, Parent: 'None' {'Verb': 'PINGRESP'} 2023-01-27 14:08:32.794 OTGW: Received 53 bytes of data 2023-01-27 14:08:32.795 OTGW: onMessage Name: '192.168.1.3', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.1.3', Port: '1883', Baud: -1, Timeout: 0, Bytes: 709382, Connected: True, Last Seen: 2023-01-27 14:08:32, Parent: 'None' {'Verb': 'PUBLISH', 'DUP': False, 'QoS': 0, 'Retain': False, 'Topic': 'events/central_heating/otmonitor/Message', 'Payload': b'T00000000'} 2023-01-27 14:08:32.795 OTGW: onMQTTPublish 2023-01-27 14:08:32.795 OTGW: onMQTTPublish events/central_heating/otmonitor/Message T00000000 2023-01-27 14:08:32.796 OTGW: no config in topic 2023-01-27 14:08:32.796 OTGW: onPublish: T00000000 2023-01-27 14:08:32.946 OTGW: Received 53 bytes of data 2023-01-27 14:08:32.947 OTGW: onMessage Name: '192.168.1.3', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.1.3', Port: '1883', Baud: -1, Timeout: 0, Bytes: 709435, Connected: True, Last Seen: 2023-01-27 14:08:32, Parent: 'None' {'Verb': 'PUBLISH', 'DUP': False, 'QoS': 0, 'Retain': False, 'Topic': 'events/central_heating/otmonitor/Message', 'Payload': b'BC0000000'} 2023-01-27 14:08:32.947 OTGW: onMQTTPublish 2023-01-27 14:08:32.947 OTGW: onMQTTPublish events/central_heating/otmonitor/Message BC0000000 2023-01-27 14:08:32.947 OTGW: no config in topic 2023-01-27 14:08:32.947 OTGW: onPublish: BC0000000 2023-01-27 14:08:33.800 OTGW: Received 53 bytes of data 2023-01-27 14:08:33.801 OTGW: onMessage Name: '192.168.1.3', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.1.3', Port: '1883', Baud: -1, Timeout: 0, Bytes: 709488, Connected: True, Last Seen: 2023-01-27 14:08:33, Parent: 'None' {'Verb': 'PUBLISH', 'DUP': False, 'QoS': 0, 'Retain': False, 'Topic': 'events/central_heating/otmonitor/Message', 'Payload': b'T90014099'} 2023-01-27 14:08:33.803 OTGW: onMQTTPublish 2023-01-27 14:08:33.803 OTGW: onMQTTPublish events/central_heating/otmonitor/Message T90014099 2023-01-27 14:08:33.803 OTGW: no config in topic 2023-01-27 14:08:33.803 OTGW: onPublish: T90014099 2023-01-27 14:08:33.954 OTGW: Received 53 bytes of data 2023-01-27 14:08:33.954 OTGW: onMessage Name: '192.168.1.3', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.1.3', Port: '1883', Baud: -1, Timeout: 0, Bytes: 709541, Connected: True, Last Seen: 2023-01-27 14:08:33, Parent: 'None' {'Verb': 'PUBLISH', 'DUP': False, 'QoS': 0, 'Retain': False, 'Topic': 'events/central_heating/otmonitor/Message', 'Payload': b'B50014099'} 2023-01-27 14:08:33.955 OTGW: onMQTTPublish 2023-01-27 14:08:33.955 OTGW: onMQTTPublish events/central_heating/otmonitor/Message B50014099 2023-01-27 14:08:33.955 OTGW: no config in topic 2023-01-27 14:08:33.955 OTGW: onPublish: B50014099 2023-01-27 14:08:35.007 OTGW: Received 59 bytes of data 2023-01-27 14:08:35.007 OTGW: onMessage Name: '192.168.1.3', Transport: 'TCP/IP', Protocol: 'MQTT', Address: '192.168.1.3', Port: '1883', Baud: -1, Timeout: 0, Bytes: 709600, Connected: True, Last Seen: 2023-01-27 14:08:34, Parent: 'None' {'Verb': 'PUBLISH', 'DUP': False, 'QoS': 0, 'Retain': False, 'Topic': 'events/central_heating/otmonitor/outsidetemperature', 'Payload': b'5.06'} 2023-01-27 14:08:35.007 OTGW: onMQTTPublish 2023-01-27 14:08:35.007 OTGW: onMQTTPublish events/central_heating/otmonitor/outsidetemperature 5.06 ...

etmmvdp commented 1 year ago

Here is a screenshot of the hardware configuration. I added a config item to specify the debug log level and I added debug logging to most methods.

image