Page 1 of 1

read the duty cycle value?

Posted: 06 Dec 2022, 08:53
by chromo23
Good morning,

the duty cycle value used in the pwm command must be stored somewhere.
Is there a command to retrieve it?

Re: read the duty cycle value?

Posted: 06 Dec 2022, 10:01
by TD-er
Doesn't it show at the pin state buffer page?
Not sure if that page is also/already available as JSON.

Re: read the duty cycle value?

Posted: 06 Dec 2022, 10:13
by chromo23
Thanks!
And is retrieving the value from there for further processing (sending it somewhere / rules) possible somehow?

Edit:
Not sure if that page is also/already available as JSON.
it isn’t ...

Re: read the duty cycle value?

Posted: 06 Dec 2022, 10:16
by TD-er
Not right now.
But I guess it would make sense to make it available, like the pinstate is.
For example:

Code: Select all

[Plugin#GPIO#Pinstate#13]
See: https://espeasy.readthedocs.io/en/lates ... ing-events
Then scroll up a bit...

Re: read the duty cycle value?

Posted: 26 Dec 2022, 17:02
by judie07
Have you made any progress? ->viewtopic.php?p=61989#p61989

Re: read the duty cycle value?

Posted: 26 Dec 2022, 23:28
by Ath
I have created Pull request #4435 to enable the last set duty-cycle value to be retrieved for (internal) GPIO pins set to PWM or SERVO.