This forum has helped me countless times.
I hope this post will help someone as well.
I'm always looking for something new, especially now in lockdown time. For another project I needed a permanent weight monitor (not for the pounds I gain during Corona ).
I didn't want to set up an extra system for that, so I looked at Domoticz to see if I could do it.
This digital wifi scale is the result:
Digital wifi scale
You need the following things:
- A smal wifi-borad ESP8266 (e.g. D1 Mini NodeMcu mit ESP8266-12F WLAN Module CH340G)
- A Load Cell with HX711 Board (e.g. Weight Sensor Set 1kg - 200kg + HX711 ADC)
- A USB Data Cabel (no charging-cabel)
Costs: ~ 10€ (only)
and a MQTT Broker
i already have a mqtt server in use, because i use it to import other things like my electricity meter, or current corona data to domoticz.
And Domoticz of course
Connect the load cell cables to the HX711 module as follows:
• Red on E+
• Black on E-
• White on A-
• Green on E+
And the amplifier board to the NodeMCU microcontroller.
HX711 amplifier NodeMCU board pin
GND GND
DT D6
SCK D5
VCC 5V
You can also use other ports (e.g D1 % D2)
Thats all
Now it's time to programm this little board.
Don't be affraid, you need no knowledge about Programing or Arduino
There is a great software for IoT to make such thing smart. And it's very easy:
The Software is called Tasmota
Downlaod the flashing-tool Tasmotizer: https://github.com/tasmota/tasmotizer
it brings everything you need
Connect the ESP8266 to your PC
Start Tasmotizer:
Select the COM Port
Select Image (Release --> tasmota-sensors)
Check Self-resetting device
-->Click Tasmotize!
After a few seconds:
Send Config:
Activate wifi and mqtt and fill in your Data
Done:
After a few seconds , click on Get IP to get the IP-Address:
Go to the device website and toggle on:
Configure Module:
Choose Generic (18) and save
Go to configure module again and set up your input PINs:
In my case D6 (GPIO12) = HX711 DAT
And D12 (GPIO14) = HX711 SCK
Click Save
Now you see HX711 Weight in the Main Menu with some value:
We have to configure and calibrate the settings:
Calibrate:
you need a known weight which fits to your scale. maybe a small water bottle or something similar
In my case i use a little bottle with 300gr
Click Console and type Sensor34 2 300 and follow the instructions
(2 = Calibrate)
(300 = 300 weight)
Maybe you need more then 1 try
Set up the resulution
Weightres 3
(for 3 decimal points)
Now you get your weight:
Domoticz:
Create a virtuell sensor (Typ: scale)
Get the IDX from the Sensor:
and now it is time to get the data from the scale in Domoticz.
Go again to the Tasmota Console:
And create a Rule to send the value via mqtt to domoticz standard topic
Rule1 on tele-HX711#Weight do publish domoticz/in {"idx":664,"nvalue":0,"svalue":"%value%"} endon
Use the idx from your fresh created virtual sensor
I think the standard update-interval is 20 sec. You can configure it with the command teleperiod x (x=seconds you want)
After a few seconds you get the value in your Domoticz!
It's also possible to use a generic custom sensor. I think this one is better when you need a protocol
Attention:
If you power off the ESP8266, you have to calibrate the loadcell at the next start again
let me know what you think about it
best regards
lazarus
Digital wifi scale Tasmota (ESP8266)
Moderator: leecollings
-
- Posts: 17
- Joined: Thursday 14 December 2017 23:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Digital wifi scale Tasmota (ESP8266)
Ciao volevo chiedere una consulenza, ovvero questa soluzione qui funziona solo con wify locale, ovvero posso vedere i dati da remoto su un'altra wify?
E' possibile trasmettere i dati via MQTT ad un portale diverso .... io non riesco, ovvero ho creato dei feed su io.adafruit.com ma la trasmissione mi da errori
E' possibile trasmettere i dati via MQTT ad un portale diverso .... io non riesco, ovvero ho creato dei feed su io.adafruit.com ma la trasmissione mi da errori
Re: Digital wifi scale Tasmota (ESP8266)
e' possibile poi impostare un fattore di calibrazione fisso in modo tale da non ripetere la calibrazione ogni volta?
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Digital wifi scale Tasmota (ESP8266)
Sorry we only use English on this forum...
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 112
- Joined: Thursday 08 December 2022 22:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: ROMANIA
- Contact:
Re: Digital wifi scale Tasmota (ESP8266)
is there any chance of not needing calibration after an accidental restart? (power failure, etc.)
-
- Posts: 112
- Joined: Thursday 08 December 2022 22:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: ROMANIA
- Contact:
Re: Digital wifi scale Tasmota (ESP8266)
any news about the necesary of calibration after power lose ?
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Digital wifi scale Tasmota (ESP8266)
If it needs to be done on the Tasmota side please check Tasmota support/forum. Not a lot of chance you will find the answer in Domoticz.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Digital wifi scale Tasmota (ESP8266)
Well helping you a little bit: Play with Sensor34 command. Option 7 will be a good candidate....
https://tasmota.github.io/docs/Commands/#sensors
https://tasmota.github.io/docs/Commands/#sensors
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 1
- Joined: Thursday 26 October 2023 15:12
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Digital wifi scale Tasmota (ESP8266)
Don't you have to have an adress to publish? I have used your description and your rule (Rule1 on tele-HX711#Weight do publish domoticz/in {"idx":664,"nvalue":0,"svalue":"%value%"} endon) with my own idx but I'm not receiving any weight to my device.
Who is online
Users browsing this forum: No registered users and 0 guests