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

Error with DS18B20 Temperature Sensor #12

Open
vgr28 opened this issue Feb 7, 2024 · 6 comments
Open

Error with DS18B20 Temperature Sensor #12

vgr28 opened this issue Feb 7, 2024 · 6 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@vgr28
Copy link

vgr28 commented Feb 7, 2024

Log. Error
7.2.2024, 11:05:04Mqtt Tasmota BridgeFEHLER[Mqtt Tasmota Bridge xxx@Temp. Warmwasser@Temp. Warmwasser@Current Relative Humidity] characteristic value expected valid finite number and received "NaN" (number)
7.2.2024, 11:07:18Mqtt Tasmota BridgeFEHLER[Mqtt Tasmota Bridge xxx@Temp. Warmwasser@Temp. Warmwasser@Current Relative Humidity] characteristic value expected valid finite number and received "NaN" (number)
7.2.2024, 11:10:04Mqtt Tasmota BridgeFEHLER[Mqtt Tasmota Bridge xxx@Temp. Warmwasser@Temp. Warmwasser@Current Relative Humidity] characteristic value expected valid finite number and received "NaN" (number)

Is it regarding the missing Humidity, because it's only Temperature Sensor?

@AtomBaf AtomBaf added bug Something isn't working good first issue Good for newcomers labels Feb 7, 2024
@AtomBaf
Copy link
Owner

AtomBaf commented Feb 7, 2024

Hi
On my side, I only have a DHT11 based device. The typical MQTT message looks like this:

{"Time":"2020-10-31T15:52:28","DHT11":{"Temperature":18.5,"Humidity":34.0,"DewPoint":2.3},"TempUnit":"C"}

I suppose that since you've no humidity and only temperature sensor the message will look like:

{"Time":"2020-10-31T15:52:28","DHT11":{"Temperature":18.5},"TempUnit":"C"}

Or maybe

{"Time":"2020-10-31T15:52:28","DHT11":{"Temperature":18.5,"Humidity":null,"DewPoint":null},"TempUnit":"C"}

If there is only one sensor I can see in the code that indeed it can behave wrongly, I'll look at it.

In the mean time could you please write here the MQTT message content you're receiving from your tasmota enabled device?

@AtomBaf
Copy link
Owner

AtomBaf commented Feb 7, 2024

I think I have a kind of answer from the tasmota doc
The message should look like:

{"Time":"2020-10-31T15:52:28","DS18B20":{"Temperature":18.5},"TempUnit":"C"}

Apparently there are cases when tasmota can have multiple DS18B20 sensors, it is not yet handled so I hope you only have one. I'll fix the problem.

@vgr28
Copy link
Author

vgr28 commented Feb 7, 2024

Thats my Mqtt message

SENSOR = {"Time":"2024-02-07T18:05:03","DS18B20":{"Id":"C265801E64FF","Temperature":56.8},"TempUnit":"C"}

@AtomBaf
Copy link
Owner

AtomBaf commented Feb 7, 2024

Ok, new release v0.12.0 published, you can now use temperature instead of sensor in your homebridge accessory json config file.
I'm closing this issue but feel free to re-open if it is not working!

@AtomBaf AtomBaf closed this as completed Feb 7, 2024
@vgr28
Copy link
Author

vgr28 commented Feb 7, 2024

Hi, thanks but not working. Maybe missunderstanding on my side.

See my config
{
"accessories": [
{
"name": "Temp. Warmwasser",
"type": "temperature",
"url": "mqtt://192.xxx.x.xx:1883",
"topic": "tele/Temp._Warmwasser/temperature",
"accessory": "mqtt-tasmota",
"plugin_map": {
"plugin_name": "homebridge-mqtt-tasmota"
}
}
]
}

@AtomBaf
Copy link
Owner

AtomBaf commented Feb 9, 2024

Your config should look like this:

        {
            "accessory": "mqtt-tasmota",
            "type": "temperature",
            "name": "Temp. Warmwasser",
            "url": "mqtt://192.xxx.x.xx:1883",
            "topic": "Temp._Warmwasser"
        },

where Temp._Warmwasser is the MQTT name setup in Tasmota interface
You probably don't need a plugin map entry
If you're to build the topic yourself, the end is probably SENSOR and not temperature as you can see here

@AtomBaf AtomBaf reopened this Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants