Page 15 of 19
Re: Python Plugin: MqttMapper
Posted: Monday 03 February 2025 12:56
by FlyingDomotic
Hello!
Yes, you're right.
You should have something like:
Code: Select all
"PV2 watt": {
"topic": "energy/growatt",
"key": "energy/growatt/pv2watt",
"select": {"item": "device", "value": "QBL1CL305R"}},
"type": "248", "subtype": "1",
"mapping": {"item": "values/pv2watt", "multiplier": 0.1}
Re: Python Plugin: MqttMapper
Posted: Monday 03 February 2025 17:23
by winner61
Thank you very much FlyingDomotic!! I had to fiddle a little to make it work but everything works perfect now. Many thanks.
For those who might need the correct syntax with these growatt inverters here an example how to implement the new options.
"BMS SOC ": {
"topic": "energy/growatt",
"key": "energy/growatt/bmssoc",
"select": {"item": "device", "value": "QBL1CL305R"},
"type": "243", "subtype": "6", "switchtype": "0",
"mapping": {"item": "values/bmssoc", "multiplier": 1}
Change the device ID to your own!!
Help with types and subtypes you can go to
https://wiki.domoticz.com/Developing_a_ ... vice_Types
Re: Python Plugin: MqttMapper
Posted: Monday 03 February 2025 20:29
by FlyingDomotic
You're welcome!
Re: Python Plugin: MqttMapper
Posted: Tuesday 04 February 2025 13:28
by winner61
@FlyingDomotic . Everything is working fine but I see some strange behaviour when adding/updating mqttmapper plugin in domoticz. Before your last update I could not use the UPDATE button because the fields were empty. So I deleted the entry and added it again. Now I can use the UPDATE button but the fields show twice. Is that something from Domoticz or the MqttMapper plugin ?

- mqm.png (58.92 KiB) Viewed 1831 times
Re: Python Plugin: MqttMapper
Posted: Tuesday 04 February 2025 14:12
by FlyingDomotic
Normal behavior is as follow:
- install plug-in with git clone in domoticz/plugins/
- update it when needed by git pull
With more details, update is :
- git pull within plug-in folder
- either restart Domoticz *OR* goto hardware tab, select plug-in, don't change anything and click on "Update"
What you've got is strange (understand a bug, in Domoticz itself as it display plug-in data header twice, while there's only one copy in plug-in).
Concerning "update" button, it appears only when selecting a hardware in upper part, until you click on it.
To (try to) fix the issue, you may delete hardware from Domoticz, restart Domoticz and add the plug-in again.
Re: Python Plugin: MqttMapper
Posted: Saturday 08 March 2025 23:17
by hjzwiers
Changed meassage
Re: Python Plugin: MqttMapper
Posted: Sunday 09 March 2025 8:37
by hjzwiers
Does anyone know how to get two digits (eg 5.2 kwh or better 5200 watt) from:
"MQTTsignal": {
"topic": "homeassistant/easee/power",
"type": "243", "subtype": "29", "switchtype": "0",
"mapping": {"item": "values/current","multiplier": 1000}
So I need the output in watts, I have 0 at the moment
Thanks
Re: Python Plugin: MqttMapper
Posted: Sunday 09 March 2025 9:12
by HvdW
Play with the multiplier and see if you get any results.
Re: Python Plugin: MqttMapper
Posted: Sunday 09 March 2025 10:42
by FlyingDomotic
hjzwiers wrote: ↑Sunday 09 March 2025 8:37
Does anyone know how to get two digits (eg 5.2 kwh or better 5200 watt) from:
"MQTTsignal": {
"topic": "homeassistant/easee/power",
"type": "243", "subtype": "29", "switchtype": "0",
"mapping": {"item": "values/current","multiplier": 1000}
So I need the output in watts, I have 0 at the moment
Thanks
Syntax seem good. However, topic may not be the right one (here, it's probably HA autodiscovery topic, which contain only device definition not values).
Device data is under another topic line, depending on device itself. If it's a ZigBee device, value is often under zigbee2mqtt/<Z2M device name>. Zwave devices also have the same king of topics. DIY devices are sometimes with <device name>/...
You may install MqttExplorer to have a look at you MQTT tree, and find right topic.
Re: Python Plugin: MqttMapper
Posted: Sunday 09 March 2025 16:40
by hjzwiers
Through the explorer app (mqtt explorer) is see the value of 0,0 so I am wondering why I dont see the same value in Domoticz. I'll know more once I charge the car.
Re: Python Plugin: MqttMapper
Posted: Sunday 09 March 2025 23:56
by FlyingDomotic
Could you post here a cut&paste or a screen copy of topic content?
Re: Python Plugin: MqttMapper
Posted: Monday 10 March 2025 15:44
by hjzwiers
I got this error in the logging:
Status: Warning: Expecting svalue with at least 1 elements separated by semicolon, 0 elements received (""), notification not sent (Hardware: 31 - MQTT mapper, ID: homeassistant/easee/power, Unit: 2, Type: F3 - General, SubType: 29 - kWh)
now what do I need to change lol
Re: Python Plugin: MqttMapper
Posted: Monday 10 March 2025 17:03
by FlyingDomotic
Very strange... Looks like a configuration error, where homeassistant topic was given instead of "real" one (like "eas" or perhaps none)
Giving key name (easee), would it be possible to have a look at "eas" root topic (the one with 4 topics and 134 messages) ?
Re: Python Plugin: MqttMapper
Posted: Tuesday 11 March 2025 8:47
by hjzwiers
I moved the meassage to eas:
"MQTTsignal": {
"topic": "eas/easee/power",
"type": "243", "subtype": "29", "switchtype": "0",
"mapping": {"item": "values/value","multiplier": 1000}
}
I still get the same error message:
2025-03-11 08:43:38.304 Status: Warning: Expecting svalue with at least 1 elements separated by semicolon, 0 elements received (""), notification not sent (Hardware: 31 - MQTT mapper, ID: eas/easee/power, Unit: 7, Type: F3 - General, SubType: 29 - kWh)
So I think it is something wrong with the MQTTsignal, i changed it back to homeassistant, and I got this meassage
2025-03-11 09:48:31.733 MQTT mapper: onMQTTPublish found homeassistant/easee/power, Device 'MQTT mapper - Car charge', message '5.0019998550415'
2025-03-11 09:48:31.733 Error: MQTT mapper: Can't find >values/value< in >5.0019998550415<
2025-03-11 09:48:31.733 MQTT mapper: Setting MQTT mapper - Car charge to ><
2025-03-11 09:48:31.733 (MQTT mapper - Car charge) Updating device from 0:'' to have values 0:''.
So mqttmapper can find the value, but there is someting wrong with the displaying
"MQTTsignal": {
"topic": "homeassistant/easee/power",
"type": "243", "subtype": "29", "switchtype": "0",
"mapping": {"item": "values/value","multiplier": 1000}
}
Re: Python Plugin: MqttMapper
Posted: Tuesday 11 March 2025 9:41
by FlyingDomotic
Would it be possible to get "eas/easee/power" full content?
Concerning the error, it indicates that this kind of device (kWh counter) needs a value, while sent data only contents "" (meaning that value was not found or empty).
With "eas/easee/power" content, I'll help finding the right item.
Re: Python Plugin: MqttMapper
Posted: Tuesday 11 March 2025 9:55
by hjzwiers
how do i get "full content"
I was also updating my previous message

Re: Python Plugin: MqttMapper
Posted: Tuesday 11 March 2025 10:00
by waltervl
hjzwiers wrote: ↑Tuesday 11 March 2025 9:55
how do i get "full content"
I was also updating my previous message
In mqtt explorer unfold to folder eas/easee/power
Select the power folder and copy the message/value (not a screenshot!). There is a copy value icon on the top right when the power topic is selected. See for a reference the Wiki for reporting MQTT AD issues
https://wiki.domoticz.com/MQTT_AD_Repor ... nd_payload
Re: Python Plugin: MqttMapper
Posted: Tuesday 11 March 2025 10:15
by hjzwiers
Topic: homeassistant/easee/power
Value: 0.0
Value : 5.00899982452393
I can display a chart of the values, i just show two to prove that mqtt is showing them fine. Is this what you meant?
Re: Python Plugin: MqttMapper
Posted: Tuesday 11 March 2025 10:27
by FlyingDomotic
Are you sure that you have twice the same "value" item with different content?
Re: Python Plugin: MqttMapper
Posted: Tuesday 11 March 2025 10:30
by hjzwiers
I just showed two values, it show only one
I keep getting
2025-03-11 10:27:48.926 Error: MQTT mapper: Can't find >value/watt< in >5.02199983596802<
MQTT sees the value, only can't use it ?