aderusha / HASwitchPlate

LCD touchscreen for Home Automation
MIT License
732 stars 128 forks source link

Control without MQTT? #78

Closed m14t closed 4 years ago

m14t commented 4 years ago

Question

Is it possible to adjust the backlight level when the MQTT server is unavailable?

Back story

I live in CA and am effected by the fire preventive power shutoffs. When this is scheduled, I proactively power down a bunch of things, like the MQTT server that my HASwitchPlate connects to in order to save the UPS it's connected to for other things.

However, when this happens, the HASwitchPlate displays the wifi information and sets the backlight to what looks like 100%. This plate is in our bedroom and so ideally we would be able to control/dim this backlight.

--

Thanks again for all the work here! This is one of the first things I look at every morning. I love it.

petergreis commented 4 years ago

In the pre-initialize for my 7” panel I have the following:

thup=1

thsp=120

This blanks the panel after 120 seconds of no input. The first touch thereafter turns the panel back on, the next touch is passed on normally. Perhaps this would help you?

From: Matt Farmer notifications@github.com Reply to: aderusha/HASwitchPlate reply@reply.github.com Date: Sunday, 27 October 2019 at 03:44 To: aderusha/HASwitchPlate HASwitchPlate@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [aderusha/HASwitchPlate] Control without MQTT? (#78)

Question

Is it possible to adjust the backlight level when the MQTT server is unavailable?

Back story

I live in CA and am effected by the fire preventive power shutoffs. When this is scheduled, I proactively power down a bunch of things, like the MQTT server that my HASwitchPlate connects to in order to save the UPS it's connected to for other things.

However, when this happens, the HASwitchPlate displays the wifi information and sets the backlight to what looks like 100%. This plate is in our bedroom and so ideally we would be able to control/dim this backlight.

--

Thanks again for all the work here! This is one of the first things I look at every morning. I love it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/aderusha/HASwitchPlate/issues/78?email_source=notifications&email_token=ABBDJJ4OOWUNLZIQ2FCGM5DQQT6BRA5CNFSM4JFPYEM2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HUSNE6A, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBDJJ4XFUY232XXXU52LJ3QQT6BRANCNFSM4JFPYEMQ.

aderusha commented 4 years ago

The comment above shows one way to deal with the specific nature of the issue raised. Also, the ask for "control without MQTT" is now fulfilled via telnet. The telnet client allows you to send commands to the Nextion panel without MQTT being active.

Thoky81 commented 4 years ago

@petergreis Hi, can you please explain where to put thup=1 thsp=120 in nextion editor? I have done something but the display dont want to sleep - just restart. Plus, when I tried to simulate it on nextion, it was working no issue. Thanks

petergreis commented 4 years ago

Certainly, it goes in the Preinitialize Event. For example, I have this:

bauds=115200

vis 3,0

thup=1

thsp=120

sendme

best regards

Peter

From: Thoky81 notifications@github.com Reply to: aderusha/HASwitchPlate reply@reply.github.com Date: Monday, 10 August 2020 at 22:17 To: aderusha/HASwitchPlate HASwitchPlate@noreply.github.com Cc: Peter Greis peter.greis@freethinker.com, Mention mention@noreply.github.com Subject: Re: [aderusha/HASwitchPlate] Control without MQTT? (#78)

@petergreishttps://github.com/petergreis Hi, can you please explain where to put thup=1 thsp=120 in nextion editor? I have done something but the display dont want to sleep - just restart. Plus, when I tried to simulate it on nextion, it was working no issue. Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/aderusha/HASwitchPlate/issues/78#issuecomment-671566723, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBDJJ7756OB6SRK457QIM3SABIT3ANCNFSM4JFPYEMQ.

Thoky81 commented 4 years ago

@petergreis Thanks its working now.