API and documentation (and dummy counter issue)
Posted: Friday 21 October 2016 16:28
Dear all,
Recently I've been messing around with the moonphase script published on the forum. Nice one! To get it working i've added a dummy switch, type counter (simple). I noticed some odd behaviour. Although the counter is perfectly updated with the moonage (in days) the value in the upper right corner of the title is not following the moonage, but is counting all by itself it seems. Could someone please explain me how this calculation takes place? To me it seems random...
However, I've discovered the custom switch. Way better than the abovementioned. You can even change the icon! Since this is possible from within the Domoticz GUI, I wondered if there is any api-command that lets you alter the custom icon. This set me off on a journey in the wiki, where I noticed that the documentation regarding the api-commands seems to be a bit lacking behind. When strolling across the page you gradually become aware of the possible api-calls. In my opinion it would be nice to have a more structured oversight of the diverse calls one can make. Due to the absence of an overview, I was left wondering if the calls mentioned there are all that are available...
For instance, I was unable to find anything regarding the changing of an icon (my aim is to change the icon with the changing of the phase of the moon), so does this mean it not (yet) possible, or is it not documented yet? If not possible yet, is there a chance this will be implemented in the future? If it is already possible, then how do I do it?
Regards,
Wizjos
Recently I've been messing around with the moonphase script published on the forum. Nice one! To get it working i've added a dummy switch, type counter (simple). I noticed some odd behaviour. Although the counter is perfectly updated with the moonage (in days) the value in the upper right corner of the title is not following the moonage, but is counting all by itself it seems. Could someone please explain me how this calculation takes place? To me it seems random...
However, I've discovered the custom switch. Way better than the abovementioned. You can even change the icon! Since this is possible from within the Domoticz GUI, I wondered if there is any api-command that lets you alter the custom icon. This set me off on a journey in the wiki, where I noticed that the documentation regarding the api-commands seems to be a bit lacking behind. When strolling across the page you gradually become aware of the possible api-calls. In my opinion it would be nice to have a more structured oversight of the diverse calls one can make. Due to the absence of an overview, I was left wondering if the calls mentioned there are all that are available...
For instance, I was unable to find anything regarding the changing of an icon (my aim is to change the icon with the changing of the phase of the moon), so does this mean it not (yet) possible, or is it not documented yet? If not possible yet, is there a chance this will be implemented in the future? If it is already possible, then how do I do it?
Regards,
Wizjos