Hi,
I have connected two (or more) ds18b20 temp sensors to a Wemos d1 mini.
Flashed Tasmota, configured MQTT to data to Domoticz.
The temperatures are shown in the Tasmota screen with correct values.
Everything is fine so far.
The problem is that I only configure one idx in the Tasmota configuration for a temp sensor.
I have searched the web but did not found a working solution.
Found an article to use rules but this didn't work.
Is there anybody who can give me advice on how to solve this problem.
If solved I want to connect even more temperature sensor to the Wemos.
Many thanks in advance.
Regrads, Albert
Multiple ds18b20 on Wemos d1 with MQTT & Domoticz
Moderator: leecollings
-
- Posts: 5
- Joined: Friday 02 November 2018 0:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Multiple ds18b20 on Wemos d1 with MQTT & Domoticz
Solved this problem.
Use rules in the console of the tasmota.
Rules voor Tasmota with three DS18B20
Do not set IDX nummer in Domoticz configuration of your Tasmota.
Rule1 1 <Enter>
Rule1
on tele-DS18B20-1#Temperature do publish domoticz/in {"idx":233,"svalue":"%value%"} endon
on tele-DS18B20-2#Temperature do publish domoticz/in {"idx":234,"svalue":"%value%"} endon
on tele-DS18B20-3#Temperature do publish domoticz/in {"idx":235,"svalue":"%value%"} endon
<Enter>
To remove rule and set Tasmota to default.
Rule1 " <Enter>
Rules voor two Tasmota AM2301
Rule1 1 <Enter>
Rule1
ON tele-am2301-00#temperature DO var1 %value% ENDON
ON tele-am2301-00#humidity DO publish domoticz/in {"idx":238,"svalue":"%var1%;%value%;1"} ENDON
ON tele-am2301-05#temperature DO var1 %value% ENDON
ON tele-am2301-05#humidity DO publish domoticz/in {"idx":237,"svalue":"%var1%;%value%;1"} ENDON
<Enter>
Example in Tasmota wiki
https://tasmota.github.io/docs/Rules/
Use of variables and tele- in Domoticz
Using variables allows for storing sensor results to be used in composing a single HA message like used with Domoticz. To prevent flooding Domoticz with messages we only want to send a message at TelePeriod time. This is achieved by prefixing the <SensorName> with the label tele-. This example will use a variable storing the temperature to be used together with humidity in one Domoticz MQTT message.
Domoticz configured with a virtual sensor Temp+Hum using Idx 134
Rule
Rule
ON tele-am2301-12#temperature DO var1 %value% ENDON
ON tele-am2301-12#humidity DO publish domoticz/in {"idx":134,"svalue":"%var1%;%value%;1"} ENDON
Result - As a result of the tele- prefix the rules will be checked at TelePeriod time for sensor AM2301-12 Temperature and Humidity. The first rule will use the Temperature stored in %value% and save it in %var1% for future use. The second rule will use the Humidity stored in %value% and the Temperature stored in %var1% to compose a single MQTT message suitable for Domoticz.
Use rules in the console of the tasmota.
Rules voor Tasmota with three DS18B20
Do not set IDX nummer in Domoticz configuration of your Tasmota.
Rule1 1 <Enter>
Rule1
on tele-DS18B20-1#Temperature do publish domoticz/in {"idx":233,"svalue":"%value%"} endon
on tele-DS18B20-2#Temperature do publish domoticz/in {"idx":234,"svalue":"%value%"} endon
on tele-DS18B20-3#Temperature do publish domoticz/in {"idx":235,"svalue":"%value%"} endon
<Enter>
To remove rule and set Tasmota to default.
Rule1 " <Enter>
Rules voor two Tasmota AM2301
Rule1 1 <Enter>
Rule1
ON tele-am2301-00#temperature DO var1 %value% ENDON
ON tele-am2301-00#humidity DO publish domoticz/in {"idx":238,"svalue":"%var1%;%value%;1"} ENDON
ON tele-am2301-05#temperature DO var1 %value% ENDON
ON tele-am2301-05#humidity DO publish domoticz/in {"idx":237,"svalue":"%var1%;%value%;1"} ENDON
<Enter>
Example in Tasmota wiki
https://tasmota.github.io/docs/Rules/
Use of variables and tele- in Domoticz
Using variables allows for storing sensor results to be used in composing a single HA message like used with Domoticz. To prevent flooding Domoticz with messages we only want to send a message at TelePeriod time. This is achieved by prefixing the <SensorName> with the label tele-. This example will use a variable storing the temperature to be used together with humidity in one Domoticz MQTT message.
Domoticz configured with a virtual sensor Temp+Hum using Idx 134
Rule
Rule
ON tele-am2301-12#temperature DO var1 %value% ENDON
ON tele-am2301-12#humidity DO publish domoticz/in {"idx":134,"svalue":"%var1%;%value%;1"} ENDON
Result - As a result of the tele- prefix the rules will be checked at TelePeriod time for sensor AM2301-12 Temperature and Humidity. The first rule will use the Temperature stored in %value% and save it in %var1% for future use. The second rule will use the Humidity stored in %value% and the Temperature stored in %var1% to compose a single MQTT message suitable for Domoticz.
Who is online
Users browsing this forum: No registered users and 1 guest