Device type incorrect

For devices supporting the Auto Discovery feature. Like ZWaveJS2MQTT, Zigbee2MQTT.

Moderator: leecollings

Post Reply
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Device type incorrect

Post by roblom »

I've bought this device it works very good and also the auto discovery of this device works. The only thing is that it creates a device which contains the IP address. But probably due to a incorrect device type (custom) the IP number is displayed incorrect.
2023-01-05_00h06_14.png
2023-01-05_00h06_14.png (12.07 KiB) Viewed 5316 times
From the MQTT explorer this info is explored.

Code: Select all

{"name":"IP address","unique_id":"Heatbooster-Hal_ip","object_id":"Heatbooster-Hal_ip","icon":"mdi:map-marker","state_topic":"Heatbooster-Hal/ip","unit_of_measurement":"","device":{"name":"HeatBooster - Heatbooster-Hal","model":"HeatBooster","manufacturer":"SDR Engineering","identifiers":"Heatbooster-Hal","sw_version":"2.1.4","configuration_url":"http://192.168.178.157/"}}
The value seems also send correct.

My question is, how can I change the device type in Domoticz and if that's possible to what do I change it?
User avatar
waltervl
Posts: 5361
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Device type incorrect

Post by waltervl »

I suppose the best device would be a text device. But no idea what to do with MQTT Autodiscover to have it create a text device.
Did you write the MQTT interface yourself? Are you able to change the payload configuration?
You can check the MQTT AD source code to find out the correct message payload. https://github.com/domoticz/domoticz/bl ... scover.cpp
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Device type incorrect

Post by roblom »

I did not write the MQTT interface myself. The autodiscovery is in most cases written for Home Assistant I think and that it sort of works in Domoticz is more a coincident than that it is verified. I don't have enough knowledge of this to be able to change it that this is recognised as a text device.
pikassent
Posts: 16
Joined: Saturday 03 December 2022 16:26
Target OS: Linux
Domoticz version: 2024.4b
Location: Spain
Contact:

Re: Device type incorrect

Post by pikassent »

Hi,
You need

Code: Select all

"unit_of_measurement":"text"
to get it as Text device by MQTT Auto Discovery
User avatar
gizmocuz
Posts: 2394
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Device type incorrect

Post by gizmocuz »

To change the unit you can press 'edit' and change it, but something else is wrong with the full IP address it seems.

Could you please post the complete config topic as well, as well as the contents of

Heatbooster-Hal/ip
Quality outlives Quantity!
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Device type incorrect

Post by roblom »

gizmocuz wrote: Sunday 07 January 2024 11:25 Could you please post the complete config topic as well, as well as the contents of
Heatbooster-Hal/ip
I would like to but how / where do I do that?
User avatar
gizmocuz
Posts: 2394
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Device type incorrect

Post by gizmocuz »

You could follow the below wiki page

https://www.domoticz.com/wiki/MQTT_AD_Report_Problems
Quality outlives Quantity!
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Device type incorrect

Post by roblom »

I hope this is the information that is needed..

Code: Select all

homeassistant/sensor/Heatbooster-Hal/Heatbooster-Hal_ip/config

Code: Select all

{"name":"IP address","unique_id":"Heatbooster-Hal_ip","object_id":"Heatbooster-Hal_ip","icon":"mdi:map-marker","state_topic":"Heatbooster-Hal/ip","value_template":"{{ value | string }}","device":{"name":"HeatBooster - Heatbooster-Hal","model":"HeatBooster","manufacturer":"SDR Engineering","identifiers":"Heatbooster-Hal","sw_version":"v2.4.6","configuration_url":"http://192.168.178.11/"}}
2024-01-27_17h43_43.png
2024-01-27_17h43_43.png (98.56 KiB) Viewed 2278 times
User avatar
gizmocuz
Posts: 2394
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Device type incorrect

Post by gizmocuz »

Thank you, that's indeed the information I was looking for!

It is correct domoticz makes it a custom sensor.. it does not know how to interpretate the data as there is no 'unit_of_measurement' in the config object.
I assume this should be set to 'text' ...

Not sure if you are able to do this.

If not, best to ignore this device... you probably know it's IP address by now
Quality outlives Quantity!
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Device type incorrect

Post by roblom »

I have another one coming from the OTGW.

Code: Select all

MQTT2domoticz/sensor/OTGW-V2/CHPressure/config

Code: Select all

{
"avty_t": "OTGW/value/OTGW-V2", 
"dev": {"identifiers": "OTGW-V2", 
"manufacturer": "Schelte Bron", 
"model": "otgw-nodo", 
"name": "OpenTherm Gateway (OTGW)", 
"sw_version": "0.10.2+50c3ed2 (14-03-2023)"}, 
"uniq_id": "OTGW-V2-CHPressure", 
"name": "OTGW_Water_pressure_in_CH_circuit", 
"stat_t": "OTGW/value/OTGW-V2/CHPressure", 
"unit_of_measurement": "bar", 
"value_template": "{{ value }}", 
"state_class" : "measurement" 
}
The unit_of_measurement is set but it shows up as custom device with bar on the axis label (see below) instead of pressure device.
2024-02-11_20h13_30.png
2024-02-11_20h13_30.png (12.12 KiB) Viewed 1513 times
Is this a issue on the Domoticz side or is there something missing on the OTGW side? And how can I check this, because on this OTGW there are more devices incorrect?


Besides the above, as a small note; the unit of the pressure device in Domoticz is on "Bar" the SI unit is "bar".
2024-02-11_20h23_02.png
2024-02-11_20h23_02.png (10.86 KiB) Viewed 1513 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests