Help: LUA Script for sensor multiplyed by value

Moderator: leecollings

Post Reply
Lillios
Posts: 8
Joined: Sunday 04 December 2016 22:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Help: LUA Script for sensor multiplyed by value

Post by Lillios »

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 1153 times
User avatar
ycahome
Posts: 248
Joined: Sunday 12 February 2017 10:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Help: LUA Script for sensor multiplyed by value

Post by ycahome »

try something like this:

WattMetricKW = tonumber(WattMetric)/1000
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest