Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR][PZEM004T] Number of values #4953

Open
pkakakozi opened this issue Jan 25, 2024 · 1 comment
Open

[FR][PZEM004T] Number of values #4953

pkakakozi opened this issue Jan 25, 2024 · 1 comment
Labels
Type: Not a bug Issues that later appeared not to be a bug (e.g. user error) Type: Question Question about how something works with concrete answers

Comments

@pkakakozi
Copy link

Hi.
Is there a chance to make a choice how many values within an output configuration is send to a controller ( 1-4 ) ?
I'm having difficulties in domoticz to receive data through an idx value and have to send it by some rules witch results a high load.
I would be very appreciated.
BTW plugin itself works great.
Best regards.

@TD-er
Copy link
Member

TD-er commented Jan 25, 2024

The rules should not be causing a high load.
Especially not when you create a MQTT message.

But you could also use the rules to 'copy' the values to dummy tasks and then call taskrun on those tasks to send those values to Domoticz with their own IDX value.

So you don't send to the Domoticz controller via the PZEM task (or keep it if it does work to send the 1st task value)
Maybe good to check the checkbox to send a single event with all task values in the PZEM task.

Then you create the separate dummy tasks, each linked to the Domoticz controller with their own IDX.

For example you have a PZEM task called "pzem"
With the checkbox to send all values as a single event, you will get an event named "pzem#All"

Let's assume you have dummy tasks at task index 2, 3 and 4

Rules can be something like this:

on pzem#all do
  taskvaluesetandrun,2,1,%eventvalue2%
  taskvaluesetandrun,3,1,%eventvalue3%
  taskvaluesetandrun,4,1,%eventvalue4%
endon

This assumes you can still send the first task value of the PZEM task from the task itself to Domoticz

@TD-er TD-er added Type: Question Question about how something works with concrete answers Type: Not a bug Issues that later appeared not to be a bug (e.g. user error) labels Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Not a bug Issues that later appeared not to be a bug (e.g. user error) Type: Question Question about how something works with concrete answers
Projects
None yet
Development

No branches or pull requests

2 participants