Report GPIO PWM change

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
henfri
Normal user
Posts: 13
Joined: 26 May 2018, 15:53

Report GPIO PWM change

#1 Post by henfri » 25 Jan 2021, 09:54

Hello,

I am sending commands to my ESPEasy via http:
e.g. PWM,14,307

I want to switch to MQTT for this and I think I'll manage.
But can I also get a feedback via MQTT?
I would like the current PWM value of GPIO reported via MQTT on change or on a regular basis. Is that possible?

Regards,
Hendrik

TD-er
Core team member
Posts: 9901
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Report GPIO PWM change

#2 Post by TD-er » 25 Jan 2021, 10:13

You can try to use the "monitor,14" command on that pin GPIO14, but I am not entirely sure it will generate an event like you want it to.
So better not add the monitor command in the boot event of your rules, but first try it on a test event and then fire this test event to try (so you can reboot to fix it)
Or just give the "monitor,14" command via the command box on the Tools page.

henfri
Normal user
Posts: 13
Joined: 26 May 2018, 15:53

Re: Report GPIO PWM change

#3 Post by henfri » 29 Jan 2021, 17:20

Hello,

thanks for your reply.
I tried monitor,14 . But that does not work, although the documentation says it should:
https://espeasy.readthedocs.io/en/lates ... mmand.html
Monitor,<GPIO>

GPIO: 0 … 16
In fact, it should be:
Monitor,GPIO,<GPIO>

GPIO: 0 … 16
I think.

But then, this may create an event that I then need to use in rules, correct?

When trying around, I noticed, that without any additional configuration, ESPEasy already sends some Status information via mqtt that contains the required information:

Code: Select all

{
"log": "GPIO 14 Set PWM to 358",
"plugin": 1,
"pin": 14,
"mode": "PWM",
"state": 358
}
So that's solved.

If I may, I have some more feedback:
1) the link to sponsor you is broken: https://betaalverzoek.rabobank.nl/betaa ... n5GEvWDKlg ; it says that it is not active anymore
2) there seems to be two documentations: https://espeasy.readthedocs.io/en/lates ... mmand.html and https://www.letscontrolit.com/wiki/index.php/Main_Page. That is a bit confusing.
3) I think, the website (https://www.letscontrolit.com/) could reflect a bit more the cool features that ESPEasy has. I understand that you look for support (monetary) in developing ESPEasy. More users -> more potential monetary support. But for that, some marketing could help (as the product is great already).

Greetings,
Hendrik

TD-er
Core team member
Posts: 9901
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Report GPIO PWM change

#4 Post by TD-er » 29 Jan 2021, 18:33

Point 1 should now be fixed :)
I will set a reminder as the link expires every N weeks.

The wiki is indeed the older version of the docs and I already put some warnings over there.
But not all documentation has been converted yet. (and updated)

About the exposure... couldn't agree more, but coding and forum/GitHub already take up all my time.
I do plan on making some YouTube videos to describe specific use cases to show how it is done and also explain how to come to the chosen steps as there are quite a few often recurring questions and very likely even more users spending a lot of their time to find it out on their own without asking on the forum (or actually able to find the topics describing it)

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests