Start a new topic

Toggle picture

I would like to indicate a status (0/1, no progress bar) to indicate if an element in the on or of status with a picture (eg a light bulb in 2 different states)

Currently it is not possible with a picture (it has no value, so you cannot switch), and you cannot do this with a button (you can... but you cannot disable the butten)


I would be great to have

- a picture with different states

- or a butten that you can disable (but where you still can change the status by code)




ok, i found a solution.


you can make use from the tsw function (Enable/disable component touch function) to disable a button.

(add this command in the preinitialize event page for the page)

In this way you can disable the button, but still update the value (and switch the picture)

Hi Steven,

or even more simple, just use a DualState Button as Status-Indicator. The trick is to decouple the real e.g. Bulb-Status from the Button-Status. This will let your DualState stay active, but won't visually react on clicks ...
Something like attached ...

Regards

Gerry

 

HMI
(21.5 KB)
or even more simple ...
as we know, embedded systems are always limited in ressources. Every "more" on Objects, every "more" on logic is also a steady source for unexpected things ... especially in large projects ...
so, here just a solution without any Status-Indicator Object ... but doing exactly the same than in previouse HMI ...

btw. both solutions are done in editor version 0.32 ... without any need for more ...

Regards

Gerry

 

HMI

Thanks Gerry for the examples & the explaination !


I've now only one status (that from the bulb). and this status is updated externally via an MQTT message (feedback & real status of the bulb)

To switch the bulb on/off there is just a button that sends a command based on the status of the bulb (toggle)


My nextion is connected with an ESP8266 (Wemos module) that converts the serial message form the nextion to a mqtt message to activate a switch and visa versa (switch gives a message back to update the status)

(Raspberry Pi acting as an MQTT server and multiple ESP8266 modules sending & receiving mqtt messages)




I am now reviewing all of the Feature Requests, this will take some time, patience please.

Although this wasn't a real feature request, it is now marked as reviewed.


Future questions should be posted to the Free Chat Section

Login or Signup to post a comment