Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong state topic (stat_t) in homeassistant config payload for TPMS-Jansite-Solar #1909

Open
riegelbrau opened this issue Mar 9, 2024 · 2 comments

Comments

@riegelbrau
Copy link

riegelbrau commented Mar 9, 2024

The TPMS-Jansite-Solar is supported by OMG since FSK can be enabled. With OMG 1.60 and 1.70 I face the following behaviour running OMG on a LilyGo. The sensor data is sent with the mqtt topic OMG/OMG_lilygo_rtl_433_ESP/RTL_433toMQTT/TPMS/Jansite-Solar/5e512a and this payload

{
	"model": "Jansite-Solar",
	"type": "TPMS",
	"id": "5e512a",
	"flags": 197,
	"pressure_kPa": 68.8,
	"temperature_C": 18,
	"code": "5e512ac5492b009413",
	"mic": "CRC",
	"protocol": "Jansite TPMS Model Solar",
	"rssi": -75,
	"duration": 21000
}

When ohdisc=true is set, the HASS config message for openHAB is created under this topic: homeassistant/sensor/TPMS-Jansite-Solar-5e512a-pressure_kPa/config (example for pressure).
The payload is

{
	"stat_t": "+/+/RTL_433toMQTT/Jansite-SolarSolar/5e512a",
	"dev_cla": "pressure",
	"name": "pressure",
	"uniq_id": "TPMS-Jansite-Solar-5e512a-pressure_kPa",
	"val_tpl": "{{ value_json.pressure_kPa }}",
	"state_class": "measurement",
	"device": {
		"ids": [
			"TPMS-Jansite-Solar-5e512a"
		],
		"cns": [
			[
				"mac",
				"TPMS-Jansite-Solar-5e512a"
			]
		],
		"mdl": "Jansite-Solar",
		"name": "TPMS-Jansite-Solar-5e512a",
		"via_device": "OMG_lilygo_rtl_433_ESP"
	}
}

As you can see, the json value for stat_t contains the wrong topic +/+/RTL_433toMQTT/Jansite-SolarSolar/5e512a. The type part TPMS is missing and the two consecutive strings SolarSolar look like a typo, where only one should be.

Steps to reproduce the behavior:

  1. Set the config parameter ohdisc to true.
  2. Let the sensor send some data by changing the environment pressure or temperature.
  3. See good looking mqtt message, but wrong HASS config message.

Expected behavior:
The config message should contain "stat_t": "+/+/RTL_433toMQTT/Jansite-Solar/5e512a"

Screenshots
MQTT explorer shows this config message:
grafik

Environment (please complete the following information):

  • OpenMQTTGateway version used: V1.60 self compiled and 1.70 uploaded from the web.
  • Library version related to the problem is rtl_433
    Where do I see the version of RCSwitch library?

Additional context
OMG Information:
grafik```

{

	"latest_version": "v1.7.0",
	"title": "OpenMQTTGateway",
	"release_url": "https://github.com/1technophile/OpenMQTTGateway/releases/tag/v1.7.0",
	"installed_version": "v1.7.0",
	"entity_picture": "https://github.com/1technophile/OpenMQTTGateway/raw/development/docs/img/Openmqttgateway_logo_mini_margins.png",
	"release_summary": ""
}

I posted this in the community earlier without getting any comments: https://community.openmqttgateway.com/t/still-mismatch-between-ha-config-message-and-real-topic-from-rtl-433-esp/2964

Regards, Christoph

@riegelbrau
Copy link
Author

Ther is another mismatch. The state topic in the config message should include TPMS like this: +/+/RTL_433toMQTT/TPMS/Jansite-Solar/5e512a. I did'nt recognize this before.
I will update the original post above, too.

@riegelbrau
Copy link
Author

Any comments or findings regarding this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant