Hello,
i see what reset PZEM-004T with http://*espeasyip*/control?cmd=resetenergy,*PZEM address*
but in rules , i can use sendtohttp or other function ??
thank
reset PZEM-004T in rules
Moderators: grovkillen, Stuntteam, TD-er
Re: reset PZEM-004T in rules
In plain rules, that command would be:
Code: Select all
on ResetButton#State=0 do // Push-button, low on active
resetenergy,*PZEM address*
endon
The form you used is for controlling the action remotely, f.e. from a browser or external http-enabled application.
NB: You shouldn't try to do a sendtohttp command to the ESPEasy unit (self) where this command is activated, that will block execution of the command (time-out).
/Ton (PayPal.me)
Re: reset PZEM-004T in rules
ok ,thank you
I use it to safely control a sliding gate , I'm going to do a reset every time I stop sliding gate
I use it to safely control a sliding gate , I'm going to do a reset every time I stop sliding gate
Re: reset PZEM-004T in rules
Just FYI, you should not try to use sendtohttp calls from rules to the node itself.
I've seen people try doing this and your initial question suggests you may have thought of this yourself
But from rules you can call any command supported in ESPEasy.
Commands initiated from remote sources cannot call all commands as some are 'restricted', based on the origin of the command call.
For example a call to reset factory default should not be made from an external source.
If you really want to do this, you should put it in the rules and trigger an event to do so.
We really try to prevent users to shoot themselves in their foot/feet, but if you really want/need to, you can do it
I've seen people try doing this and your initial question suggests you may have thought of this yourself
But from rules you can call any command supported in ESPEasy.
Commands initiated from remote sources cannot call all commands as some are 'restricted', based on the origin of the command call.
For example a call to reset factory default should not be made from an external source.
If you really want to do this, you should put it in the rules and trigger an event to do so.
We really try to prevent users to shoot themselves in their foot/feet, but if you really want/need to, you can do it
Re: reset PZEM-004T in rules
That is exactly how it is NOT to be used from the PZEM unit!
From another ESPEasy unit you can also use "SendTo,UnitNr-pzem,resetenergy,pzem-bus-address",
that's assuming you have the P2P network configured (default it should be enabled) and all ESPEasy units have a unique unit number, between 1 and 254.
Edit: That watt67 user turned out to be a spammer/troll (not sure if there's a difference... ), but as some ppl may have read his poor response I'll leave my answer here to mitigate that
/Ton (PayPal.me)
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest