Okos Otthon összefoglaló
Gyorskeresés
Legfrissebb anyagok
- Bemutató Spyra: akkus, nagynyomású, automata vízipuska
- Bemutató Route 66 Chicagotól Los Angelesig 2. rész
- Helyszíni riport Alfa Giulia Q-val a Balaton Park Circiut-en
- Bemutató A használt VGA piac kincsei - Július I
- Bemutató Bakancslista: Route 66 Chicagotól Los Angelesig
Általános témák
LOGOUT.hu témák
- [Re:] [Luck Dragon:] Asszociációs játék. :)
- [Re:] [D1Rect:] Nagy "hülyétkapokazapróktól" topik
- [Re:] [Kolondrum:] Én és a Martes foina, közismertebb nevén a nyest
- [Re:] [bitpork:] Balatoni autós tali 2024
- [Re:] [attilasd:] A laposföld elmebaj: Vissza a jövőbe!
- [Re:] [gban:] Ingyen kellene, de tegnapra
- [Re:] [ldave:] New Game Blitz - 2024
- [Re:] Elektromos rásegítésű kerékpárok
- [Re:] [sziku69:] Fűzzük össze a szavakat :)
- [Re:] [sziku69:] Szólánc.
Szakmai témák
PROHARDVER! témák
Mobilarena témák
IT café témák
Téma összefoglaló
Hozzászólások
Magga
aktív tag
Sziasztok!
van egy ilyen lua script, ami tökéletesen működik jelenleg egy DS18b20 szenzorral:
local heating_probe = 'Nappali'
local thermostat_setpoint = 'Thermo'
local heating_unit = 'futes'
-- Use when a combined sensor (e.g. temperature and humidity) is used
-- Replace in "otherdevices[heating_probe]" to "otherdevices[heating_probe]" by "temp_only" (in the 2nd "if" and in the "elseif".
-- Remove the -- in the next two lines:
--local naartekst = (tostring (otherdevices[heating_probe]))
--local temp_only = (string.sub(naartekst,1,4)) -- the digits (1,4) do point out what characters of the string are needed.
local hysteresis = 0.1
commandArray = {}
-- loop through all the devices
for deviceName,deviceValue in pairs(otherdevices) do
if (deviceName== thermostat_setpoint ) then
if tonumber(deviceValue) < tonumber(otherdevices[heating_probe]-hysteresis) then
if (otherdevices[heating_unit] == "On") then
-- commandArray['SendNotification']='Heating is off'
commandArray[heating_unit]='Off'
print("Heating is Off")
end
elseif tonumber(deviceValue) > tonumber(otherdevices[heating_probe]+hysteresis) then
if (otherdevices[heating_unit] == "Off") then
commandArray[heating_unit]='On'
-- commandArray['SendNotification']='Heating is on'
print("Heating is On")
end
end
end
end
-- loop through all the variables
for variableName,variableValue in pairs(uservariables) do
end
return commandArray
Ha kicserélem a szenzort DHT22-re, azonnal hibaüzenetet kapok, mert az ugye nem csak hőmérsékletet, hanem páratartalmat is mér.
Ezt a részt kellene aktiválni, de nekem nem megy:
-- Use when a combined sensor (e.g. temperature and humidity) is used
-- Replace in "otherdevices[heating_probe]" to "otherdevices[heating_probe]" by "temp_only" (in the 2nd "if" and in the "elseif".
-- Remove the -- in the next two lines:
--local naartekst = (tostring (otherdevices[heating_probe]))
--local temp_only = (string.sub(naartekst,1,4)) -- the digits (1,4) do point out what characters of the string are needed.
Meg tudja valaki oldani ezt nekem???
Mai Hardverapró hirdetések
prémium kategóriában
- iPad Pro 11 WiFi 128GB M1 (3rd gen. 2021) + Apple Pencil 2
- GAMER PC - NZXT - RTX 3060Ti 8GB - i7 7700 - 32GB DDR4 - 500GB M.2 Nvme SSD - 1TB HDD
- BONTATLAN Új Iphone 15 PRO 128-512GB Független 1év Apple GARANCIA Deák Térnél Azonnal Átvehető.
- ÚJ Bontatlan Macbook Pro 16 M3 Pro MAX 14 30GPU 96GB 2TB Magyar billentyűzet Azonnal átvehető.
- 5% kedvezmény a Cammus szimulátor termékeihez.