Python Plugin: MqttMapper
Moderator: leecollings
-
- Posts: 163
- Joined: Friday 12 January 2018 8:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: MqttMapper
I restarted a few times and its now showing the right values.
I added a second value, and again no value ....
{
"T_Living": {
"topic": "ebusd/ctlv2",
"key": "ebusd/ctlv2/z1RoomTemp",
"type": "80", "subtype": "5", "switchtype": "0" ,
"mapping": {"item": "", "multiplier": 0.1}
},
"T_Outside": {
"topic": "ëbusd/ctlv2",
"key": "ëbusd/ctlv2/DisplayedOutsideTemp",
"type": "80", "subtype": "5", "switchtype": "0" ,
"mapping": {"item": "", "multiplier": 0.1}
}
}
Added a bit of logging after I update the file:
2024-02-23 12:16:30.417 MQTT Mapper: 'HomeFolder':'/home/hjz/domoticz/plugins/MqttMapper/'
2024-02-23 12:16:30.417 MQTT Mapper: 'StartupFolder':'/home/hjz/domoticz/'
2024-02-23 12:16:30.417 MQTT Mapper: 'UserDataFolder':'/home/hjz/domoticz/'
2024-02-23 12:16:30.417 MQTT Mapper: 'Database':'/home/hjz/domoticz/domoticz.db'
2024-02-23 12:16:30.417 MQTT Mapper: 'Language':'en'
2024-02-23 12:16:30.417 MQTT Mapper: 'Version':'1.0.19'
2024-02-23 12:16:30.417 MQTT Mapper: 'Author':'Flying Domotic'
2024-02-23 12:16:30.417 MQTT Mapper: 'Name':'MQTT Mapper'
2024-02-23 12:16:30.417 MQTT Mapper: 'Address':'192.168.2.71'
2024-02-23 12:16:30.417 MQTT Mapper: 'Port':'1883'
2024-02-23 12:16:30.417 MQTT Mapper: 'Key':'MqttMapper'
2024-02-23 12:16:30.417 MQTT Mapper: 'Mode1':'MqttMapper.json'
2024-02-23 12:16:30.417 MQTT Mapper: 'Mode6':'Normal'
2024-02-23 12:16:30.417 MQTT Mapper: 'DomoticzVersion':'2024.4 (build 15910)'
2024-02-23 12:16:30.417 MQTT Mapper: 'DomoticzHash':'0f2fcff99'
2024-02-23 12:16:30.417 MQTT Mapper: 'DomoticzBuildTime':'2024-02-10 12:56:24'
2024-02-23 12:16:30.417 MQTT Mapper: Device count: 2
2024-02-23 12:16:30.417 MQTT Mapper: Device: 1 - ID: 1234, Name: 'MQTT Mapper - T_Living', nValue: 0, sValue: '19.6625'
2024-02-23 12:16:30.417 MQTT Mapper: Device: 2 - ID: 1235, Name: 'MQTT Mapper - T_Outside', nValue: 0, sValue: ''
2024-02-23 12:16:30.417 MQTT Mapper: Debug logging mask set to: PYTHON PLUGIN
2024-02-23 12:16:30.417 MQTT Mapper: Updating device T_Living
2024-02-23 12:16:30.418 MQTT Mapper: Updating device T_Outside
2024-02-23 12:16:30.420 MQTT Mapper: MqttClient::__init__
2024-02-23 12:16:30.420 MQTT Mapper: MqttClient::Open
2024-02-23 12:16:30.420 MQTT Mapper: Heartbeat interval set to: 60.
2024-02-23 12:16:30.470 MQTT Mapper: MqttClient::onConnect
2024-02-23 12:16:30.470 MQTT Mapper: Successful connect to: 192.168.2.71:1883
2024-02-23 12:16:30.470 MQTT Mapper: MqttClient::Connect
2024-02-23 12:16:30.470 MQTT Mapper: MQTT CONNECT ID: 'Domoticz_MqttMapper_31_1708686990'
2024-02-23 12:16:30.520 MQTT Mapper: onMQTTConnected
2024-02-23 12:16:30.521 MQTT Mapper: getTopics: '{'ebusd/ctlv2', 'ëbusd/ctlv2'}'
2024-02-23 12:16:30.521 MQTT Mapper: MqttClient::Subscribe
2024-02-23 12:16:30.571 MQTT Mapper: onMQTTSubscribed
2024-02-23 12:16:30.237 Status: MQTT Mapper: Stop directive received.
2024-02-23 12:16:30.243 Status: MQTT Mapper: Exiting work loop.
2024-02-23 12:16:30.337 Status: MQTT Mapper: Stopping threads.
2024-02-23 12:16:30.337 Status: MQTT Mapper: Stopped.
2024-02-23 12:16:30.338 Status: MQTT Mapper: Started.
2024-02-23 12:16:30.338 Status: MQTT Mapper: Entering work loop.
2024-02-23 12:16:30.416 Status: MQTT Mapper: Initialized version 1.0.19, author 'Flying Domotic'
I added a second value, and again no value ....
{
"T_Living": {
"topic": "ebusd/ctlv2",
"key": "ebusd/ctlv2/z1RoomTemp",
"type": "80", "subtype": "5", "switchtype": "0" ,
"mapping": {"item": "", "multiplier": 0.1}
},
"T_Outside": {
"topic": "ëbusd/ctlv2",
"key": "ëbusd/ctlv2/DisplayedOutsideTemp",
"type": "80", "subtype": "5", "switchtype": "0" ,
"mapping": {"item": "", "multiplier": 0.1}
}
}
Added a bit of logging after I update the file:
2024-02-23 12:16:30.417 MQTT Mapper: 'HomeFolder':'/home/hjz/domoticz/plugins/MqttMapper/'
2024-02-23 12:16:30.417 MQTT Mapper: 'StartupFolder':'/home/hjz/domoticz/'
2024-02-23 12:16:30.417 MQTT Mapper: 'UserDataFolder':'/home/hjz/domoticz/'
2024-02-23 12:16:30.417 MQTT Mapper: 'Database':'/home/hjz/domoticz/domoticz.db'
2024-02-23 12:16:30.417 MQTT Mapper: 'Language':'en'
2024-02-23 12:16:30.417 MQTT Mapper: 'Version':'1.0.19'
2024-02-23 12:16:30.417 MQTT Mapper: 'Author':'Flying Domotic'
2024-02-23 12:16:30.417 MQTT Mapper: 'Name':'MQTT Mapper'
2024-02-23 12:16:30.417 MQTT Mapper: 'Address':'192.168.2.71'
2024-02-23 12:16:30.417 MQTT Mapper: 'Port':'1883'
2024-02-23 12:16:30.417 MQTT Mapper: 'Key':'MqttMapper'
2024-02-23 12:16:30.417 MQTT Mapper: 'Mode1':'MqttMapper.json'
2024-02-23 12:16:30.417 MQTT Mapper: 'Mode6':'Normal'
2024-02-23 12:16:30.417 MQTT Mapper: 'DomoticzVersion':'2024.4 (build 15910)'
2024-02-23 12:16:30.417 MQTT Mapper: 'DomoticzHash':'0f2fcff99'
2024-02-23 12:16:30.417 MQTT Mapper: 'DomoticzBuildTime':'2024-02-10 12:56:24'
2024-02-23 12:16:30.417 MQTT Mapper: Device count: 2
2024-02-23 12:16:30.417 MQTT Mapper: Device: 1 - ID: 1234, Name: 'MQTT Mapper - T_Living', nValue: 0, sValue: '19.6625'
2024-02-23 12:16:30.417 MQTT Mapper: Device: 2 - ID: 1235, Name: 'MQTT Mapper - T_Outside', nValue: 0, sValue: ''
2024-02-23 12:16:30.417 MQTT Mapper: Debug logging mask set to: PYTHON PLUGIN
2024-02-23 12:16:30.417 MQTT Mapper: Updating device T_Living
2024-02-23 12:16:30.418 MQTT Mapper: Updating device T_Outside
2024-02-23 12:16:30.420 MQTT Mapper: MqttClient::__init__
2024-02-23 12:16:30.420 MQTT Mapper: MqttClient::Open
2024-02-23 12:16:30.420 MQTT Mapper: Heartbeat interval set to: 60.
2024-02-23 12:16:30.470 MQTT Mapper: MqttClient::onConnect
2024-02-23 12:16:30.470 MQTT Mapper: Successful connect to: 192.168.2.71:1883
2024-02-23 12:16:30.470 MQTT Mapper: MqttClient::Connect
2024-02-23 12:16:30.470 MQTT Mapper: MQTT CONNECT ID: 'Domoticz_MqttMapper_31_1708686990'
2024-02-23 12:16:30.520 MQTT Mapper: onMQTTConnected
2024-02-23 12:16:30.521 MQTT Mapper: getTopics: '{'ebusd/ctlv2', 'ëbusd/ctlv2'}'
2024-02-23 12:16:30.521 MQTT Mapper: MqttClient::Subscribe
2024-02-23 12:16:30.571 MQTT Mapper: onMQTTSubscribed
2024-02-23 12:16:30.237 Status: MQTT Mapper: Stop directive received.
2024-02-23 12:16:30.243 Status: MQTT Mapper: Exiting work loop.
2024-02-23 12:16:30.337 Status: MQTT Mapper: Stopping threads.
2024-02-23 12:16:30.337 Status: MQTT Mapper: Stopped.
2024-02-23 12:16:30.338 Status: MQTT Mapper: Started.
2024-02-23 12:16:30.338 Status: MQTT Mapper: Entering work loop.
2024-02-23 12:16:30.416 Status: MQTT Mapper: Initialized version 1.0.19, author 'Flying Domotic'
-
- Posts: 16
- Joined: Monday 12 September 2016 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Python Plugin: MqttMapper
There's an error in T_Outside. It reads "ëbusd/ctlv2". The trema on ebusd shouldn't be there, I assume.hjzwiers wrote: ↑Friday 23 February 2024 10:44 I added a second value, and again no value ....
{
"T_Living": {
"topic": "ebusd/ctlv2",
"key": "ebusd/ctlv2/z1RoomTemp",
"type": "80", "subtype": "5", "switchtype": "0" ,
"mapping": {"item": "", "multiplier": 0.1}
},
"T_Outside": {
"topic": "ëbusd/ctlv2",
"key": "ëbusd/ctlv2/DisplayedOutsideTemp",
"type": "80", "subtype": "5", "switchtype": "0" ,
"mapping": {"item": "", "multiplier": 0.1}
}
}
-
- Posts: 163
- Joined: Friday 12 January 2018 8:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: MqttMapper
I thought that too, but it is just how it looks, it is an "e" lol. Tried a different one, same result
2024-02-23 15:47:38.760 MQTT Mapper: Device: 1 - ID: 1234, Name: 'MQTT Mapper - T_Living', nValue: 0, sValue: ''
2024-02-23 15:47:38.760 MQTT Mapper: Device: 2 - ID: 1235, Name: 'MQTT Mapper - T_Outside', nValue: 0, sValue: ''
"T_Living": {
"topic": "ebusd/ctlv2",
"key": "ebusd/ctlv2/z1RoomTemp",
"type": "80", "subtype": "5", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
},
"T_Outside": {
"topic": "ebusd/ctlv2",
"key": "ebusd/ctlv2/DisplayedOutsideTemp",
"type": "80", "subtype": "5", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
}
}
Something is still not right, no values are read
2024-02-23 15:47:38.760 MQTT Mapper: Device: 1 - ID: 1234, Name: 'MQTT Mapper - T_Living', nValue: 0, sValue: ''
2024-02-23 15:47:38.760 MQTT Mapper: Device: 2 - ID: 1235, Name: 'MQTT Mapper - T_Outside', nValue: 0, sValue: ''
"T_Living": {
"topic": "ebusd/ctlv2",
"key": "ebusd/ctlv2/z1RoomTemp",
"type": "80", "subtype": "5", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
},
"T_Outside": {
"topic": "ebusd/ctlv2",
"key": "ebusd/ctlv2/DisplayedOutsideTemp",
"type": "80", "subtype": "5", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
}
}
Something is still not right, no values are read
- Xenomes
- Posts: 379
- Joined: Tuesday 27 November 2018 19:05
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Python Plugin: MqttMapper
The issue has been resolved in later versions of Domoticz.vco1 wrote: ↑Friday 23 February 2024 10:39 Although the "dirty fix" may resolve the issue (haven't tested this), this behaviour definitely seems to be a bug in the MQTT Mapper plugin. Although I'm not an experienced plugin developer by far, I'll try to see if I can spot the issue.
Good to know: this doesn't happen with at least 2 other plugins I tested. Both based on the legacy framework.
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
-
- Posts: 163
- Joined: Friday 12 January 2018 8:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: MqttMapper
Something is still not right, no values are read, also the values aren't refreshed.hjzwiers wrote: ↑Friday 23 February 2024 15:09 I thought that too, but it is just how it looks, it is an "e" lol. Tried a different one, same result
2024-02-23 15:47:38.760 MQTT Mapper: Device: 1 - ID: 1234, Name: 'MQTT Mapper - T_Living', nValue: 0, sValue: ''
2024-02-23 15:47:38.760 MQTT Mapper: Device: 2 - ID: 1235, Name: 'MQTT Mapper - T_Outside', nValue: 0, sValue: ''
"T_Living": {
"topic": "ebusd/ctlv2",
"key": "ebusd/ctlv2/z1RoomTemp",
"type": "80", "subtype": "5", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
},
"T_Outside": {
"topic": "ebusd/ctlv2",
"key": "ebusd/ctlv2/DisplayedOutsideTemp",
"type": "80", "subtype": "5", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
}
}
-
- Posts: 303
- Joined: Saturday 27 February 2016 0:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Python Plugin: MqttMapper
Would it be possible to get a copy of payload sent when device changes?
IMHO, this perhaps a bug in MqttMapper plugin, but it may either be a configuration problem, with wrong "item" specification. That's why, with payload, we can find the right value.
IMHO, this perhaps a bug in MqttMapper plugin, but it may either be a configuration problem, with wrong "item" specification. That's why, with payload, we can find the right value.
-
- Posts: 163
- Joined: Friday 12 January 2018 8:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: MqttMapper
I don't know what you mean with payload? You can have anything you want
-
- Posts: 303
- Joined: Saturday 27 February 2016 0:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Python Plugin: MqttMapper
When speaking about MQTT, payload is message content related to a topic.
Here, the interesting topic is either "ebusd/ctlv2", "ebusd/ctlv2/z1RoomTemp" or "ebusd/ctlv2/DisplayedOutsideTemp".
Content of there topics may help.
To get the content, you may use tools likeMQTT_Explorer or MQTT.fx
Another possibility (if given "ebusd/ctlv2" is the right one), is to set MqttMapper plugin into debug mode (on the hardware page).
Here, the interesting topic is either "ebusd/ctlv2", "ebusd/ctlv2/z1RoomTemp" or "ebusd/ctlv2/DisplayedOutsideTemp".
Content of there topics may help.
To get the content, you may use tools likeMQTT_Explorer or MQTT.fx
Another possibility (if given "ebusd/ctlv2" is the right one), is to set MqttMapper plugin into debug mode (on the hardware page).
-
- Posts: 163
- Joined: Friday 12 January 2018 8:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: MqttMapper
First result:
2024-02-24 11:25:56.372 MQTT Mapper: MqttClient::onDisonnect Disconnected from: 192.168.2.71:1883
2024-02-24 11:25:56.372 MQTT Mapper: MqttClient::Close
2024-02-24 11:25:56.372 MQTT Mapper: onMQTTDisconnected
2024-02-24 11:25:56.472 MQTT Mapper: Worker thread started.
2024-02-24 11:25:56.540 MQTT Mapper: 'HardwareID':'31'
2024-02-24 11:25:56.540 MQTT Mapper: 'HomeFolder':'/home/hjz/domoticz/plugins/MqttMapper/'
2024-02-24 11:25:56.540 MQTT Mapper: 'StartupFolder':'/home/hjz/domoticz/'
2024-02-24 11:25:56.540 MQTT Mapper: 'UserDataFolder':'/home/hjz/domoticz/'
2024-02-24 11:25:56.540 MQTT Mapper: 'Database':'/home/hjz/domoticz/domoticz.db'
2024-02-24 11:25:56.540 MQTT Mapper: 'Language':'en'
2024-02-24 11:25:56.540 MQTT Mapper: 'Version':'1.0.19'
2024-02-24 11:25:56.540 MQTT Mapper: 'Author':'Flying Domotic'
2024-02-24 11:25:56.540 MQTT Mapper: 'Name':'MQTT Mapper'
2024-02-24 11:25:56.540 MQTT Mapper: 'Address':'192.168.2.71'
2024-02-24 11:25:56.540 MQTT Mapper: 'Port':'1883'
2024-02-24 11:25:56.540 MQTT Mapper: 'Key':'MqttMapper'
2024-02-24 11:25:56.540 MQTT Mapper: 'Mode1':'MqttMapper.json'
2024-02-24 11:25:56.540 MQTT Mapper: 'Mode6':'Verbose'
2024-02-24 11:25:56.540 MQTT Mapper: 'DomoticzVersion':'2024.4 (build 15910)'
2024-02-24 11:25:56.540 MQTT Mapper: 'DomoticzHash':'0f2fcff99'
2024-02-24 11:25:56.540 MQTT Mapper: 'DomoticzBuildTime':'2024-02-10 12:56:24'
2024-02-24 11:25:56.540 MQTT Mapper: Device count: 2
2024-02-24 11:25:56.540 MQTT Mapper: Device: 1 - ID: 1234, Name: 'MQTT Mapper - T_Living', nValue: 0, sValue: ''
2024-02-24 11:25:56.540 MQTT Mapper: Device: 2 - ID: 1235, Name: 'MQTT Mapper - T_Outside', nValue: 0, sValue: ''
2024-02-24 11:25:56.540 MQTT Mapper: Debug logging mask set to: PYTHON PLUGIN DEVICE CONNECTION MESSAGE
2024-02-24 11:25:56.540 MQTT Mapper: Updating device T_Living
2024-02-24 11:25:56.540 (MQTT Mapper - T_Living) Updating device from 0:'' to have values 0:''.
2024-02-24 11:25:56.541 MQTT Mapper: Updating device T_Outside
2024-02-24 11:25:56.541 (MQTT Mapper - T_Outside) Updating device from 0:'' to have values 0:''.
2024-02-24 11:25:56.543 MQTT Mapper: MqttClient::__init__
2024-02-24 11:25:56.543 MQTT Mapper: MqttClient::Open
2024-02-24 11:25:56.543 MQTT Mapper: Protocol set to: 'MQTT'.
2024-02-24 11:25:56.543 MQTT Mapper: Transport set to: 'TCP/IP', 192.168.2.71:1883.
2024-02-24 11:25:56.543 MQTT Mapper: Connect directive received, action initiated successfully.
2024-02-24 11:25:56.543 MQTT Mapper: Heartbeat interval set to: 60.
2024-02-24 11:25:56.594 MQTT Mapper: MqttClient::onConnect
2024-02-24 11:25:56.594 MQTT Mapper: Successful connect to: 192.168.2.71:1883
2024-02-24 11:25:56.594 MQTT Mapper: MqttClient::Connect
2024-02-24 11:25:56.594 MQTT Mapper: MQTT CONNECT ID: 'Domoticz_MqttMapper_31_1708770356'
2024-02-24 11:25:56.594 MQTT Mapper: Sending 47 bytes of data
2024-02-24 11:25:56.594 MQTT Mapper: 10 2d 00 04 4d 51 54 54 04 02 00 3c 00 21 44 6f 6d 6f 74 69 .-..MQTT...<.!Domoti
2024-02-24 11:25:56.594 MQTT Mapper: 63 7a 5f 4d 71 74 74 4d 61 70 70 65 72 5f 33 31 5f 31 37 30 cz_MqttMapper_31_170
2024-02-24 11:25:56.594 MQTT Mapper: 38 37 37 30 33 35 36 .. .. .. .. .. .. .. .. .. .. .. .. .. 8770356
2024-02-24 11:25:56.644 MQTT Mapper: Received 4 bytes of data
2024-02-24 11:25:56.644 MQTT Mapper: 20 02 00 00 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ....
2024-02-24 11:25:56.644 MQTT Mapper: onMQTTConnected
2024-02-24 11:25:56.644 MQTT Mapper: getTopics: '{'ebusd/ctlv2'}'
2024-02-24 11:25:56.644 MQTT Mapper: MqttClient::Subscribe
2024-02-24 11:25:56.644 MQTT Mapper: Sending 18 bytes of data
2024-02-24 11:25:56.644 MQTT Mapper: 82 10 00 01 00 0b 65 62 75 73 64 2f 63 74 6c 76 32 00 .. .. ®....ebusd/ctlv2.
2024-02-24 11:25:56.694 MQTT Mapper: Received 5 bytes of data
2024-02-24 11:25:56.694 MQTT Mapper: 90 03 00 01 00 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Ю...
2024-02-24 11:25:56.695 MQTT Mapper: onMQTTSubscribed
2024-02-24 11:25:56.371 Status: MQTT Mapper: Stop directive received.
2024-02-24 11:25:56.377 Status: MQTT Mapper: Exiting work loop.
And an update
2024-02-24 12:18:42.085 MQTT Mapper: Sending 2 bytes of data
2024-02-24 12:18:42.085 MQTT Mapper: c0 00 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. �
2024-02-24 12:18:42.135 MQTT Mapper: Received 2 bytes of data
2024-02-24 12:18:42.135 MQTT Mapper: d0 00 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Ю
Only I don't know what it means
I'm reading (copied from MQTT explorer)
ebusd/ctlv2/z1RoomTemp
ebusd/ctlv2/DisplayedOutsideTemp
And the file:
{
"T_Living": {
"topic": "ebusd/ctlv2",
"key": "ebusd/ctlv2/z1RoomTemp",
"type": "80", "subtype": "5", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
},
"T_Outside": {
"topic": "ebusd/ctlv2",
"key": "ebusd/ctlv2/DisplayedOutsideTemp",
"type": "80", "subtype": "5", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
}
}
2024-02-24 11:25:56.372 MQTT Mapper: MqttClient::onDisonnect Disconnected from: 192.168.2.71:1883
2024-02-24 11:25:56.372 MQTT Mapper: MqttClient::Close
2024-02-24 11:25:56.372 MQTT Mapper: onMQTTDisconnected
2024-02-24 11:25:56.472 MQTT Mapper: Worker thread started.
2024-02-24 11:25:56.540 MQTT Mapper: 'HardwareID':'31'
2024-02-24 11:25:56.540 MQTT Mapper: 'HomeFolder':'/home/hjz/domoticz/plugins/MqttMapper/'
2024-02-24 11:25:56.540 MQTT Mapper: 'StartupFolder':'/home/hjz/domoticz/'
2024-02-24 11:25:56.540 MQTT Mapper: 'UserDataFolder':'/home/hjz/domoticz/'
2024-02-24 11:25:56.540 MQTT Mapper: 'Database':'/home/hjz/domoticz/domoticz.db'
2024-02-24 11:25:56.540 MQTT Mapper: 'Language':'en'
2024-02-24 11:25:56.540 MQTT Mapper: 'Version':'1.0.19'
2024-02-24 11:25:56.540 MQTT Mapper: 'Author':'Flying Domotic'
2024-02-24 11:25:56.540 MQTT Mapper: 'Name':'MQTT Mapper'
2024-02-24 11:25:56.540 MQTT Mapper: 'Address':'192.168.2.71'
2024-02-24 11:25:56.540 MQTT Mapper: 'Port':'1883'
2024-02-24 11:25:56.540 MQTT Mapper: 'Key':'MqttMapper'
2024-02-24 11:25:56.540 MQTT Mapper: 'Mode1':'MqttMapper.json'
2024-02-24 11:25:56.540 MQTT Mapper: 'Mode6':'Verbose'
2024-02-24 11:25:56.540 MQTT Mapper: 'DomoticzVersion':'2024.4 (build 15910)'
2024-02-24 11:25:56.540 MQTT Mapper: 'DomoticzHash':'0f2fcff99'
2024-02-24 11:25:56.540 MQTT Mapper: 'DomoticzBuildTime':'2024-02-10 12:56:24'
2024-02-24 11:25:56.540 MQTT Mapper: Device count: 2
2024-02-24 11:25:56.540 MQTT Mapper: Device: 1 - ID: 1234, Name: 'MQTT Mapper - T_Living', nValue: 0, sValue: ''
2024-02-24 11:25:56.540 MQTT Mapper: Device: 2 - ID: 1235, Name: 'MQTT Mapper - T_Outside', nValue: 0, sValue: ''
2024-02-24 11:25:56.540 MQTT Mapper: Debug logging mask set to: PYTHON PLUGIN DEVICE CONNECTION MESSAGE
2024-02-24 11:25:56.540 MQTT Mapper: Updating device T_Living
2024-02-24 11:25:56.540 (MQTT Mapper - T_Living) Updating device from 0:'' to have values 0:''.
2024-02-24 11:25:56.541 MQTT Mapper: Updating device T_Outside
2024-02-24 11:25:56.541 (MQTT Mapper - T_Outside) Updating device from 0:'' to have values 0:''.
2024-02-24 11:25:56.543 MQTT Mapper: MqttClient::__init__
2024-02-24 11:25:56.543 MQTT Mapper: MqttClient::Open
2024-02-24 11:25:56.543 MQTT Mapper: Protocol set to: 'MQTT'.
2024-02-24 11:25:56.543 MQTT Mapper: Transport set to: 'TCP/IP', 192.168.2.71:1883.
2024-02-24 11:25:56.543 MQTT Mapper: Connect directive received, action initiated successfully.
2024-02-24 11:25:56.543 MQTT Mapper: Heartbeat interval set to: 60.
2024-02-24 11:25:56.594 MQTT Mapper: MqttClient::onConnect
2024-02-24 11:25:56.594 MQTT Mapper: Successful connect to: 192.168.2.71:1883
2024-02-24 11:25:56.594 MQTT Mapper: MqttClient::Connect
2024-02-24 11:25:56.594 MQTT Mapper: MQTT CONNECT ID: 'Domoticz_MqttMapper_31_1708770356'
2024-02-24 11:25:56.594 MQTT Mapper: Sending 47 bytes of data
2024-02-24 11:25:56.594 MQTT Mapper: 10 2d 00 04 4d 51 54 54 04 02 00 3c 00 21 44 6f 6d 6f 74 69 .-..MQTT...<.!Domoti
2024-02-24 11:25:56.594 MQTT Mapper: 63 7a 5f 4d 71 74 74 4d 61 70 70 65 72 5f 33 31 5f 31 37 30 cz_MqttMapper_31_170
2024-02-24 11:25:56.594 MQTT Mapper: 38 37 37 30 33 35 36 .. .. .. .. .. .. .. .. .. .. .. .. .. 8770356
2024-02-24 11:25:56.644 MQTT Mapper: Received 4 bytes of data
2024-02-24 11:25:56.644 MQTT Mapper: 20 02 00 00 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ....
2024-02-24 11:25:56.644 MQTT Mapper: onMQTTConnected
2024-02-24 11:25:56.644 MQTT Mapper: getTopics: '{'ebusd/ctlv2'}'
2024-02-24 11:25:56.644 MQTT Mapper: MqttClient::Subscribe
2024-02-24 11:25:56.644 MQTT Mapper: Sending 18 bytes of data
2024-02-24 11:25:56.644 MQTT Mapper: 82 10 00 01 00 0b 65 62 75 73 64 2f 63 74 6c 76 32 00 .. .. ®....ebusd/ctlv2.
2024-02-24 11:25:56.694 MQTT Mapper: Received 5 bytes of data
2024-02-24 11:25:56.694 MQTT Mapper: 90 03 00 01 00 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Ю...
2024-02-24 11:25:56.695 MQTT Mapper: onMQTTSubscribed
2024-02-24 11:25:56.371 Status: MQTT Mapper: Stop directive received.
2024-02-24 11:25:56.377 Status: MQTT Mapper: Exiting work loop.
And an update
2024-02-24 12:18:42.085 MQTT Mapper: Sending 2 bytes of data
2024-02-24 12:18:42.085 MQTT Mapper: c0 00 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. �
2024-02-24 12:18:42.135 MQTT Mapper: Received 2 bytes of data
2024-02-24 12:18:42.135 MQTT Mapper: d0 00 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Ю
Only I don't know what it means
I'm reading (copied from MQTT explorer)
ebusd/ctlv2/z1RoomTemp
ebusd/ctlv2/DisplayedOutsideTemp
And the file:
{
"T_Living": {
"topic": "ebusd/ctlv2",
"key": "ebusd/ctlv2/z1RoomTemp",
"type": "80", "subtype": "5", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
},
"T_Outside": {
"topic": "ebusd/ctlv2",
"key": "ebusd/ctlv2/DisplayedOutsideTemp",
"type": "80", "subtype": "5", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
}
}
-
- Posts: 16
- Joined: Monday 12 September 2016 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Python Plugin: MqttMapper
I found, and fixed, the issue with the disappearing settings as a.o. reported by @Hencor in this post.
Believe it or not, but this is caused by the name tag in the plugin definition:
Apparently this is not (all) treated as a string. The word "LAN" seems to have a special meaning in Domoticz. When changing the name to something without "LAN" everything works as expected.
So if the plugin definition is for example changed to:
all works fine. As can be seen below.
Believe it or not, but this is caused by the name tag in the plugin definition:
Code: Select all
<plugin key="MqttMapper" name="MQTT Mapper with LAN Interface" author="Flying Domotic" version="1.0.19" externallink="https://github.com/FlyingDomotic/domoticz-mqttmapper-plugin">
So if the plugin definition is for example changed to:
Code: Select all
<plugin key="MqttMapper" name="MQTT Mapper with network Interface" author="Flying Domotic" version="1.0.19" externallink="https://github.com/FlyingDomotic/domoticz-mqttmapper-plugin">
-
- Posts: 303
- Joined: Saturday 27 February 2016 0:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Python Plugin: MqttMapper
Thanks for the log.hjzwiers wrote: ↑Saturday 24 February 2024 11:30 First result:
And an update
2024-02-24 12:18:42.085 MQTT Mapper: Sending 2 bytes of data
2024-02-24 12:18:42.085 MQTT Mapper: c0 00 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. �
2024-02-24 12:18:42.135 MQTT Mapper: Received 2 bytes of data
2024-02-24 12:18:42.135 MQTT Mapper: d0 00 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Ю
Update is not really an update. This is the MQTT Ping sent to Mosquitto, and Mosquitto's pong answer. IT normally happens every minute.
To see payload, you have to wait for the (external) device to send it. It will be prefixed by "onMQTTPublish: '", followed by topic ''ebusd/ctlv2'', and finally the value (you have to set debug to "Extra verbose" before that.
If nothing is received after more twice expected update period, you may gave the wrong topic.
To find the right topic, use tool like MqttExplorer (https://mqtt-explorer.com/), connect to you MQTT server (giving IP and authentication),wait a bit for messages to be received, and explore things received by ebusd/ctlv2 topic, including its sub-topic(s). Try to locate data you want to get, and write down the full topic. This topic should be inserted into MqttMapper configuration file.
You may want to share it here, either publicly or through private message.
Hard copy of MqttExplorer screen showing this data may help.
-
- Posts: 163
- Joined: Friday 12 January 2018 8:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: MqttMapper
I could send you the file of the picture of MQTT? I don't know how to get it on here
If I put the file error logs in "extra verbose" extra I don't get anyting?
It is not reading the sValue?
024-02-24 11:25:56.540 MQTT Mapper: Device: 1 - ID: 1234, Name: 'MQTT Mapper - T_Living', nValue: 0, sValue: ''
2024-02-24 11:25:56.540 MQTT Mapper: Device: 2 - ID: 1235, Name: 'MQTT Mapper - T_Outside', nValue: 0, sValue: ''
2024-02-24 11:25:56.540 MQTT Mapper: Debug logging mask set to: PYTHON PLUGIN DEVICE CONNECTION MESSAGE
2024-02-24 11:25:56.540 MQTT Mapper: Updating device T_Living
2024-02-24 11:25:56.540 (MQTT Mapper - T_Living) Updating device from 0:'' to have values 0:''.
2024-02-24 11:25:56.541 MQTT Mapper: Updating device T_Outside
2024-02-24 11:25:56.541 (MQTT Mapper - T_Outside) Updating device from 0:'' to have values 0:''.
I tried "mapping": {"item": value;~, "multiplier"= 0.1} , no difference
If I put the file error logs in "extra verbose" extra I don't get anyting?
It is not reading the sValue?
024-02-24 11:25:56.540 MQTT Mapper: Device: 1 - ID: 1234, Name: 'MQTT Mapper - T_Living', nValue: 0, sValue: ''
2024-02-24 11:25:56.540 MQTT Mapper: Device: 2 - ID: 1235, Name: 'MQTT Mapper - T_Outside', nValue: 0, sValue: ''
2024-02-24 11:25:56.540 MQTT Mapper: Debug logging mask set to: PYTHON PLUGIN DEVICE CONNECTION MESSAGE
2024-02-24 11:25:56.540 MQTT Mapper: Updating device T_Living
2024-02-24 11:25:56.540 (MQTT Mapper - T_Living) Updating device from 0:'' to have values 0:''.
2024-02-24 11:25:56.541 MQTT Mapper: Updating device T_Outside
2024-02-24 11:25:56.541 (MQTT Mapper - T_Outside) Updating device from 0:'' to have values 0:''.
I tried "mapping": {"item": value;~, "multiplier"= 0.1} , no difference
Last edited by hjzwiers on Sunday 25 February 2024 11:13, edited 1 time in total.
- waltervl
- Posts: 5155
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Python Plugin: MqttMapper
There is an attachment tab for images under the submit button if you select full editor when typing a new reply.
Also check the mqtt debugging section of Domoticz wiki https://www.domoticz.com/wiki/MQTT#Debugging_MQTT
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 163
- Joined: Friday 12 January 2018 8:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: MqttMapper
MQTT is fine, I can't get the sValue of the temperature
-
- Posts: 303
- Joined: Saturday 27 February 2016 0:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Python Plugin: MqttMapper
Thanks !
Real topics are "ebusd/ctlv2/z1RoomTemp" and "ebusd/ctlv2/DisplayedOutsideTemp", so you configuration file should be something like:
With that, data should be collected.
Real topics are "ebusd/ctlv2/z1RoomTemp" and "ebusd/ctlv2/DisplayedOutsideTemp", so you configuration file should be something like:
Code: Select all
{
"T_Living": {
"topic": "ebusd/ctlv2/z1RoomTemp",
"type": "80", "subtype": "5", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
},
"T_Outside": {
"topic": "ebusd/ctlv2/DisplayedOutsideTemp",
"type": "80", "subtype": "5", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
}
}
-
- Posts: 163
- Joined: Friday 12 January 2018 8:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: MqttMapper
Wow, I must have tried a million types of input files, but not this one .....
You solved it thanks a lot!
You solved it thanks a lot!
-
- Posts: 303
- Joined: Saturday 27 February 2016 0:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Python Plugin: MqttMapper
MISS & KISS (Make It Simple Stupid / Keep It Simple Stupid
-
- Posts: 58
- Joined: Sunday 15 March 2015 19:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Hamburg
- Contact:
Re: Python Plugin: MqttMapper
it partially works for me . I get data from a BME680 IAQ sensor from an Arduino D1 Mini. I have transfered the values to the Mosquitto broker and the device appears in Mosquitto. For some reason the Baro device is not available in the Domoticz GUI and for humidity I have not found any type to get the values updated . I have gambled arround several hours with the MqttMapper.json file but do not get a satisfing result. What am I doing wrong?
- Attachments
-
- Mosquitto.JPG (9.34 KiB) Viewed 948 times
-
- json.JPG (24.62 KiB) Viewed 948 times
-
- devices.JPG (31.69 KiB) Viewed 948 times
Who is online
Users browsing this forum: No registered users and 0 guests