Node Red to device Domoticz

Hi,

How can I send a value to Domoticz with a function Node?
I have a Domoticz Device type "General,kWh" with IDX=522 and I want to have the value what is send with the inject Node in Domoticz Device "Today kWh"

Thanks

Hello @RobTester

From the screenshot I cannot see, whether you inject a number or a string ( 10 or "10")
Also I do not know what you Inject (usage in Watt or cumulative usage in Wh) and how your value should be handled (computed or from device).

Let's assume that you inject usage in Watt and that it is a number.

The contents of the "Function" node would be:

msg.payload = {"command":"udevice","idx":522,"nvalue":0,"svalue":(msg.payload.toString() + ";0")};
return msg

Regards

Hi @FireWizard52

Thank you for the example.
The value I am reading in is the total solar panel energy delivered from my solar panels on the roof and on the garage. The output of this is only a string, which should represent the value of the total delivered energy kW. This kW indication should then also be presented in the Domoticz device. Currently I get the value in Watts. The intention is that I can see in the Log of the Device per day how much my solar installation has produced.

Regards

Hello @ RobTester.

You wrote:

The output of this is only a string, which should represent the value of the total delivered energy kW

The electric sensor in Domoticz will show the current production of electricity in Watt and the cumulative usage in kWh. However the cumulative production is in Wh (even though it is displayed in kWh)

Currently I get the value in Watts.

That is okay, as Domoticz will calculate the total production.

Can you post a screenshot of the payload, you receive from your solar panels?

Just to avoid that this thread will discuss Domoticz issues and not NR, I suggest that you go to the Domoticz forum and contact me there.(FireWizard)

Regards

Hi @FireWizard52,

I have opened a treat on the Domoticz forum under General discusions

Thanks

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.