Help: LUA Script for sensor multiplyed by value

Post Reply
Lillios
Posts: 2
Joined: Sunday 04 December 2016 23:07
Target OS: Raspberry Pi
Domoticz version:
Contact:

Help: LUA Script for sensor multiplyed by value

Post by Lillios » Monday 02 January 2017 21:25

Hey.

I would like some help making a dummy sensor.
I have a Co2 senor connected to my raspberry that is running Domoticz.

The value from the Co2 sensor is not showing up correct, and needs to be multiplyed by x50.

How do i type a LUA to write the value from that sensor and x50 to my Dummy?
The value in this screenshot should be 7,9x50=395ppm

I a complete novice on makeing scipts :roll:
Attachments
Untitled.jpg
Untitled.jpg (32.68 KiB) Viewed 850 times

User avatar
ycahome
Posts: 198
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Help: LUA Script for sensor multiplyed by value

Post by ycahome » Sunday 12 February 2017 14:25

try something like this:

WattMetricKW = tonumber(WattMetric)/1000

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest