Monitor relay state using Controller Publish – How?
Moderators: grovkillen, Stuntteam, TD-er
Monitor relay state using Controller Publish – How?
We are currently successfully monitoring the state of the relay using rules, but are asking ourselves now:
Is it also possible to push the relay state via „Controller Publish“ (Generic HTTP)? Using which kind of device?
And: Does it provide any advantage over the use of rules?
Is it also possible to push the relay state via „Controller Publish“ (Generic HTTP)? Using which kind of device?
And: Does it provide any advantage over the use of rules?
Re: Monitor relay state using Controller Publish – How?
You can add that Generic HTTP controller, and select it on your device configuration. The %value% placeholder is replaced with the current value of your device.
The advantage is that the rules engine doesn't have to parse the rules files, but executes the compiler code of the controller, so the system load should be lower.
The advantage is that the rules engine doesn't have to parse the rules files, but executes the compiler code of the controller, so the system load should be lower.
/Ton (PayPal.me)
Re: Monitor relay state using Controller Publish – How?
Is there a detailed documentation somewhere on how to enable this?
Correct me if I'm wrong, but I do need to create a Switch input – Switch to reflect the relay state. Problem though is, that I can't select the GPIO-5 to which the relay is connected (see attached image).
On the other hand you said to create a Generic HTTP controller and select it in device config. Created and enabled the credentials, yet it doesn't show up in the list of selectable devices. Hmmm..
Correct me if I'm wrong, but I do need to create a Switch input – Switch to reflect the relay state. Problem though is, that I can't select the GPIO-5 to which the relay is connected (see attached image).
On the other hand you said to create a Generic HTTP controller and select it in device config. Created and enabled the credentials, yet it doesn't show up in the list of selectable devices. Hmmm..
- Attachments
-
- Bildschirmfoto 2021-07-22 um 12.44.45.png (415.21 KiB) Viewed 5676 times
Re: Monitor relay state using Controller Publish – How?
GPIO4 and GPIO5 are configured for I2C communication, by default. If you don't need I2C then you can set both I2C pins to None on the Hardware tab. If you need I2C then use another pin
/Ton (PayPal.me)
Re: Monitor relay state using Controller Publish – How?
Got it working. Thanks.
So back to the second part of my initial question: Is the Controller advantage of the Rules method even noteworthy? I mean how much more CPU load are we we talking about, when using Rules. For me the argument would be energy consumption (I'm using the CPU Eco Mode setting, whenever I can).
So back to the second part of my initial question: Is the Controller advantage of the Rules method even noteworthy? I mean how much more CPU load are we we talking about, when using Rules. For me the argument would be energy consumption (I'm using the CPU Eco Mode setting, whenever I can).
Re: Monitor relay state using Controller Publish – How?
In that case I'd try to bring the processing of rules to a minimum if you can, as parsing those text files and interpreting the action is rather cpu-intensive. Minimizing that will (sounds logical to me ) extend battery-life.
/Ton (PayPal.me)
Re: Monitor relay state using Controller Publish – How?
No battery here, 230V PSU. But every tenth of a Watt counts on a 24/7/365 scale.
Re: Monitor relay state using Controller Publish – How?
Don't forget to multiply it with the number of installed units running ESPEasy
Re: Monitor relay state using Controller Publish – How?
I'm not making fun of you, only with you
kWh prices are lower than they have been in NL.
Prices of gas have been rising.
30 ct/kWh is quite a lot more than we have.
It used to be roughly 2 euro per Watt per year (easy number to estimate costs per year of a device).
Now it is slightly less.
kWh prices are lower than they have been in NL.
Prices of gas have been rising.
30 ct/kWh is quite a lot more than we have.
It used to be roughly 2 euro per Watt per year (easy number to estimate costs per year of a device).
Now it is slightly less.
Re: Monitor relay state using Controller Publish – How?
2 Euro per Watt annually? What kind of strange meters do you have in there in the NL? Watts/p.a. instead kWh? You are kidding me...
Anyhow: 1 Watt * 24 * 365 = 8,76 kWh. So, that’s € 0,228. Green power or fossil?
Anyhow: 1 Watt * 24 * 365 = 8,76 kWh. So, that’s € 0,228. Green power or fossil?
Re: Monitor relay state using Controller Publish – How?
@TD-er
Actually, when looking into CPU Load differences Rules vs. Controller, I realized that CPU Load with the same settings (CPU Eco, Rules disabled, ...) I had constantly 6% load on a 2020something release, while the same settings under 20210615 show a constant 15% load. Any idea why?
Also: What's your opinion on Rules vs. Controller?
Actually, when looking into CPU Load differences Rules vs. Controller, I realized that CPU Load with the same settings (CPU Eco, Rules disabled, ...) I had constantly 6% load on a 2020something release, while the same settings under 20210615 show a constant 15% load. Any idea why?
Also: What's your opinion on Rules vs. Controller?
Re: Monitor relay state using Controller Publish – How?
Well it is not a metric used by the power company.
It is a rule-of-thumb I use myself for close to a decade already
You can estimate the nr of hours it is on per day and the power in Watt when on.
So you can compute the yearly costs out of the top of your head.
And consumer prices for electricity were roughly 0.21 ct per kWh a few years back.
About 2 years ago it went down to 0.18ct/kWh. (when they increased taxes on gas, so that the average household bill would be the same)
Not sure though what it is now.
Still, 2 euro per Watt per year is a good rule of thumb.
There are lots of those practical factors which help you to estimate things quickly.
e.g. 100 Mbps traffic = 1 TB per 24h.
The Netherlands is 2-by-3 ms in size (ping)
Who is online
Users browsing this forum: No registered users and 42 guests