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

LYWSD03MMC as remote display from esphome - show ONLY remote data? #380

Closed
landrysik opened this issue Sep 19, 2023 · 5 comments
Closed

Comments

@landrysik
Copy link

landrysik commented Sep 19, 2023

Hi, I have been experimenting with LYWSD03MMC as remote display for Home Assistant via esphome node.
https://esphome.io/components/display/pvvx_mithermometer.html

I tried changing measure interval and min. lcd update interval but I can't find out how to display ONLY the data sent from esphome. The display keeps changing between the remote data and locally measured temperature and humidity.
Is there any way how to show JUST the remote data and suppress the local measurements? I want to display outdoor temperature I get from another sensor and the switching between this and local measurements make the display confusing.
Thanks a lot

@pvvx
Copy link
Owner

pvvx commented Sep 20, 2023

The thermometer has the ability to work directly with a liquid crystal buffer. The command "60xxxx..."
The transferred buffer is displayed until the connection is completed or the command "6100" is transmitted (switches to the standard display).
A description of the binding of the byte number and the bit number in the buffer to the LCD segments is given in the source headers for each type of thermometer. Example: https://github.com/pvvx/ATC_MiThermometer/blob/master/src/lcd_lywsd03mmc.c#L10

JS example: https://github.com/pvvx/pvvx.github.io/blob/master/ATC_MiThermometer/TelinkMiFlasher.html#L1988 :

const lcd_digcode = [0xf5,0x05,0xd3,0x97,0x27,0xb6,0xf6,0x15,0xf7,0xb7];
function lcd_clock() {
	let date = new Date();
	let hours = date.getHours();
	let minutes = date.getMinutes();
	let lcdb = new Uint8Array(7);
	lcdb[0] = 0x60;
	lcdb[1] = lcd_digcode[parseInt(minutes % 10)];
	lcdb[2] = lcd_digcode[parseInt(minutes / 10)];
	lcdb[4] = lcd_digcode[parseInt(hours % 10)];
	lcdb[5] = lcd_digcode[parseInt(hours / 10)];
	addClog("Send cmd (60): Set LCD data");
	settingsCharacteristics.writeValue(lcdb).then(_ => {addClog('Send data ok'); addLog("Send 'Send clock data on LCD' ok");});
}

@pvvx
Copy link
Owner

pvvx commented Sep 20, 2023

In the new version 4.4 (current status: beta), the option to display only external data will be added when the display time value is set to 65535 seconds. Permanent display, until reboot.

@landrysik
Copy link
Author

Excellent! Thank you. I've tested the beta firmware and it works like a charm!

@pvvx pvvx closed this as completed Sep 20, 2023
@udavst
Copy link

udavst commented Sep 30, 2023

Minimum LCD refresh rate: 12.75 - это максимум, который устанавливается, как установить 65535?

@landrysik
Copy link
Author

@udavst You put those 65535 to the system you use to provide data for the display. NOT in the configuration of the firmware itself. In the case of esphome you put validity_period: 65535s

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

3 participants