Page 1 of 1
Re: change on the fly dummy switch displayed data
Posted: Tuesday 31 August 2021 8:40
by waltervl
There is not much to display on a switch besides the state on/off. If the device is reporting back a failed or similar you can set the switch back to the original state. The rest you can log in the log file.
Re: change on the fly dummy switch displayed data
Posted: Tuesday 31 August 2021 21:28
by waltervl
I do not understand you, I am sorry. Domoticz is an home automation system. Not a fast running machine controller with all kind of nice features. So to have feedback from your device you have to send it back. And for a switch the only feedback is the state. If you have a proper protocol you wait for feedback of your device (command failed or not). If you want more for debug purposes you can put it in the log file.
Re: change on the fly dummy switch displayed data
Posted: Thursday 02 September 2021 8:46
by waltervl
In a python plugin and dzVents you can flag a device red as being not responding/out of range.I think it is related to the signal strength value. Or yellow when the battery is low. You could use those 2 color flagging to indicate your needs by Lua (if possible, I have no Lua knowledge).
Re: change on the fly dummy switch displayed data
Posted: Thursday 30 September 2021 15:49
by rrozema
The user interface for domoticz follows mostly an "optimistic pattern": on many -but not all- hardwares you'll find the behavior is that the UI changes state immediately when the user initiates some command. After the command is sent Domoticz queries the hardware for the new state and if this results in another state than expected, the user interface is updated. This depends however very much on the capabilities of the hardware plus on the actual implementation.
I do not think that there is in Domoticz a possibilty to intercept the command before it gets sent to the hardware and based on some logic make the user interface behave differently than it does normally.
What you can do is to make a dummy device show some kind of status depending on the status of other devices in your system. For example, you could add a dummy temperature sensor to show the average temperature measured by all temperature sensors in your home, then put that sensor on some dashboard. To implement this you would add a (dzvents) script to all of your temp sensors and in this script every time one of the sensors changes you calculate the new average temp and update that dummy sensor. Is that what you need?
Re: change on the fly dummy switch displayed data
Posted: Tuesday 21 December 2021 15:24
by waltervl
As indicated you can do this when you create a python plugin out of your json send actions. If Dashticz can do this you should ask in the Dashticz subforum.
Re: change on the fly dummy switch displayed data
Posted: Thursday 23 December 2021 15:48
by madpatrick
You can easily display messages with Dashticz
For example:
Code: Select all
// geeft alarm melding van andere sensor
function getStatus_262(block) {
var Data = block.device.Data;
var idx = block.idx;
var device = block.device;
if(parseFloat(Data) <1.5){
Dashticz.setBlock('regen', {addClass: 'warning'});
block.addClass = 'warning'; // set the addClass parameter for block 262
}
else {
Dashticz.setBlock('regen', {addClass: 'none'});
block.addClass = ''; // reset the addClass parameter for block 262
}
}
viewtopic.php?p=258285#p258285