Page 3 of 7
Re: SmartEvse support
Posted: Sunday 04 August 2024 16:09
by FlyingDomotic
Idea is to build you own MqttMapper.json file (which should be in /home/pi/Domoticz/plugins/MqttMapper/)
To make it, use your own editor (nano, vi, ... or even anything on a PC which will be copied then to the RPi).
Just cut and paste parts of the message you need, and make some cleanup (keep only one opening "{" at beginning of file and one closing "}" at end, add "," between parts. This should give you something like:
Code: Select all
{
"SmartEVSE charge current": {
"topic": "[MQTTprefix]/Charge Current",
"type": "243", "subtype": "23", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
},
"SmartEVSE max current": {
"topic": "[MQTTprefix]/Max Current",
"type": "243", "subtype": "23", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
},
"SmartEVSE state": {
"topic": "[MQTTprefix]/State",
"type": "243", "subtype": "19", "switchtype": "0",
"mapping": {"item": ""}
},
"SmartEVSE status": {
"topic": "[MQTTprefix]/Status",
"type": "244", "subtype": "73", "switchtype": "18",
"options": {"SelectorStyle":"1", "LevelOffHidden": "false", "LevelNames":"None|No Power Available|Communication Error|Temperature High|EV Meter Comm Error|RCM Tripped|Waiting for Solar|Test IO|Flash Error|**Unknown**"},
"mapping": {"item": "", "default": "90",
"values": {
"None": "0",
"No Power Available": "10",
"Communication Error": "20",
"Temperature High": "30",
"EV Meter Comm Error": "40",
"RCM Tripped": "50",
"Waiting for Solar": "60",
"Test IO": "70",
"Flash Error": "80",
"**Unknown**": "90"
}
}
},
"SmartEVSE charge current override": {
"topic": "[MQTTprefix]/ChargeCurrentOverride",
"type": "242", "subtype": "1", "switchtype": "0",
"options": {"ValueStep": "1", "ValueMin": "0", "ValueMax": "200", "ValueUnit": "A"},
"initial": {"nvalue": "0", "svalue": "0"},
"mapping": {"item": "", "multiplier": 0.1},
"set": {"topic": "[MQTTprefix]/Set/CurrentOverride", "digits": 0}
}
}
Re: SmartEvse support
Posted: Sunday 04 August 2024 16:11
by FlyingDomotic
And don't worry about indentation, each tool does its own. At the end, all end of lines, tabs and spaces between elements are removed to keep only useful data.
Re: SmartEvse support
Posted: Sunday 04 August 2024 17:40
by rron
Ok, thanks for your help I’m going to try this again and keep you posted.
Re: SmartEvse support
Posted: Sunday 04 August 2024 22:52
by waltervl
And also change [MQTTprefix] in the json configuration file in your real MQTT prefix you use in your SmartEvse setup. Currently you are using "domoticz" but default is SmartEvse-xxxxx where xxxx is the serial number of the device. Better use the default.
Re: SmartEvse support
Posted: Wednesday 07 August 2024 21:53
by DiaDomo
Hi all,
Although I don't have the hardware (SmartEVSE module) yet, I tested the mqtt setup with the json mapping file as described above:
5 devices are created, so the concept works!
Of course more devices should be added in the json mapping file.
Re: SmartEvse support
Posted: Friday 09 August 2024 14:48
by rron
DiaDomo wrote: ↑Wednesday 07 August 2024 21:53
Hi all,
Although I don't have the hardware (SmartEVSE module) yet, I tested the mqtt setup with the json mapping file as described above:
5 devices are created, so the concept works!
Of course more devices should be added in the json mapping file.
I have the same devices created in my system but there's no update of the devices. The time you see is the creation time. In the logging there's no activity from the mapper.
Re: SmartEvse support
Posted: Friday 09 August 2024 15:58
by waltervl
rron wrote: ↑Friday 09 August 2024 14:48
I have the same devices created in my system but there's no update of the devices. The time you see is the creation time. In the logging there's no activity from the mapper.
Please check with the application MQTT Explorer what SmartEVSE MQTT topics you now have.
Did you change the MQTTprefix in the SmartEVSE configuration (from domoticz to something like SmartEVSE-xxxxx)?
Did you modify the MQTTMapper configuration json with this new MQTTprefix?
Re: SmartEvse support
Posted: Friday 09 August 2024 16:11
by rron
Yesi did all the recommendations you have provided. The device are made as you can see in the screenshot but they are not updated from the smartevse. If I compare this with the mqtt explorer there are a lot of updates which they are not in domoticz.
Re: SmartEvse support
Posted: Friday 09 August 2024 16:17
by waltervl
can you post a screenshot of MQTT explorer with the smartevse topic.
Also post the contents of MqttMapper.json file (which should be in /home/pi/Domoticz/plugins/MqttMapper/)
Re: SmartEvse support
Posted: Friday 09 August 2024 16:26
by rron
Code: Select all
{
"SmartEVSE charge current": {
"topic": "[MQTTprefix]/Charge Current",
"type": "243", "subtype": "23", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
},
"SmartEVSE max current": {
"topic": "[MQTTprefix]/Max Current",
"type": "243", "subtype": "23", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
},
"SmartEVSE state": {
"topic": "[MQTTprefix]/State",
"type": "243", "subtype": "19", "switchtype": "0",
"mapping": {"item": ""}
},
"SmartEVSE status": {
"topic": "[MQTTprefix]/Status",
"type": "244", "subtype": "73", "switchtype": "18",
"options": {"SelectorStyle":"1", "LevelOffHidden": "false", "LevelNames":"None|No Power Available|Communication Error|Temperature High|EV Meter Comm Error|RCM Tripped|Waiting for Solar|Test IO|Flash Error|**Unknown**"},
"mapping": {"item": "", "default": "90",
"values": {
"None": "0",
"No Power Available": "10",
"Communication Error": "20",
"Temperature High": "30",
"EV Meter Comm Error": "40",
"RCM Tripped": "50",
"Waiting for Solar": "60",
"Test IO": "70",
"Flash Error": "80",
"**Unknown**": "90"
}
}
},
"SmartEVSE charge current override": {
"topic": "[MQTTprefix]/ChargeCurrentOverride",
"type": "242", "subtype": "1", "switchtype": "0",
"options": {"ValueStep": "1", "ValueMin": "0", "ValueMax": "200", "ValueUnit": "A"},
"initial": {"nvalue": "0", "svalue": "0"},
"mapping": {"item": "", "multiplier": 0.1},
"set": {"topic": "[MQTTprefix]/Set/CurrentOverride", "digits": 0}
}
}
Ps the topic smartevse in the explorer is the old one which i haven't deleted.
Re: SmartEvse support
Posted: Friday 09 August 2024 16:32
by waltervl
Thank you. You made a mistake: In the MqttMapper.json change every [MQTTprefix] into SmartEVSE-5572
So for example
Code: Select all
"topic": "[MQTTprefix]/Charge Current"
should be
Code: Select all
"topic": "SmartEVSE-5572/Charge Current"
Then you probably have to restart the plugin (click on update when selecting the plugin in menu Setup - Hardware)
Edit: It also seems you are running a SmartEVSE not according the documentation. A lot of MQTT topics (like for example SmartEVSE-5572/Set) are not available.
Re: SmartEvse support
Posted: Friday 09 August 2024 17:25
by rron
Code: Select all
{
"SmartEVSE charge current": {
"topic": "SmartEVSE-5572/Charge Current",
"type": "243", "subtype": "23", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
},
"SmartEVSE max current": {
"topic": "SmartEVSE-5572/Max Current",
"type": "243", "subtype": "23", "switchtype": "0",
"mapping": {"item": "", "multiplier": 0.1}
},
"SmartEVSE state": {
"topic": "SmartEVSE-5572/State",
"type": "243", "subtype": "19", "switchtype": "0",
"mapping": {"item": ""}
},
"SmartEVSE status": {
"topic": "SmartEVSE-5572/Status",
"type": "244", "subtype": "73", "switchtype": "18",
"options": {"SelectorStyle":"1", "LevelOffHidden": "false", "LevelNames":"None|No Power Available|Communication Error|Temperature High|EV Meter Comm Error|RCM Tripped|Waiting for Solar|Test IO|Flash Error|**Unknown**"},
"mapping": {"item": "", "default": "90",
"values": {
"None": "0",
"No Power Available": "10",
"Communication Error": "20",
"Temperature High": "30",
"EV Meter Comm Error": "40",
"RCM Tripped": "50",
"Waiting for Solar": "60",
"Test IO": "70",
"Flash Error": "80",
"**Unknown**": "90"
}
}
},
"SmartEVSE charge current override": {
"topic": "SmartEVSE-5572/ChargeCurrentOverride",
"type": "242", "subtype": "1", "switchtype": "0",
"options": {"ValueStep": "1", "ValueMin": "0", "ValueMax": "200", "ValueUnit": "A"},
"initial": {"nvalue": "0", "svalue": "0"},
"mapping": {"item": "", "multiplier": 0.1},
"set": {"topic": "[MQTTprefix]/Set/CurrentOverride", "digits": 0}
}
}
Yes that was the solution, mqtt prefix change to SmartEVSE-5572. Now I have one part working "charge current overide"the rest is still not updating. I have to look why that is.
Re: SmartEvse support
Posted: Friday 09 August 2024 19:14
by FlyingDomotic
Would it be possible to provide a full extract of "SmartEVSE-5572"?
Re: SmartEvse support
Posted: Friday 09 August 2024 19:19
by rron
FlyingDomotic wrote: ↑Friday 09 August 2024 19:14
Would it be possible to provide a full extract of "SmartEVSE-5572"?
I don’t know what you mean by that
Re: SmartEvse support
Posted: Friday 09 August 2024 19:26
by FlyingDomotic
Idea is to use a tool (like MQTT Explorer) to extract data from MQTT topic "SmartEVSE-5572" and copy it here.
Re: SmartEvse support
Posted: Friday 09 August 2024 19:32
by waltervl
FlyingDomotic wrote: ↑Friday 09 August 2024 19:14
Would it be possible to provide a full extract of "SmartEVSE-5572"?
Looking at the screenshot of his mqtt explorer it is not showing all the MQTT topics you have listed. So it seems SmartEVSE of @rron is not the same implementation as the one you have found......
Especially there not seems to be a Set topic so no possibility to send MQTT to SmartEVSE. So also not possible to send Domoticz Mqttmapper commands to SmartEVSE
@rron check your smartEVSE software version and update or change from repository so full MQTT functionality will come available.
Re: SmartEvse support
Posted: Friday 09 August 2024 19:36
by FlyingDomotic
That's the reason why I would like to have an idea how his MQTT data is structured, in order to adapt JSON configuration file.
It seems that at least one topic is ok.
Re: SmartEvse support
Posted: Friday 09 August 2024 19:48
by rron
FlyingDomotic wrote: ↑Friday 09 August 2024 19:26
Idea is to use a tool (like MQTT Explorer) to extract data from MQTT topic "SmartEVSE-5572" and copy it here.
There ' s no further information in the mqtt explorer. I have made 2 screenshots from the explorer, 1 from zigbee2mqtt with information and 2 from smartevse without detailed information.
Re: SmartEvse support
Posted: Friday 09 August 2024 19:50
by rron
waltervl wrote: ↑Friday 09 August 2024 19:32
FlyingDomotic wrote: ↑Friday 09 August 2024 19:14
Would it be possible to provide a full extract of "SmartEVSE-5572"?
Looking at the screenshot of his mqtt explorer it is not showing all the MQTT topics you have listed. So it seems SmartEVSE of @rron is not the same implementation as the one you have found......
Especially there not seems to be a Set topic so no possibility to send MQTT to SmartEVSE. So also not possible to send Domoticz Mqttmapper commands to SmartEVSE
@rron check your smartEVSE software version and update or change from repository so full MQTT functionality will come available.
I have the latest firmware version 3.6.7.
Re: SmartEvse support
Posted: Friday 09 August 2024 20:33
by DiaDomo
@rron: please post this screenshot:
and 2 from smartevse without detailed information.