Creasol, italian electronic design company since 2001 Creasol, italian electronic design company since 2001
  • Home
  • Domotica
  • Universele ontvangers
  • Afstandsbedieningen
  • PDF-catalogusPDF-catalogus
  • Koop online
  • Steun
    • Domotica, Smart Home, IoT
    • Radiografische afstandsbedieningen en zenders
    • Universele ontvangers
    • Linux
  • Info
    • About us
    • Ecologische voetafdruk
    • Terms of Service
    • Privacy- en Cookiebeleid
    • Elektronisch advies
      • Multimedia
      • RF and microwave
      • Medical
      • Industrial
      • Automotive
      • Security
      • Outdoor
      • Equipment
      • Monitoring
      • Indoor
    • Sitemap
    • Search
  • Contacten
Dutch (nl-NL)

New and updated products

News

  • Creasol DomBusGateway: DomBus 2 MQTT-brug voor HomeAssistant, NodeRED, OpenHAB, ioBroker, MQTT...
  • Uurtarieven en -kosten voor elektriciteit voor EU-landen, en prognose van de productie van zonne-energie: Domoticz-script
  • FAQ veicoli elettrici e fotovoltaico
  • Een geoptimaliseerde Rasbian + Domoticz-image installeren op een Raspberry Pi 3, Pi 4 of Pi 5.
  • Het integreren van een verlichtingssysteem met stapsgewijze relais in Home Assistant, Domoticz, ...
  • Het verbinden van een netwerk van DomBus-modules via TCP (WiFi, Ethernet, ...) of draadloze radioverbinding
  • Hoe een domoticasysteem te bouwen met behulp van DomBus-modules
  • Een doe-het-zelf-slimme wallbox maken in samenwerking met Home Assistant om elektrische voertuigen op te laden
  • Suggesties: wat je moet voorbereiden in een nieuwe (of gerenoveerde) woning om dit te kunnen automatiseren
  • CR2032 Lithium-Manganese battey passivation layer
  • Creasol DomBus and Home Assistant
  • Domoticz, betrouwbaar gratis en open source domoticasysteem

Node-RED en Creasol DomBus modules

Domotics

Invoering

DomBus zijn modules ontworpen voor industriële en domoticasystemen die beschikbaar zijn met 2 verschillende protocollen:

  • Het DomBus-protocol , dat wordt ondersteund door de domoticz- domoticacontroller, is een betrouwbaar protocol dat het mogelijk maakt om tientallen modules te beheren en de status van modules op te halen zodra ze veranderen. Het bevat ook de zogenaamde DCMD- commando's die, vergelijkbaar met KNX, worden verzonden tussen DomBus-modules in dezelfde bus om uitgangen te activeren in geval van gebeurtenissen (schakelaar of drukknop ingedrukt, temperatuurwaarde, vermogenswaarde, ....) zonder dat voor de interventie of de domoticacontroller, handige oplossing om een domoticasysteem te krijgen dat zelfs werkt in geval van een storing in de domoticacontroller . De Creasol DomBus- plug-in moet worden geïnstalleerd in Domoticz, met behulp van de Python Plugin Manager of door de software te downloaden van GitHub (zie het gedeelte hieronder).
  • Modbus RTU-protocol , veel gebruikt in industriële en domoticasystemen, wordt ondersteund door bijna elke domoticacontroller zoals Home Assistant , OpenHAB , IObroker , Node-RED , ...
    Modbus is een master-slave-protocol waarmee een enkel relais, alle relais of een groep relais met één enkel commando kan worden geactiveerd en gedeactiveerd. Het is ook mogelijk om voor elk relais de AAN-tijd van 31,5 ms tot 1500 dagen te specificeren, zodat het relais automatisch UITschakelt na de geselecteerde tijd.

De Modbus RTU-versie kan door het Node-RED- systeem worden gebruikt om stromen te realiseren, waaronder relaisuitgangen, digitale en analoge ingangen, temperatuur-, vochtigheids-, energiesensoren, laadstation voor elektrische voertuigen en meer.

Configuratie

Eerst moet het modbus-palet worden ingeschakeld: als het nog niet is ingeschakeld, typt u de opdracht

npm install node-red-contrib-modbus

herstart dan Node-RED.

NodeRed en DomBus31 8 relaismodule

De bovenstaande stroom laat zien hoe de 8 relaismodule DomBus31 met Node-RED moet worden gebruikt: sleep Modbus-Write naar de stroom en configureer deze zoals weergegeven in de afbeelding.

Kijk voor volledige informatie over DomBus-modules op https://www.creasol.it/domotics

Hieronder wat informatie over de 8 relais module DomBus31

DomBus31-module Modbus RTU-mogelijkheden

De volgende specificaties hebben betrekking op de Modbus-versie: DomBus31 is beschikbaar met 2 firmware, DomBus-protocol en Modbus-protocol, dus in dit geval moet de laatste firmware worden gekozen.

Standaard slave-adres: 49 (0x31)

adres Naam Waarden Beschrijving
0 RL1 0=UIT, 65280=AAN, 1-65279=AAN voor bepaalde tijd SPST-relaisuitgang, NO-contact, 5A 250Vac of 30Vdc uitgangsvermogen. Relaiscontact is beveiligd door varistor
1 RL2 0=UIT, 65280=AAN, 1-65279=AAN voor bepaalde tijd SPST-relaisuitgang, NO-contact, 5A 250Vac of 30Vdc uitgangsvermogen. Relaiscontact is beveiligd door varistor
2 RL3 0=UIT, 65280=AAN, 1-65279=AAN voor bepaalde tijd SPST-relaisuitgang, NO-contact, 5A 250Vac of 30Vdc uitgangsvermogen. Relaiscontact is beveiligd door varistor
3 RL4 0=UIT, 65280=AAN, 1-65279=AAN voor bepaalde tijd SPST-relaisuitgang, NO-contact, 5A 250Vac of 30Vdc uitgangsvermogen. Relaiscontact is beveiligd door varistor
4 RL5 0=UIT, 65280=AAN, 1-65279=AAN voor bepaalde tijd SPST-relaisuitgang, NO-contact, 5A 250Vac of 30Vdc uitgangsvermogen. Relaiscontact is beveiligd door varistor
5 RL6 0=UIT, 65280=AAN, 1-65279=AAN voor bepaalde tijd SPST-relaisuitgang, NO-contact, 5A 250Vac of 30Vdc uitgangsvermogen. Relaiscontact is beveiligd door varistor
6 RL7 0=UIT, 65280=AAN, 1-65279=AAN voor bepaalde tijd SPDT-relaisuitgang, NO + NC-contacten, 10A 250Vac of 250Vdc uitgangsvermogen. Relaiscontact is beveiligd door varistor
7 RL8 0=UIT, 65280=AAN, 1-65279=AAN voor bepaalde tijd SPDT-relaisuitgang, NO + NC-contacten, 10A 250Vac of 250Vdc uitgangsvermogen. Relaiscontact is beveiligd door varistor
255 Alle relais 0=UIT, 65280=AAN, 1-65279=AAN voor bepaalde tijd Dit adres wordt gebruikt om alle relais AAN of UIT te schakelen met een enkel kort commando
8192 Slaaf adres 1-250 Maakt het mogelijk om het slave-adres van de module te wijzigen, dus het is mogelijk om nieuwe DomBusXX-modules aan dezelfde bus toe te voegen
8193 Seriële bitsnelheid 0=115200bps, 1=57600, 2=38400, 3=19200, 4=9600, 5=4800, 6=2400, 7=1200bps Seriële snelheid, standaard 115200 bps 8,n,1
8194 Seriële pariteit 0=geen, 1=even, 2=oneven Seriële pariteit, standaard geen (115200 bps 8,n,1)
8198 Revisie, majoor Alleen lezen Revisienummer ophalen. "02" betekent bijvoorbeeld dat de revisie "02XX" is, waarbij XX gedefinieerd is door parameter 8199
8199 Revisie, klein Alleen lezen Krijg revisienummer, ondergeschikt nummer. Bijvoorbeeld "h1" betekent dat de revisie "XXh1" is, waarbij XX gedefinieerd is door parameteri 8198

Het is mogelijk om één of meerdere uitgangen voor een bepaalde tijd te activeren (monostabiel/timer uitgang) zoals aangegeven in de tabel. De parameter die overeenkomt met de benodigde tijd kan worden berekend met behulp van de volgende regels:

Van 0 tot 60s => 31.25ms resolutie 1=31.25ms, 1920=60s => waarde=time_in_milliseconds/32
Van 1m tot 1u met 1s resolutie 1921=61s, 3540+1920=5460=1u => waarde=(time_in_seconds-60)+1920
Van 1u tot 1d met een resolutie van 1m 5461=1u+1m, 1380+5460=6840=24u => waarde=(time_in_minutes-60)+5460
Van 1d tot 1500 dagen met 1h resolutie 6841=25h, 6842=26h, enzovoort => value=(time_in_hours-24)+6840

De volgende tabellen tonen enkele voorbeelden van Modbus-commando's.

Slaaf adres Func. Code Reg.Addr Reg.waarde Kader Beschrijving
49 06 8192 1 [31][06][20][00][00][01][46][3A] Wijzig het slave-adres van 49 (0x31) in 1
01 06 8193 4 [01][06][20][01][00][04][D2][09] Stel de seriële snelheid in op 9600bps
01 06 8194 1 [01][06][20][02][00][01][E2][0A] Stel een gelijke pariteit in
49 10 8192 1,4,1 [31][10][20][00][00][03][06][00][01][00][04][00][01][B1][71] Stel met een enkele opdracht het slave-adres in op 1, de seriële snelheid op 9600bps, gelijkmatige pariteit.
Houd er rekening mee dat er geen antwoord wordt teruggestuurd naar deze opdracht.
01 06 0 65280 [01][06][00][00][FF][00][C8][3A] Activeer RL1-uitgang voor altijd (65280=0xff00)
01 06 1 960 [01][06][00][01][03][C0][D8][AA] Activeer RL2 voor 960/32=30s
01 06 255 0 [01][06][00][FF][00][00][B9][FA] Schakel alle uitgangen uit (Reg.Addr=255)
01 10 0 32,0,0,65280 [31][10][00][00][00][04][08][00][20][00][00][00][00][FF][00][E6][5C) ] Zet RL1 Aan voor 1s (32), RL2 Uit, RL3 Uit, RL4 Aan - Er kunnen maximaal 10 registers worden ingesteld in één opdracht
01 03 255 1 [01][03][00][FF][00][01][B4][3A] Lees een 16bit-waarde met poortstatus. Als de geretourneerde waarde bijvoorbeeld 0xd1 (0b11010001) is, is de uitvoerstatus:
RL8=Aan, RL7=Aan, RL6=Uit, RL5=Aan, RL4=Uit, RL3=Uit, RL2=Uit, RL1=Aan
01 03 8198 2 [01][03][20][06][00][02][2F][CA] Lees 4 bytes binnen moduleversie. Als de geretourneerde waarde bijvoorbeeld <30><32><68><31> is (in hex-indeling), is de corresponderende ASCII-waarde "02h1" (Firmware 02h1)
01 0F 0 8,1,0xd1 [01][0F][00][00][00][08][01][D1][3E][C9] Spoelstatus instellen op 0xd1 (0b11010001), RL8, RL7, RL5, RL1 activeren en andere relais uitschakelen
01 01 0 8 [01][01][00][00][00][08][3D][CC] Spoelstatus lezen. Als de geretourneerde waarde 0xd1 (0b11010001) is, betekent dit dat RL8, RL7, RL5 en RL1 zijn ingeschakeld

 

Andere DomBus-modules werken met Node-RED

We produceren verschillende modules met het Modbus-protocol, werkend met NodeRED:

  • DomBusTH : klein bord dat in een blinde hoes kan worden geplaatst, met temperatuur- + vochtigheidssensoren, RGW-leds, aanraaksensor (simuleert een drukknopschakelaar), 6 configureerbare I/O's
  • DomBus12 : kleine module met 9 configureerbare I/O's (analoge/digitale ingangen, tellers, NTC-temperatuursensoren, open-drain uitgangen aan te sluiten op externe relaismodule DomRelay2 , jaloezie-uitgangen, zoemer, flitser, ....)
  • DomBus23 : module met 2 relais, mosfet uitgang (LED dimmer), 230V AC ingang, 2 opto-geïsoleerde ingangen, 2 I/O's, 2 0-10V analoge uitgangen, ...
  • DomBus31 : module met 8 relais
  • DomBus32 : 3 relais + 3 230Vac ingangen + 5 I/O's module
  • DomBus33 : module met 3 lichten (bruikbaar om een bestaand lichtsysteem te domotiseren met behulp van stapsgewijze relais)
  • DomBus36 : module met 12 relais
  • DomBus37 : 12 I/O's + 3 AC-ingangen + 3 relaisuitgangsmodule ontworpen voor inbraakalarmsystemen
  • DomBusEVSE : EVSE-module die kan worden gebruikt om een slimme wallbox te bouwen voor het opladen van elektrische voertuigen

Module kan worden gekocht op https://store.creasol.it/domotics

Domoticz LUA script om één of meerdere drukknopschakelaars te beheren

Domotics

The following script, written in LUA programming language for Domoticz, was designed to manage 1 or more pushbutton switches in this way.

If the button is pressed for a short time, less than 1 second, toggle output ON/OFF

If the button is pressed for a longer time, switch output OFF

domoticz pushbutton switches with Creasol DomBus1

The script should be placed into the folder domoticz/scripts/lua ; filename is important, and must be script_device_DESCRIPTION.lua , for example script_device_pushbuttons.lua

Pushbutton devices must be On/Off or Pushbutton* type, or any other type that return status "On" and "Off" (e.g. type Contact returns value "Open" and "Close").

[code]-- LUA script for Domoticz, used to manage one or more pushbutton switches
-- Written by Creasol, https://creasol.it
--
-- Domoticz passes information to scripts through a number of global tables
--
-- devicechanged contains state and svalues for the device that changed.
-- devicechanged['yourdevicename'] = state
-- devicechanged['svalues'] = svalues string
--
-- otherdevices, otherdevices_lastupdate and otherdevices_svalues are arrays for all devices:
-- otherdevices['yourotherdevicename'] = "On"
-- otherdevices_lastupdate['yourotherdevicename'] = "2015-12-27 14:26:40"
-- otherdevices_svalues['yourotherthermometer'] = string of svalues
--
-- uservariables and uservariables_lastupdate are arrays for all user variables:
-- uservariables['yourvariablename'] = 'Test Value'
-- uservariables_lastupdate['yourvariablename'] = '2015-12-27 11:19:22'
--
-- other useful details are contained in the timeofday table
-- timeofday['Nighttime'] = true or false
-- timeofday['SunriseInMinutes'] = number
-- timeofday['Daytime'] = true or false
-- timeofday['SunsetInMinutes'] = number
-- globalvariables['Security'] = 'Disarmed', 'Armed Home' or 'Armed Away'
--
-- To see examples of commands see: http://www.domoticz.com/wiki/LUA_commands#General
-- To get a list of available values see: http://www.domoticz.com/wiki/LUA_commands#Function_to_dump_all_variables_supplied_to_the_script
--
-- Based on your logic, fill the commandArray with device commands. Device name is case sensitive.
--
debug=1 -- 0 => do not write debug information on log. 1 => write some information to the Domoticz log

commandArray = {}

timeNow=os.time() -- current time in seconds

function timeElapsed(devName)
-- compute number of seconds since last update, for the specified variable name
s=otherdevices_lastupdate[devName]
year = string.sub(s, 1, 4)
month = string.sub(s, 6, 7)
day = string.sub(s, 9, 10)
hour = string.sub(s, 12, 13)
minutes = string.sub(s, 15, 16)
seconds = string.sub(s, 18, 19)
return os.difftime(timeNow, os.time{year=year, month=month, day=day, hour=hour, min=minutes, sec=seconds})
end

-- loop through all the changed devices
for devName,devValue in pairs(devicechanged) do
if (devName=='PUSHBUTTON_light_external') then
-- Example: press and release pushbutton in less than 1 second => toggle lights ON/OFF
-- press and release pushbutton for more than 1 second => switch lights OFF
if (debug > 0) then print('EVENT: devname="'..devName..'" and value='..devValue) end
-- 1 short pulse => toggles lights ON/OFF
-- 1 long pulse => lights OFF
if (devValue=='Off') then
-- pushbutton released
-- compute pulse length
pulseLen=timeElapsed(devName)
if (debug>0) then print("EVENT: pushbutton released, pulseLen="..tostring(pulseLen).."s") end
if (pulseLen<=1 and otherdevices['LightOut2']=='Off') then
-- short pulse, and commanded device is OFF => ON
commandArray['LightOut2']='On'
commandArray['LightOut3']='On'
else
-- long pulse, or commanded device was ON
commandArray['LightOut2']='Off'
commandArray['LightOut3']='Off'
end
end
end
end

return commandArray
[/code]

 

Another LUA script to manage pushbuttons

The following script is very similar to the previous one, but manages more pulse lengths:

in this example,

  if pushbutton pulse is 1s or less => turns light1 ON,

  if pushbutton pulse 2s => turns light2 ON,

  if pushbutton pulse 4s => turns light3 ON

Each output must be configured to be automatically disabled after a certain number of seconds, else the script have to be modified to also turn off the outputs.

[code]-- LUA script for Domoticz, used to manage one or more pushbutton switches
-- Written by Creasol, https://creasol.it
--
-- Domoticz passes information to scripts through a number of global tables
--
-- devicechanged contains state and svalues for the device that changed.
--   devicechanged['yourdevicename'] = state
--   devicechanged['svalues'] = svalues string
--
-- otherdevices, otherdevices_lastupdate and otherdevices_svalues are arrays for all devices:
--   otherdevices['yourotherdevicename'] = "On"
--   otherdevices_lastupdate['yourotherdevicename'] = "2015-12-27 14:26:40"
--   otherdevices_svalues['yourotherthermometer'] = string of svalues
--
-- uservariables and uservariables_lastupdate are arrays for all user variables:
--   uservariables['yourvariablename'] = 'Test Value'
--   uservariables_lastupdate['yourvariablename'] = '2015-12-27 11:19:22'
--
-- other useful details are contained in the timeofday table
--   timeofday['Nighttime'] = true or false
--   timeofday['SunriseInMinutes'] = number
--   timeofday['Daytime'] = true or false
--   timeofday['SunsetInMinutes'] = number
--   globalvariables['Security'] = 'Disarmed', 'Armed Home' or 'Armed Away'
--
-- To see examples of commands see: http://www.domoticz.com/wiki/LUA_commands#General
-- To get a list of available values see: http://www.domoticz.com/wiki/LUA_commands#Function_to_dump_all_variables_supplied_to_the_script
--
-- Based on your logic, fill the commandArray with device commands. Device name is case sensitive.
--
debug=1            -- 0 => do not write debug information on log. 1 =>  write some information to the Domoticz log

commandArray = {}

timeNow=os.time()    -- current time in seconds

function timeElapsed(devName)
    -- compute number of seconds since last update, for the specified variable name
    s=otherdevices_lastupdate[devName]
    year = string.sub(s, 1, 4)
    month = string.sub(s, 6, 7)
    day = string.sub(s, 9, 10)
    hour = string.sub(s, 12, 13)
    minutes = string.sub(s, 15, 16)
    seconds = string.sub(s, 18, 19)
     return os.difftime(timeNow, os.time{year=year, month=month, day=day, hour=hour, min=minutes, sec=seconds})
end

-- loop through all the changed devices
for devName,devValue in pairs(devicechanged) do
    if (devName=='PUSHBUTTON_light_external') then
        -- Example: press and release pushbutton in less than 1 second => toggle lights ON/OFF
    --          press and release pushbutton for more than 1 second => switch lights OFF
        if (debug > 0) then print('EVENT: devname="'..devName..'" and value='..devValue) end
        -- 1 short pulse => toggles lights ON/OFF
        -- 1 long pulse => lights OFF
        if (devValue=='Off') then
            -- pushbutton released
            -- compute pulse length
            pulseLen=timeElapsed(devName)
            if (debug>0) then print("EVENT: pushbutton released, pulseLen="..tostring(pulseLen).."s") end
            if (pulseLen<=1) then
                -- short pulse
                commandArray['LightOut1']='On'
            elseif (pulseLen>=2 and pulseLen<=3) then
                -- medium pulse, 2s
                commandArray['LightOut2']='On'
            elseif (pulseLen>=4 and pulseLen<=6) then
                -- long pulse, 4s
                commandArray['LightOut3']='On'
            end
        end
    end
end

return commandArray[/code]

 Need help? join the DomBus channel on Telegram!

Domoticasysteem verzendt momentopname van IP-camera op Telegram-groep wanneer iemand op de deurbel drukt

Domotics

Een eenvoudige bestaande deurbel ombouwen tot een slimme deurbel met Domoticz

Het doel van dit document is om te illustreren hoe u de Domoticz/Raspberry-controller kunt configureren en verbinden om een momentopname te krijgen in onze Telegram-app wanneer iemand op de deurbel drukt.
De 12Vac die wordt gebruikt om de deurbel of zoemer van stroom te voorzien , is aangesloten op een opto-geïsoleerde ingang op de DomBus23-module . Wanneer de bel/zoemer wordt gevoed, wordt er een trigger naar Domoticz gestuurd die een script activeert om een foto van de IPcam te maken en deze naar een Telegram-kanaal of -groep te sturen . Zo kunnen de gezinsleden de foto op hun smartphones ontvangen zodra iemand op de deurbel drukt .

Bekijk de Engelse versie van deze pagina voor de meest recente versie.

Hardwarevoorbeeld met behulp van een DomBus-module

Een bestaande deurbel ombouwen tot een slimme deurbel met behulp van Domoticz en Creasol DomBus23DomBus23-module voor Domoticz Home Assistant NodeRED ...

DomBus23 heeft veel in- en uitgangen en kan worden gebruikt voor andere functies, zoals het openen van een voetgangerspoort of voordeur (het heeft 2 relaisuitgangen), het beheren van een instapverlichting met ledstrip met dimfunctie (het heeft een 30V 12A mosfet), ....
Als de deurbel 230Vac of 110Vac gebruikt, kunt u de bel/zoemer aansluiten op de opto-geïsoleerde IN3-ingang, die hoge spanningen ondersteunt.

DomBus-modules zijn ontworpen om een zeer laag stroomverbruik te hebben, minder dan 10 mW, en een zeer betrouwbare verbinding te krijgen met de domotica-controller via RS485-bus (eenvoudige afgeschermde kabel met 4 draden, 2 voor data en 2 voor 12V-voeding). Door een 12V-voeding met loodzuur-back-upbatterij te gebruiken, kan het systeem zelfs in geval van stroomuitval blijven werken.

Softwareconfiguratie

We gaan ervan uit dat u Domoticz al op een computer hebt geïnstalleerd, bijvoorbeeld een Raspberry PI of een andere singleboardcomputer, of een PC/Mac.
DomBus-modules worden via een USB/RS485-adapter en een 12V-voeding aangesloten op de domoticacomputer.

Selecteer het IN1-invoerapparaat op het Domoticz Switches-paneel en geef het script op dat moet worden geactiveerd wanneer de deurbel gaat.

domoticz virtuele sensor4

Download de scripts sendsnapshot.sh en telegramSendText.sh van GitHub en plaats ze in de map DOMOTICZ/scripts.
Bewerk deze bestanden om de IPCam- en Telegram-parameters in te stellen.

Momentopname van een Reolink-camera

Schakel de HTTP-service, poort 80, in op uw reolink-camera, maak een gebruiker aan die alleen de camera kan bekijken (noem deze viewer of iets anders) en gebruik de volgende URL om een jpeg-snapshot te downloaden:

http://192.168.XY/cgi-bin/api.cgi?cmd=Snap&channel=0&user=viewer&password=WACHTWOORD'

waarbij 192.168.XY het IP-nummer van de camera is en viewer de naam is van de gebruiker die u hebt aangemaakt met het bijbehorende WACHTWOORD.
Vervang channel=0 door channel=1 als u een dubbele camera hebt, zoals Reolink TrackMix, en u het tweede kanaal wilt zien.

Hoe u een ONVIF-camera kunt raadplegen om de videostream en snapshot-URI te verkrijgen

Sommige slechte Chinese ONVIF IP-cams hebben geen snapshot-URI: heel slecht, maar we kunnen een snapshot genereren van de videostream met behulp van ffmpeg!!

ONVIF is een standaardprotocol om ONVIF IP-camera's te bevragen. U kunt IP-camerakenmerken verkrijgen door een aantal query's te verzenden via het SOAP-systeem.

Een zeer goede tutorial om video- en snapshot-URI van uw ONVIF-camera te detecteren, vindt u op http://me-ol-blog.blogspot.com/2017/07/getting-still-image-urluri-of-ipcam-or.html

Hoe krijg je een Telegram-token en chat_id, nodig om berichten/foto's via Telegram te versturen?

Telegram is een zeer krachtig systeem voor instant messaging, vergelijkbaar met WhatsApp, maar veel beter omdat het open source is, geschikt is voor meerdere platforms (niet alleen voor smartphones... Telegram Desktop werkt op Linux, Mac en Windows!) en zeer aanpasbaar is via de API.

Met de volgende instructies kunt u een foto op Telegram krijgen wanneer iemand op de deurbel drukt.

Hieronder vindt u stapsgewijze instructies voor het maken van een BOT op Telegram en een kanaal waarmee u meldingen naar u en andere mensen kunt sturen:

  1. Uiteraard moet je Telegram op je smartphone geïnstalleerd hebben, en ook Telegram Desktop op je PC/Mac/Linux: je kunt het downloaden van https://desktop.telegram.org/
  2. Zoek in uw contactenlijst naar BotFather , selecteer het en start het
  3. type /newbot
  4. typ een naam voor deze bot, bijvoorbeeld domApi
  5. typ een gebruikersnaam, eindigend op "bot", bijvoorbeeld domApiUserbot
  6. Op dit punt zal BotFather u een API-sleutel retourneren (hieronder een voorbeeld in vetgedrukte letters) die u ergens moet opslaan:
    784324329:EETRNJU3jQEGWQdjNv3llb4bnDSDREGuuuL
  7. Maak nu met uw smartphone een nieuw kanaal aan (geen groep: kanaal!), kies een naam ervoor (bijvoorbeeld Domoticz), maak het openbaar en geef er een link voor op (moet uniek zijn), bijvoorbeeld t.me/dom123abc
    Houd er rekening mee dat alleen de eigenaar van het kanaal het kanaal als openbaar kan configureren!
    Voeg leden toe aan dit kanaal: uw partner, zonen, iedereen die domoticz-meldingen moet ontvangen
  8. Ga naar het kanaal en voeg een nieuwe beheerder toe: selecteer de bot die u zojuist in stap 3-6 hebt gemaakt (zoek naar domApiUserbot of de gebruikersnaam die u in stap 5 hebt getypt)
  9. Voeg eventueel andere gebruikers toe aan dat kanaal, als u foto's/meldingen naar die gebruikers wilt sturen.
  10. Open de volgende URL in uw browser (vervang de API-sleutel door uw en channellink door uw):
    https://api.telegram.org/bot
    784324329:EETRNJU3jQEGWQdjNv3llb4bnDSDREGuuuuL /bericht verzenden?chat_id=@ dom123abc &text=test
  11. U krijgt dan een uitvoer die lijkt op de volgende afbeelding: sla ergens de ID op ( -1001194779203 , in dit voorbeeld): dit is de ID voor uw kanaal, waar domoticz de meldingen naartoe moet sturen, en u moet deze (met het minteken, indien aanwezig) in het onderstaande script sendsnapshot.sh invoeren (variabele TELEGRAMCHATID).
    telegram kanaal-id
  12. Configureer het aangemaakte kanaal via Telegram op uw smartphone als kanaaltype Privé.
  13. Ga in Domoticz naar Switches, selecteer de ingang voor de deurbelknop, Bewerken en typ in het tekstvak "Bij actie" script://sendsnapshot.sh : op deze manier zal Domoticz elke keer dat iemand op de deurbel drukt, het script sendsnapshot.sh uitvoeren dat een momentopname van de IPCam maakt en deze naar het Telegram-kanaal stuurt. Zo ontvangt elke gebruiker die u in dat kanaal hebt geplaatst de foto van de mensen die op de deurbel hebben gedrukt.

 

 

Kia connect - Hyundai Blue Link and Domoticz plugin

Domotics

Domoticz kan via API de KIA/Hyundai auto aansturen Invoering

We hebben een plug-in voor Domoticz geschreven die communiceert met Kia- en Hyundai-clouds om informatie van de auto te krijgen en waarmee de gebruiker ook enkele autoparameters kan instellen (elektrische laadlimieten AC en DC, klimaattemperatuur, start/stop-klimaat, start/stop opladen, ....)

Installatie-instructies en meer informatie op https://www.domoticz.com/wiki/Vehicles_Hyundai_Kia

 

Wil je je eigen SMART WALLBOX maken?

Volg de instructies op https://www.creasol.it/EVSE om zelf een Smart Charging Station te bouwen om je auto, bestelwagen of ander elektrisch voertuig op te laden!!

KIA eNiro op Domoticz

 

Het opladen van de elektrische auto met behulp van een DomBusEVSE-module

EVSE-module om een doe-het-zelf wallbox te bouwen die compatibel is met Domoticz

Dit is een geavanceerde oplossing die gebruikmaakt van de EVSE-module (Electric Vehicle Supply Equipment) DomBusEVSE gemaakt door Creasol in Italië: het

  • detecteert het in- en uittrekken van de stekker, start en stopt het opladen
  • detecteert alarmen van voertuigen en storingen in de netvoeding
  • interfaces een bidirectionele energiemeter om de real-time import of export vermogen van het net te kennen , en een andere energiemeter om het vermogen en de energietoevoer naar het voertuig te meten
  • werkt als stand-alone (geen behoefte aan een domoticacontroller) of beheerde modus (laadstroom geselecteerd door de domoticacontroller) met de volgende laadmodus: UIT : opladen uitgeschakeld SOLAR : gebruik alleen energie van hernieuwbare installaties (netstroom = 0) 25% : max 25% van het beschikbare vermogen van het net 50% : max 50% van het vermogen van het net 75% : max 75% van het vermogen van het net 100% : gebruik alle beschikbare stroom van het net BEHEERD: huidige waarde ingesteld door domoticacontroller (automatisering script voor aangepast opladen)
  • werkend in de MANAGED-modus is het mogelijk om 1. eenvoudig het minimale en maximale batterijniveau in te stellen 2. eenvoudig de maximale laadstroom in te stellen 3. wanneer het batterijniveau onder het minimum is, opladen met het maximale vermogen dat is toegestaan door de elektriciteitsmeter (in Italië, wisselt 90 minuten op maximaal vermogen + 27% en 90 minuten op maximaal vermogen + 10% af, sneller opladen is niet mogelijk! Het elektrische systeem moet zorgvuldig worden gecontroleerd bij maximaal vermogen, om oververhitting en brand te voorkomen!!) 4. wanneer batterij niveau tussen minimum en maximum ligt, opladen met alleen energie uit hernieuwbare energie uit fotovoltaïsche energie

Video van het opladen van elektrische voertuigen door Domoticz

Voorwaarden en aansluitschema

  1. elektrisch voertuig met cloudverbinding, om de laadtoestand van de batterij te kennen (niet verplicht, maar aanbevolen bij gebruik in een domoticasysteem)
  2. Creasol DomBusEVSE-module
  3. bidirectionele energiemeter, om het huidige invoervermogen en uitvoervermogen te berekenen (optioneel, in het geval van een fotovoltaïsch/windsysteem)
  4. vermogenschakelaar met differentieelbeveiliging (reststroomblok) type-B
  5. 2P (enkele fase) of 4P (3-fasen) contactor om opladen in/uit te schakelen
  6. 32A EV-kabel met aan één zijde type-2 of type-1 stekker

Klik om het aansluitschema te zien om een slimme oplader voor elektrische auto's te maken met behulp van de DomBusEVSE-module!

Waarschuwingen

Elektrische auto is geen stofzuiger, die 30 minuten aan het stopcontact blijft zitten!

Houd er rekening mee dat vermogensdissipatie op connectoren (en kabels) wordt berekend als P=RI² , waarbij R de connector-/draadweerstand is en I² het kwadraat van de laadstroom.

Als de laadstroom hoog is, moet het systeem daarom worden gecontroleerd om te voorkomen dat aansluitingen en draden oververhit raken en verbranden .

Onze domotica modules voor Domoticz, Home Assistant, Node-RED, OpenHAB, ...

Wij zijn een Italiaans bedrijf dat elektronische apparaten voor domoticasystemen ontwerpt en produceert en volledige ondersteuning biedt.

Wij vinden dat domoticamodules betrouwbaar moeten zijn (busverbonden om RF-interferenties te voorkomen) en een zeer laag stroomverbruik moeten hebben (normaal 10-15mW elk; de module met 12 relais verbruikt minder dan 750mW met alle relais AAN: vergelijk dit met andere apparaten!)
Een gebouw is pas slim als het het comfort verhoogt en het stroomverbruik verlaagt!

Bekijk de lijst met onze domotica producten op
https://www.creasol.it/domotica
https://store.creasol.it/domotica

Voer voor eventuele ondersteuning de Telegram-groep DomBus in

 

Compleet en eenvoudig inbraakalarmsysteem met Domoticz-vrij domoticasysteem

Domotics

Invoering

Smartphone panel for the alarm system using Domoticz free software Het doel is om voor jezelf een compleet alarmsysteem te bouwen dat betrouwbaar, schaalbaar, goedkoop en rijk aan functies is .

Met behulp van de volgende scripts is het mogelijk om alle alarmsysteemfuncties te integreren in een Domoticz- controller die draait op een RaspberryPI (single board computer met 2,3W stroomverbruik), RockPIS (kleine single board computer met slechts 400mW stroomverbruik) of een ander type hardware.

Het beheert 3 verschillende soorten alarmen:

  1. Weg, als er niemand thuis is
  2. Nacht, wanneer iedereen thuis slaapt
  3. Dag waarop iemand thuis is en een inbraakpoging wil detecteren

Bovendien kan het systeem, in het geval van een sensoractivering , kleine video's opnemen, met 2x snelheid hercoderen en naar een Telegram-groep/-kanaal sturen , zodat het mogelijk is om te controleren wat er op de smartphone gebeurt. Dit is vooral handig bij buitensensoren.

Waarom Domoticz? Omdat Domoticz gratis, snel en zeer betrouwbaar is : het is geschreven in C++ (niet Python, Java of andere geïnterpreteerde talen) en kan zonder problemen worden bijgewerkt. Het ondersteunt ook LUA-scripting waarmee eenvoudig te beheren automatiseringen kunnen worden geschreven in een duidelijke/gemakkelijke taal die door iedereen kan worden begrepen. De gebruikersinterface van Domoticz ziet er oud uit, niet mooi, maar is erg sterk en dit is het allerbelangrijkste om het huwelijk te redden als het huis sterk gedomotiseerd is ;-)
Het alarmsysteem wordt gemaakt door een configuratiebestand en enkele LUA- en Bash-scripts: de ene wordt opgeroepen bij het activeren van de scènes AlarmAway, AlarmNight, AlarmDay, en de andere wordt opgeroepen om video op te nemen van IPcams in geval van activering van buitensensoren. Wijzig gewoon het configuratiebestand om in te stellen welke sensoren en sirenes u wilt beheren.

Door DomBus-modules te gebruiken om alarmsensoren te koppelen, is het mogelijk om een betrouwbaar bekabeld netwerk voor domotica te krijgen, met buskabel die alle sensoren met elkaar verbindt en zowel data als 12V-voeding levert: met behulp van een 12V loodzuur-back-upbatterij werkt het systeem zelfs in geval van stroomuitval . In ieder geval werken de hieronder beschreven alarmscripts met alle soorten sensoren. Tenslotte maken DomBus-modules het mogelijk om een zeer laag stroomverbruik te bereiken: elke DomBus-module verbruikt doorgaans ongeveer 10 mW om veel in- en uitgangen te beheren , veel minder dan WiFi-modules die 400 mW of meer verbruiken. Uiteraard is het mogelijk om voor het alarmsysteem alle ondersteunde apparaten te gebruiken, zoals Shelly, Sonoff, Denkovi, KMTronic, RaspberryPI GPIO's, ...

Het alarm kan worden in-/uitgeschakeld via 3 scènes/groep, zoals weergegeven op de afbeelding, of via drukknoppen, vingerafdruklezers, toetsenborden, RFID- of NFC-tags, ... Het is bijvoorbeeld erg handig om drukknoppen naast het bed te hebben om te activeren/ schakel het NACHT-alarm uit (bekijk de afbeelding hieronder, gebruik hiervoor DomBusTH).

Bekijk het onderstaande gedeelte om te weten hoe u pictogrammen op uw smartphone kunt toevoegen om het alarm te activeren/deactiveren ! Tik op een pictogram om het AFWEZIG-alarm te activeren, tik op een ander pictogram om het alarm uit te schakelen.

Alle meldingen zullen beschikbaar zijn in Telegram , zoals korte video's die worden opgenomen en naar Telegram worden verzonden wanneer een externe sensor wordt geactiveerd : om het gemakkelijker te maken om te controleren wat er gebeurt wanneer een sensor wordt geactiveerd, wordt 24 seconden video opgenomen met snelheid 2x, het is dus mogelijk om het in slechts 12 seconden te controleren .

Telegramkanaal met alarmmeldingen

 

telegram-app met alarmstatus en video's

Functies

  1. Drie soorten alarm: dag (geeft alleen een korte puls af bij de interne sirene, als iemand een deur, raam of rolluik opent), nacht (activeert alleen de interne sirenes en enkele lampen), weg (activeert de interne en externe sirenes).
  2. volledige meldingen via de Telegram-app
  3. beheert maximaal 128 magneetcontactsensoren (maar kan eenvoudig worden uitgebreid naar een hoger aantal), 32 bewegingssensoren (PIR), 32 sabotages, 32 sirenes
  4. alarm kan worden geactiveerd/gedeactiveerd door drukknoppen, smartphone of andere apparaten (vingerafdruklezers, toetsenborden, ...)
  5. het script kan een korte IP-Cam-video (24s) verzenden wanneer externe PIR's/Radar/sensoren zijn geactiveerd , waarbij de video in Telegram wordt weergegeven om de eigenaar te laten weten wat er extern gebeurt. Dit is handig om te controleren of er iemand (of misschien een kat!) door het gebouw loopt terwijl het alarm is geactiveerd. Om een snelle videocontrole te krijgen, worden video's opgenomen met snelheid 2x!
  6. Ook kunnen een of meer beeldschermen die op IP-Cam of NVR zijn aangesloten, worden ingeschakeld wanneer een externe sensor is geactiveerd, waardoor de externe IP-CAM's worden weergegeven

Installatie

Om een betrouwbaar alarmsysteem te krijgen, geloof ik dat we Microsoft Windows niet kunnen gebruiken. De installatie-instructies hebben alleen betrekking op het Linux-besturingssysteem (Raspbian, Debian, Ubuntu of vergelijkbaar). Het is mogelijk om een microSD te krijgen die al is geprogrammeerd met Linux+Domoticz+Firewall+back-upsysteem+automatiseringsscripts van store.creasol.it , waar ook enkele domotica-kits beschikbaar zijn die de controller, voeding, ...

Typ vanuit de Linux-shell de volgende opdrachten (kopiëren en plakken):

sudo su -   #get root access
apt update; apt install lua-dkjson git #install lua dkjson library and git
cd ~pi/domoticz/scripts/lua
git clone https://github.com/CreasolTech/domoticz_lua_scripts #get all scripts from CreasolTech into domoticz_lua_scripts dir
cd domoticz_lua_scripts
#add some files, if they not exists
cp -n alarmSet.sh alarm_sendsnapshot.sh config_alarm.lua globalfunctions.lua globalvariables.lua alarm.lua script_device_master.lua ..
cd ..

Configuratie

Ten eerste moeten alle apparaten een naam krijgen met de volgende voorvoegsels:

  • MCS_ voor magneetcontactsensoren, bijvoorbeeld MCS_Door_Garage, MCS_Window_Kitchen, ...
  • PIR_ voor PIR's, bijvoorbeeld PIR_Garage, PIR_Kitchen, ...
  • TAMPER_ voor sabotage, bijvoorbeeld TAMPER_Blinds_GroundFloor, ...
  • SIREN_ voor sirenes, bijvoorbeeld SIREN_External, SIREN_Internal
  • ALARM_ voor drukknoppen die worden gebruikt om het alarm te activeren/deactiveren, bijvoorbeeld ALARM_Pushbutton_bedroom, ...

Configureer het bestand scripts/lua/globalvariables.lua en schrijf uw telegram-chatid, api-sleutel, ....

Configureer het bestand scripts/lua/config_alarm.lua en schrijf de lijst met sensoren en uw voorkeuren

Configureer het bestand scripts/lua/alarmSet.sh en schrijf in de SIREN_IDX de lijst, gescheiden door een spatie, van alle idx van apparaten die worden geactiveerd in geval van alarm (externe sirene, interne sirene, lichten, zoemers, ...): in dit geval is het mogelijk om, als er een alarm optreedt, op de knop Uit te drukken op de scène/groep AlarmXXXX om het script alarmSet.sh te activeren dat alle sirenes/zoemer/lichten uitschakelt die zijn geactiveerd door het script script_device_alarm.lua .

Screenshot of the configuration file for the free burglar alarm system using Domoticz

Hardware

Domoticz ondersteunt verschillende protocollen en hardwaretypes.
Omdat we domoticamodules voor domoticasystemen produceren, raden we aan om onze DomBus-modules te gebruiken die zeer betrouwbaar zijn, werken bij stroomuitval (gebruik gewoon een 12V loodzuurbatterij om de bus van stroom te voorzien), een zeer lage latentie en zeer laag energieverbruik : in een huis bedraagt het energieverbruik bijvoorbeeld slechts 1,02 W voor 23 DomBus-modules die 113 ingangen, 67 uitgangen, 19 sensoren en 1 EV-oplading beheren .

DomBus37 is een module die speciaal is ontworpen voor alarmsystemen, met 11x ingangen ( magneetcontactsensoren voor deuren/ramen/jaloezieën, PIR's, sabotage , ...), de mogelijkheid om het stroomverbruik van een externe sirene te leveren en te monitoren , 3x relaisuitgangen en 3x AC ingangen (om stroomuitval op warmtepomp, koelkasten, het hele huis, ... te monitoren ).

DomBus37 alarmmodule voor domoticasystemen, met 11 ingangen, sirenevoeding en monitor, 3 uitgangen, 3 AC ingangen

DomBusTH is bijvoorbeeld een goedkope en compacte module , zonder behuizing, die kan worden geplaatst op blanco deksels met een gat van 3-4 mm in het midden, en is ideaal om in elke kamer te worden geplaatst om de temperatuur en vochtigheid te controleren, heeft rood/groen /witte leds die gebruikt kunnen worden als status- en noodverlichting , 4 I/O's die aangesloten kunnen worden op magneetcontactsensoren, PIR's, drukknop, zoemer, tellers, ... 2 open-drain uitgangen die aangesloten kunnen worden op externe relais , en een aanraaksensor om dat apparaat te gebruiken als een multifunctionele drukknopschakelaar .

Creasol DomBusTH domoticamodule om een krachtig en goedkoop inbraakalarmsysteem te realiseren

 

DomBus12 is een andere goedkope en compacte module, met 7 ingangen, die gebruikt kunnen worden om alarmsensoren aan te sluiten , en 2 open-drain uitgangen , die kunnen worden aangesloten op externe relais .

Creasol DomBus12 applicatienotitie: PIR, magneetcontactsensoren, voor het realiseren van een inbraakalarmsysteem met Domoticz domotica

 

DomBus31 is een domoticamodule met 8 relais, geoptimaliseerd voor een zeer laag stroomverbruik : minder dan 10 mW in stand-by (alle relais UIT), en MINDER DAN 500 mW met alle 8 relais AAN : onverslaanbaar!
Ter vergelijking: doorgaans verbruiken domoticamodules minstens 400 mW voor één enkel relais!

DomBus23 is een geavanceerde module met verschillende soorten in- en uitgangen.

DomBus-modules zijn geen draadloze apparaten: ze communiceren via de sterke RS485-standaard met 115.200 bps, zodat ze met elkaar kunnen worden verbonden via elke bustopologie met behulp van een dunne, 4-draads afgeschermde kabel: 2 draden voor 12V-voeding en 2 draden om gegevens uit te wisselen. Geen RF-vervuiling, geen batterijen, geen latentie!
Door gebruik te maken van een 12V-stroomleverancier die een 12V-loodzuurreservebatterij beheert, is het mogelijk om een domoticanetwerk te krijgen dat zelfs in geval van stroomuitval werkt.
Wanneer een DomBus-module op het netwerk is aangesloten, herkent en toont Domoticz automatisch alle poorten (plug&play) : elke poort kan worden geconfigureerd via de Domoticz-webinterface. Om het domoticasysteem ook te laten werken als de controller (Domoticz) niet werkt , is het mogelijk om elke poort te programmeren om poorten op dezelfde of andere apparaten te bedienen , zoals een KNX-netwerk: bijvoorbeeld als er voor minder geld op een knop wordt gedrukt dan 0,5s, schakelt u uitgang 2 van module X en uitgang 1 van module Y gedurende 123 seconden AAN, terwijl als deze gedurende 1 seconde wordt ingedrukt, uitgang 3 van module Z AAN/UIT wordt geschakeld. Of, als de temperatuur < 21 graden is, zet u de verwarming AAN , terwijl als de temperatuur > 21,4 graden is, deze UIT wordt gezet. Meer informatie op de apparaatpagina, DCMD-sectie.

DomBus netwerk en verbinding - Domoticasysteem

Voeg pictogrammen toe aan de smartphone om het alarmsysteem in en uit te schakelen

Het is erg handig om op de smartphone een icoontje te hebben om het afwezigheidsalarm in te schakelen bij het verlaten van het huis, en één om het alarmsysteem uit te schakelen voordat je het huis binnengaat.

Pictogrammen op de smartphone toevoegen om HTTP-URL-snelkoppelingen te hebben naar sommige functies, zoals alarm aan en uit Domoticz ondersteunt veel HTTP-commando's om scènes, groepen, schakelaars, ... te activeren en smartphones hebben veel applicaties die gebruikt kunnen worden om dergelijke URL's op te roepen.

  • Installeer op uw smartphone de HTTP Shortcuts- app
  • Maak een nieuwe reguliere snelkoppeling aan en geef een naam op (in het voorbeeld Alarm Afwezig )
  • Geef de URL op om de Alarm Afwezig-groep/scène op te roepen (u moet die groep/scène bewerken om de idx te krijgen, 13 in het voorbeeld) en schrijf de juiste parameters (IP, PORT, idx)
  • Schakel basisauthenticatie in, waarbij u de gebruikersnaam en het wachtwoord van domoticz opgeeft
  • Kies een icoon
  • Bewaar en voeg het pictogram toe aan het startscherm van uw smartphone.
  • Dupliceer dit pictogram, bewerk het nieuwe, wijzig de naam in Alarm Uit , wijzig het pictogram, wijzig de URL en vervang Aan door Uit , sla het op en voeg het pictogram toe aan het startscherm.

Nu heb je twee pictogrammen op de smartphone, één om het alarmsysteem te activeren en één om het uit te schakelen.

 

Domoticz-tips en -trucs

Domotics

Extracting a field from a multi-value sensor

Some devices in Domoticz contains mmm

ltiple values, separated by semicolon ';' :

  • kWh meters contain both power and energy, for example "950;11658" where 950 is the power
  • Temperature/Humidity sensors, for

ultiple values, separated by semicolon ';' :

  • kWh meters contain both power and energy, for example "950;11658" where 950 is the power
  • Temperature/Humidity sensors, for example "21.3;57" where temperature is 21.3°C and humidity 57%
  • Wind sensor, for example "135;ESE;3;9;12.4;12.4" where 3=wind speed*10 and 9 is gust*10  (windspeed=0.3m/s and gust=0.9m/s)

To extract a field from the device string, using a lua script, it's possible to use the following code:

 

devValue=otherdevices['WindSensor']
--devValue='109;ESE;8;15;123' The 3rd field, "8", contains the wind speed * 10 
i=0
for str in devValue:gmatch("[^;]+") do
    i=i+1
    if (i==3) then -- extract the third field
        windSpeed=tonumber(str)/10
        break
    end
end
print("windSpeed="..windSpeed)
if (windSpeed>5) then
    -- close the solar curtain, blinds, ...
    -- ToDo...
    -- if (otherdevices['devicePosition']=='Open') then
    --     commandArray['deviceMotor']='Close for 50 seconds'
    -- end
end 

ESPEasy sensors stopped working with Domoticz

Since 2023, Domoticz configuration denies by default access to the JSON API using plain http (not encrypted) protocol.
To enable http, select Setup -> Settings -> Security -> API Protection: Allow (enabled)

sensor device does not update: solved

Add icons to smartphone to enable and disable alarm system

It's very useful to have in the smartphone an icon to enable away alarm when leaving the house, and one to deactivate the alarm system before entering the house.

Adding icons on the smartphone to have HTTP URL shortcuts to some functions, such as alarm on and offDomoticz supports many HTTP commands to activate scenes, groups, switches, ... and smartphones have many applications that can be used to call such URLs.

  • Install on your smartphone the HTTP Shortcuts app
  • Create a new regular shortcut, specifying a name (in the example Alarm Away)
  • Specify the URL to call the Alarm Away group/scene (you have to edit that group/scene to get its idx, 13 in the example) writing the right parameters (IP, PORT, idx)
  • Enable base autentication, specifying the domoticz username and password
  • Choose an icon
  • Save, and add the icon to your smartphone home screen.
  •  Duplicate this icon, edit the new one, change name to Alarm Off, change icon, change URL replacing On with Off , save and add icon to the home screen.

Now you have two icons on the smartphone, one to activate alarm system and one to disable it.

How to change Domoticz graph sampling time

Domoticz, by default, show 3 graphs: a daily graph with 1 sample every 5 minutes, a monthly  graph and a yearly graph.

In some cases, 5 minutes is a very huge time if sensors data varies quickly: in these cases it's possible to reduce sampling interval for example to 1 minute (databases with sensors data will be much greater). In other cases, sensors data is very slow, so it's possible to set a longer sampling interval to save size and extend flash memory life.

To set a different sampling interval, it's possible to do as shown in the post https://www.domoticz.com/forum/viewtopic.php?f=47&t=10183&start=20#p129866

Edit the file DOMOTICZ_DIR/www/views/setup.html
Search for "shortlogtable" and add the following before the </table>-tag:

[code]<tr>
<td align="right" style="width:60px"><label><span data-i18n="Interval"></span>: </label></td>
<td><select id="comboshortloginterval" name="ShortLogInterval" style="width:60px" class="combobox ui-corner-all">
<option value="1">1</option>
<option value="5">5</option>
<option value="10">10</option>
<option value="15">15</option>
</select>&nbsp; Minutes
</tr>[/code]

Save it, delete your browser-cache and refresh your browser. I had problems with chrome keeping the old setup page even after deleting the cache, but using incognito mode worked to display the new page.

Finally, enter domoticz -> Setup -> Settings -> Log History and set the History value to 1 minute or longer sampling time.

 

 

Uurtarieven en -kosten voor elektriciteit voor EU-landen, en prognose van de productie van zonne-energie: Domoticz-script

Domotics

Please check the English version to get the most updated page with right installation instructions!

Power System Flexibility

According to the International Energy Agency, the flexibility of a power system refers to "the extent to which a power system can modify electricity production or consumption in response to variability, expected or otherwise".
In other words, all users are invited to consume more energy when it's available, saving energy when it is not. This is good expecially for appliances that can be manually activated, like washing and dishwashing machines, and much more for devices that are able to accumulate energy, like heat pump, boiler, electric vehicles.

For italian users, the following Telegram channels are available to receive everyday the electricity prices chart. Also, the table below shows a link to download prices, separated by CSV, so it's possible to easily manage building loads (heat pump, battery, ...) in a smart way, improving power flexibility.

Zona Link al canale Telegram con i grafici che evidenziano i prezzi orari dell'energia, aggiornati verso le 15.10 Link al file CSV contenente i 24 prezzi orari + prezzo medio, aggiornato dopo le 15.10 e valido per il giorno seguente Link al file CSV contenente i 96 prezzi quartorari + prezzo medio, aggiornato dopo le 15.10 e valido per il giorno seguente
 
Nord Italia https://t.me/PrezzoZonaleNord https://images.creasol.it/IT_NORD.csv https://images.creasol.it/IT_NORDq.csv  
Centro Nord Italia https://t.me/PrezzoZonaleCentroNord https://images.creasol.it/IT_CNOR.csv https://images.creasol.it/IT_CNORq.csv  
Centro Sud Italia https://t.me/PrezzoZonaleCentroSud https://images.creasol.it/IT_CSUD.csv https://images.creasol.it/IT_CSUDq.csv  
Sud Italia https://t.me/PrezzoZonaleSud https://images.creasol.it/IT_SUD.csv https://images.creasol.it/IT_SUDq.csv  
Calabria https://t.me/PrezzoZonaleCalabria https://images.creasol.it/IT_CALA.csv https://images.creasol.it/IT_CALAq.csv  
Sicilia https://t.me/PrezzoZonaleSicilia https://images.creasol.it/IT_SICI.csv https://images.creasol.it/IT_SICIq.csv  
Sardegna https://t.me/PrezzoZonaleSardegna https://images.creasol.it/IT_SARD.csv https://images.creasol.it/IT_SARDq.csv  

Press ctrl+shift+F5 to reload/update images!

Comparazione prezzi zonali orari delle zone italiane

Prezzo zonale per il Nord ItaliaAndamento prezzo medio, minimo, massimo energia elettrica degli ultimi 60 giorni

 

Prezzo zonale per il Centro-Nord ItaliaAndamento prezzo medio, minimo, massimo energia elettrica degli ultimi 60 giorni

 

Prezzo zonale per il Centro-Sud ItaliaAndamento prezzo medio, minimo, massimo energia elettrica degli ultimi 60 giorni

 

Prezzo zonale per il Sud ItaliaAndamento prezzo medio, minimo, massimo energia elettrica degli ultimi 60 giorni

 

Prezzo zonale per la CalabriaAndamento prezzo medio, minimo, massimo energia elettrica degli ultimi 60 giorni

 

Prezzo zonale per la SiciliaAndamento prezzo medio, minimo, massimo energia elettrica degli ultimi 60 giorni

 

Prezzo zonale per la SardegnaAndamento prezzo medio, minimo, massimo energia elettrica degli ultimi 60 giorni

For european people that use the free Domoticz home automation system, it's possible to install the script described below that automatically gets hourly electricity prices for the their zone and also solar energy production forecast in case they have one or more solar photovoltaic systems.

New to Domoticz? Check this page!

Electricity prices from Entso-e portal (for european countries)

The Entso-e EU portal permits to know the day-ahead electricity price for european countries and sub-zones, useful for who want to save money and help for electricity grid stabilization by charging the electric car when electricity price is low and control heatpump and boilers to reduce consumption when electricity price is high.

The LUA script_time_entsoe.lua for Domoticz, available in https://github.com/CreasolTech/domoticz_lua_scripts , permits to

  • define your bid zone (e.g. Germany, Netherlands, Northern Italy, ...)
  • get everyday, in the afternoon, the prices for the day ahead, hour by hour
  • save electricity hourly prices in a user variable (values separated by ";") with the average price in the end (total 25 values)
  • update a general counter so it's possible to have a chart with daily, weekly, montly, yearly with the powerful of Domoticz charts and reports.
  • compute the real cost of energy, as a linear function Cost=(Price+spread)*MULTIPLY_FACTOR+OFFSET , and update a general conter with that hourly cost

Why a variable? Because it can be easily accessed by any script/automation to decide when activate loads and how to control heatpump, boiler, electric car charging, ...

For example, if the heat pump permits to set the max power, it's possible to set the heat pump max power proportional to average_price/current_price or, even better, to (average_price/current_price)² .

Script to get electricy price for today and tomorrow, and compute the real cost of energy

Installation

cd DOMOTICZ/scripts/lua
git clone https://github.com/CreasolTech/domoticz_lua_scripts
# a new folder named domoticz_lua_scripts will be created, within all files
cd domoticz_lua_scripts
# copy files
cp script_time_entsoe.lua globalvariables.lua globalfunctions.lua ..
cd ..

globalvariables.lua contains the user configuration: note that many variables inside are used by other scripts, so you can edit just what you really need

globalfunctions.lua contains several useful functions that can be called by scripts

script_time_entsoe.lua contains some configuration parameters, in the top part: parameters can be moved to globalvariables.lua if need, in that way it will be possible to update the script without the need to reconfigure it. Also, the script contains all commands to fetch data from Entso-e and create the variables, charts, ...

To update the script, cd domoticz_lua_scripts directory and execute the command git pull then cp script_time_entsoe.lua ..

script for domoticz showing solar forecast and electricity prices in variables

Solar photovoltaic energy production forecast

The same script above can also fetch the solar energy production forecast for one or more photovoltaic plants, combining energy together to get an accurate energy production forecast.

The forecast can be useful for example to decide if keep heat pump / boiler ON during peak hours (when electricity price is high) or turn off heat pump / boiler because in the next hours we'll have a good solar production.

The same for electric car charging: an automation can decide if delay charging because we expect a huge photovoltaic production in the next hours.

The script permits to define one or more photovoltaic systems, defining the kWp and orientation for each string, so it's possible to get an accurate forecast: the system take into account the weather forecast for the selected location (coordinates).

The script write two user variables, containing the hourly and total energy forecast for today and tomorrow.

Montly and weekly prices

 

Een doe-het-zelf-slimme wallbox maken in samenwerking met Home Assistant om elektrische voertuigen op te laden

Domotics

Controleer de pagina in het Engels voor actuele informatie zonder vertaalfouten.

Zelfgemaakte wallbox met Home Assistant Iedereen die een elektrische auto gebruikt, wil deze op een slimme manier opladen :

  • het voorkomen van overbelasting
  • door alleen energie van fotovoltaïsche cellen te gebruiken, van de lente tot de herfst, vooral wanneer de energieprijs laag of negatief is
  • het maximaliseren van de vermogensfactor om de hoogste laadefficiëntie te verkrijgen Video waarin wordt getoond hoe de vermogensfactor toeneemt met het laadvermogen
  • het controleren en monitoren van het opladen via smartphone/tablet/pc
  • Integratie van de wallbox in het domoticasysteem , om een efficiënte lastverdeling te verkrijgen en energie in de auto op te slaan wanneer de energieprijs lager is.
  • laad het voertuig op wanneer het bijna vol is, door het minimale vermogen te gebruiken om de spanning onder de 253V te houden (om te voorkomen dat de omvormer wordt uitgeschakeld of losgekoppeld)

DomBusEVSE is een oplaadmodule die beschikbaar is met 2 protocollen:

  1. DomBus-protocol (propriëtair) met plug-in voor Domoticz en DomBusGateway Python-software die het DomBus-protocol omzet in MQTT-AutoDiscovery , bruikbaar met Home Assistant , Node-RED , OpenHAB , ioBroker, ... In dit geval worden alle entiteiten automatisch aangemaakt. Ook voor HAOS of Home Assistant is de DomBusGateway-add-on beschikbaar om met alle DomBus-modules te communiceren.
  2. Modbus-protocol (standaard) voor Home Assistant , Node-RED , OpenHAB en andere systemen die gebruikmaken van het Modbus RTU-protocol, inclusief aangepaste beheerprogramma's.

Het werkt ook stand-alone , voor het geval dat de domotica-controller offline is.

Hardwarevereisten voor het zelf maken van een laadstation voor elektrische voertuigen

Zelf een laadstation maken is vrij eenvoudig , maar je moet wel wat weten over elektrische systemen en stroomvoorziening. Laadsessies duren meestal lang, dus je moet oppassen dat de aansluitingen en kabels niet oververhit raken .

Hoe werkt een EVSE-module? Deze meet het stroomverbruik van het elektriciteitsnet (of het stationaire accuvermogen van het elektriciteitsnet), stuurt een PWM-signaal naar de auto om het maximaal toegestane laadvermogen/de maximale laadstroom in te stellen via de Control Pilot- draad en leest de voertuigstatus uit via dezelfde draad.

Voor het maken van een zelfgemaakt laadstation (met links naar onze winkel: het zijn standaardapparaten en kunnen dus overal worden gekocht) heb je de volgende benodigdheden nodig:

  1. DomBusEVSE , dat is de laadcontroller
  2. Beveiligingen: type B aardlekschakelaar wordt aanbevolen (2P voor eenfase of 4P voor driefasen)
  3. Contactor , om de netvoeding mogelijk te maken (2P voor eenfase of 4P voor driefasen)
  4. EV-kabel , 32A voor eenfase, 16-32A voor driefase
  5. Vermogensmeter om het vermogen, de energie, de spanning en de vermogensfactor van een elektrische auto te meten (optioneel, maar aanbevolen)
  6. Bidirectionele vermogensmeter die in de hoofdschakelkast wordt geplaatst om de met het net uitgewisseld energie te meten

Er zijn twee sets met essentiële onderdelen verkrijgbaar in onze winkel:
- Kit om zelf een eenfase-wanddoos te maken
- Kit om zelf een driefasen-wanddoos te maken

Als er al een energiemeter beschikbaar is in het domoticasysteem om het netvermogen te meten , of een omvormer voor zonne-energie die deze gegevens levert , hoeft u er geen nieuwe toe te voegen om de wallbox te maken: een eenvoudige automatisering die de netvermogenwaarde naar de DomBusEVSE-module stuurt, is voldoende.

De vermogensmeter om de spanning/het vermogen/de energie/de arbeidsfactor van elektrische voertuigen te meten is optioneel, maar aanbevolen. Deze kan naar wens worden aangesloten op de DomBusEVSE-poort of op de domoticacontroller.

Meer informatie over het maken van de wallbox vindt u op de DomBusEVSE-pagina .

Heeft u meer ondersteuning nodig? Ga dan naar:

  • DomBusEVSE-pagina
  • DomBusGateway-pagina
  • DomBus voor Home Assistant GitHub-pagina
  • E-commercewebsite

Voor interactieve ondersteuning kunt u contact met ons opnemen via Telegram of Whatsapp.

DomBusEVSE integreren in Home Assistant met behulp van het DomBus-protocol

  1. Zorg ervoor dat u de DomBusEVSE-module met DomBus-firmware koopt.
  2. Installeer DomBusGateway Python-software, die een "DomBus naar MQTT-AD"-service biedt
  3. Zorg dat alle benodigde bedrading voor uw wanddoos aanwezig is, sluit aardlekschakelaar, energiemeters (met DDS238 ZN/s voor één fase of DTS238 ZN/s voor drie fasen), contactor, EV-kabel, EVSE-module, ... aan. De stroomaansluiting moet zorgvuldig gebeuren!
  4. Wanneer EVSE is verbonden met de HA-controller en van stroom wordt voorzien, zou u onmiddellijk een nieuw apparaat met adres ffe3 moeten zien binnen alle entiteiten voor de lader.

Entiteiten en dashboard voor DomBusEVSE EV-lader (zelfgemaakte EV-lader)

Hoofdentiteiten zijn toegankelijk via MQTT, met behulp van het onderwerp /dombus/BBHHHH_PPPP/state om de huidige status op te halen, en /dombus/BBHHHH_PPPPP/set om een nieuwe waarde in te stellen, waarbij BB=busnummer, HHHH het moduleadres in hexadecimale notatie is en PPPP het poortnummer, bijvoorbeeld 01ffe3_0004 om toegang te krijgen tot EV Mode-poort (4) voor module 0xffe3 op bus 1:

  1. EV-modus : regelt het opladen van de EV en kan worden ingesteld op:
    Uit : opladen uitgeschakeld
    Zonne-energie : gebruik alleen energie van een fotovoltaïsche/stationaire batterij (netstroom <= 0)
    25% : gebruik 25% van de stroom uit het net (als u het netvermogen <= EV MaxPower * 0,25 houdt, bijvoorbeeld door EV MaxPower = 6 kW in te stellen, kan de EVSE tot 1,5 kW stroom uit het net gebruiken)
    50% : gebruik 50% van de stroom uit het net (netstroom <= EV MaxPower * 0,5)
    75% : gebruik 75% van de stroom uit het net (netstroom <= EV MaxPower * 0,75)
    100% : gebruik 100% van de stroom uit het net (netstroom <= EV MaxPower)
    Man : werkt in beheerde modus, waarbij een automatisering de juiste waarde van de elektrische voertuigstroom levert voor het opladen. Dit kan handig zijn om meerdere laders te beheren en het vermogen met een extern algoritme over de laders te verdelen.
    In de 100%-modus is het ook mogelijk om het laadvermogen op deze manier te maximaliseren: in Italië is het mogelijk om permanent 110% van het contractuele vermogen te gebruiken, en 127% gedurende maximaal 90 minuten en maximaal 50% van de inschakelduur. Met bijvoorbeeld een contactvermogen van 6000 W kunt u dus EVMaxPower = 6600, EVMaxPower2 = 7600, EVMaxPowerTime = 1200, EVMaxPowerTime2 = 1200 instellen om het EVSE-laadvermogen op 100% te krijgen door 20 minuten 6600 W te gebruiken, gevolgd door 20 minuten 7600 W, vervolgens weer 20 minuten 6600 W, enzovoort.
  2. EV-status : geeft de huidige voertuigstatus weer:
    Uit : onbekende status
    Schijf : voertuig losgekoppeld
    Con : voertuig aangesloten
    Ch : verantwoordelijk voertuig
    Ventilatie : voertuig in controle, verzoek om ventilatie
    AEV : voertuig heeft de ALARM-status teruggegeven
    APO : stroomstoringsfout (geen 230Vac gedetecteerd door de EV-poort)
    AW : 230V gedetecteerd door de EV-poort, ook al zou de contactor uit moeten staan: is het contact van de contactor gelast?
  3. EV-stroom (bereik 6-36): geeft de stroomsterkte aan die het voertuig kan verbruiken, van 6 tot EVMaxCurrent Ampere. Normaal gesproken wordt dit automatisch beheerd door de EVSE-microcontroller, afhankelijk van de EV-modusinstelling. Deze kan door de gebruiker (of automatisering) worden ingesteld wanneer de EV-modus is ingesteld op Man , zoals hierboven uitgelegd.
  4. EV MaxCurrent (bereik: 6÷36): stelt de maximaal toegestane stroomsterkte voor het opladen in, van 6 tot 32 Ampère.
  5. EV MinVoltage (bereik 0÷440): stelt de minimale spanning in die tijdens het opladen moet worden aangehouden. Dit kan worden gebruikt wanneer de accu van het elektrische voertuig bijna vol is, om de laadstroom/het laadvermogen te beperken tot het minimum dat nodig is om de spanning onder de ingestelde waarde te houden. In de lente en zomer kan het bij gebruikers van een fotovoltaïsch systeem voorkomen dat de netspanning boven de 253 V (éénfase) of 440 V (driefase) uitkomt, waardoor overspanningsbeveiliging of vermogensreductie van de omvormer optreedt, wat energieverspilling veroorzaakt (die de omvormer niet kan produceren vanwege de overspanning). Om overspanning te voorkomen, is het mogelijk om het opladen van het elektrische voertuig te starten, maar om een langere laadsessie te krijgen, vooral wanneer de accu van het elektrische voertuig bijna vol is, kan het handig zijn om EV-modus = Zonne-energie en EV MinVoltage = 248 V of 432 V in te stellen. Om het voertuig op volle snelheid op te laden, moet de EV MinVoltage worden ingesteld op 207 of 360 volt. Video die laat zien hoe deze parameter werkt
  6. EV-vermogen : toont het vermogen dat aan het voertuig wordt geleverd, de som van het EV-vermogen van de zon + het EV-vermogen van het net
  7. EV-energie van zonne-energie : toont de energie die aan het voertuig wordt geleverd door fotovoltaïsche cellen.
  8. EV-stroom van het net : toont de stroom die aan het voertuig wordt geleverd, afkomstig van het elektriciteitsnet + stationaire accu (indien aanwezig)
  9. EV-spanning : geeft de laadspanning weer (vóór de contactor)
  10. EV PF : geeft de vermogensfactor weer (kan veel lager zijn dan 95% bij opladen met een lage stroom => inefficiënt opladen)
  11. Netstroom : toont het werkelijke vermogen gemeten door de netstroommeter. Indien de netstroommeter niet rechtstreeks op de EVSE-module is aangesloten, is een automatisering nodig om het huidige netstroomvermogen (negatief indien er stroom naar het net wordt geëxporteerd) naar deze entiteit te sturen. In het geval van een hybride zonne-omvormer met een stationaire accu is het mogelijk om de waarde power_from_grid - power_to_battery te sturen, zodat de EVSE in de zonnemodus alle beschikbare stroom van de fotovoltaïsche energie verbruikt (geen stroom van het net en geen stroom van de stationaire accu).

DomBusEVSE integreren in Home Assistant met behulp van het Modbus-protocol

Installeer de Modbus- integratie.

Haal de configuratiebestanden op van de GitHub-pagina die speciaal is bedoeld voor DomBusEVSE en Home Assistant en plaats ze in de HA config-map. Je kunt de configuratiebestanden voor verschillende modules bekijken, dus je moet de benodigde modules inschakelen en de rest uitschakelen.

Als u Engels kent, bekijk dan deze pagina in het Engels, omdat andere talen in de war kunnen raken door de ongewenste vertaling van sommige parameternamen.

Houd er rekening mee dat:

  1. Deze EVSE kan worden geconfigureerd in de " Managed mode " (een automatisering kan periodiek de laadstroomwaarde instellen, van 6 tot MAXCURRENT): op deze manier wordt de EVSE dom en laat een externe automatisering het laden en balanceren regelen via verschillende EVSE die op hetzelfde elektrische systeem zijn aangesloten.
  2. Normaal gesproken is de EVSE niet geconfigureerd in de "Managed mode", maar kan wel worden geconfigureerd in Uit (niet opladen), Zonne-energie (Netstroom = 0), 25% (Netstroom gebruiken = 25% van MAXPOWER), 50% (50% van MAXPOWER gebruiken), 75% en 100% (MAXPOWER gebruiken van het net). Om correct te werken, moet u het volgende doen:
    1. Sluit een ondersteunde vermogensmeter aan (DDS238-2 ZN/S voor eenfase, DTS238-4 ZN/S of DTS238-7 ZN/S voor driefase) die is geprogrammeerd met slave-adres=3 en is aangesloten op de extra Modbus-poort van de EVSE
    2. Als u al een stroom-/energiemeter op het domoticasysteem hebt aangesloten, gebruik dan een eenvoudige automatisering om het huidige vermogen (in watt) dat van het net wordt afgenomen (negatief indien aan het net geleverd) naar de entiteit Netstroom te schrijven. Een voorbeeld is beschikbaar in het bestand dombus/dombusevse/dombusevse_automations.yaml. Het netvermogen moet elke 2-6 seconden worden geschreven tijdens het opladen.
      Automation to feed the grid power value to DomBusEVSE module

Voor extra ondersteuning kunt u terecht bij de DomBus-telegramgroep .

Slimme doe-het-zelf-wandbox voor Home Assistant

Zelfgemaakte eenfase-wanddoos

Zelfgemaakte slimme wanddoos die werkt met HomeAssistant

Schema voor de zelfgemaakte wallbox met DomBusEVSE-module en HomeAssistant

Elektrische voertuigen op volle snelheid en met maximale efficiëntie opladen met een zelfgemaakte wallbox die werkt met Domoticz Home Assistant Node-RED ....

Drie-fase zelfgemaakte slimme wanddoos

Zelfgemaakte slimme wanddoos met DomBusEVSE, driefase, 11 kW of 22 kW (of minder)

Zelfbouw-wanddoos van SCiunczyk , met schakelmogelijkheid voor één of drie fasen en WiFi/Modbus-adapter

Het project, waarbij gebruik wordt gemaakt van onze EVSE-module die via een zelfgemaakte WiFi/RS485-omvormer met ESP32 + ESPHome-firmware is verbonden, wordt beschreven op de GitHub-pagina https://github.com/SCiunczyk/wallbox-diy. Hiermee kan een elektrisch voertuig worden opgeladen met behulp van éénfasestroom (laag vermogen, van 1 kW tot 7 kW, over het algemeen gebruikt in de zonne-energiemodus) en driefasestroom (gebruikt om het voertuig op volle snelheid op te laden, van 4 kW tot 22 kW).
Hartelijk dank aan Slawomir voor het delen van de informatie over zijn slimme wallbox!

Selecteerbare wanddoos met één of drie fasen met DomBusEVSE-module, werkend met Home Assistant

 

Meer informatie op https://www.creasol.it/EVSE

Het verbinden van een netwerk van DomBus-modules via TCP (WiFi, Ethernet, ...) of draadloze radioverbinding

Domotics

DomBus-modules worden met elkaar verbonden door een seriële bus , met behulp van een dunne/gemeenschappelijke alarmkabel met 4 draden: 2 voor de 12-24Vdc-voeding en 2 draden voor de data op 115200bps 8,n,1 met gebruik van de RS485 industriële gebalanceerde bus .

Normaal gesproken wordt de bus met een dunne kabel verbonden met de domoticacontroller, met behulp van een goedkope RS485/USB-adapter.

Als de bus niet fysiek kan worden aangesloten op de domotica-controller (andere ruimte, geen mogelijkheid om kabels te trekken, ...), is het mogelijk om een radioverbinding, MQTT of TCP-tunnel te gebruiken om de communicatie tussen de domotica-controller en het DomBus-netwerk in stand te houden.


How to connect DomBus modules to a domotic controller

Twee RS485-bussen met elkaar verbinden via een radioverbinding

Werkt met DomBus-modules die geprogrammeerd zijn met DomBus- en Modbus-protocollen.

Er zijn radioapparaten op de markt verkrijgbaar waarmee twee RS485-bussen transparant met elkaar kunnen worden verbonden. Zo is het mogelijk om radioverbindingen te maken :

  • een domotica-controller voor een of meer DomBus-modules op een afgelegen locatie
  • een DomBus-netwerk met een ander netwerk op een afgelegen locatie

Hieronder vindt u een beschrijving van de verbinding met behulp van verschillende radiosystemen.

1. Gebruik EBYTE EWM-290-400T20D om een transparante draadloze verbinding tussen twee RS485-bussen te krijgen

EBYTE model EWM-290-400T20D is een zeer goedkope LoRa-module met RS485-interface die werkt met een bitsnelheid van 62500 bps in de 433÷434 MHz-band met maximaal 20 dBm vermogen en maximaal 115200 bps op de RS485-poort. Let op: de module heeft geen CE-markering en mag in Europa alleen worden gebruikt voor testdoeleinden.

Het wordt geleverd met een 5-aderige kabel:

  • 5V moet worden aangesloten op 4,5÷5,5V, maximaal stroomverbruik 100mA
  • GND moet met de aarde worden verbonden
  • TXD/A moet worden aangesloten op RS485 A
  • RXD/B moet worden aangesloten op RS485 B
  • STB: maakt niet uit

De 433MHz-antenne met SMA-male connector wordt niet bij de module geleverd en moet dus apart worden aangeschaft.

EWM290-moduleconfiguratie

De module kan worden aangesloten via AT-commando's. De standaard UART-modus is 9600,8,n,1 en elk commando moet als één enkele reeks worden verzonden, zonder vertraging tussen de tekens. U kunt elk commando dus met de muis selecteren en in het terminalprogramma plakken.

In Linux is het mogelijk om picocom -b9600 /dev/ttyUSBx te gebruiken om het apparaat aan te sluiten op de werkende bitsnelheid (standaard 9600, -b115200 als deze al is geconfigureerd) en de opdracht te verzenden

AT+MODE=2

om de module in de configuratiemodus te zetten: de module selecteert nu 9600 bps, dus als u de opdracht met een andere bitsnelheid hebt gegeven, sluit picocom dan af (ctrl-a ctrl-x) en voer de opdracht picocom -b9600 /dev/ttyUSBx opnieuw uit. Stuur vervolgens elk van de volgende regels met een willekeurige KEY-waarde tussen 0 en 65535 (niet 12345!).

AT+TARIEF=7
AT+PAKKET=0
AT+VERMOGEN=0
AT+LBT=1
AT+UART=7,0
AT+SLEUTEL=12345
AT+KANAAL=24
AT+MODE=0

De module bevindt zich nu in de transparante modus en vormt een draadloze radioverbinding tussen de twee RS485-bussen.


 

LAN/WiFi/Internet-verbinding tussen domotica-controller en DomBus-modules

Er zijn enkele oplossingen overwogen om de DomBus-module te laten communiceren met de domotica-controller.

Houd er rekening mee dat DomBus-modules beschikbaar zijn met twee verschillende firmwares:

1. Ondersteuning van het DomBus-protocol , een gepatenteerd protocol met een zeer lage latentie, ideaal voor relais, uitgangen, sensoren, ingangen, knoppen/schakelaars, alarmsensoren, EVSE, Solar Tracker-controller en meer... Met behulp van de Domoticz -plug-in of DomBusGateway (DomBus 2 MQTT-brug met AutoDiscovery, compatibel met alle huisautomatiseringssystemen die MQTT ondersteunen ), worden alle entiteiten automatisch aangemaakt.

2. Ondersteunt het Modbus-protocol , standaard, niet geschikt voor knoppen/schakelaars of alarmsensoren die zonder latentie beheerd moeten worden. Het Modbus-protocol is geschikt voor relaisuitgangen, EVSE-modules, Solar Tracker-controllers, ingangen van temperatuur-/vochtigheidssensoren en andere ingangen/sensoren met een pollinginterval van 5 seconden of langer. Het is compatibel met vrijwel alle domoticasystemen en kan ook nuttig zijn voor het realiseren van maatwerkproducten met behulp van het bekende Modbus-protocol .

Building automation network using DomBus modules and WiFi/Internet trunking

1. Gebruik van DomBusGatewayPIS-hardware (DomBus 2 MQTT-brug)

Werkt met DomBus-modules die geprogrammeerd zijn met het DomBus-protocol.

Dit is een gebruiksklare minicomputer, gebaseerd op de Rock PI S, met een verbruik van slechts 400 mW. Hij is uitgerust met Linux + firewall + backup + Mosquitto + DomBusGateway-software. Hiermee kunt u één of meer DomBus-modules (met behulp van het DomBus-protocol , niet Modbus!) verbinden met een MQTT-broker (in dezelfde minicomputer of een externe broker zoals Mosquitto die draait op de Home Assistant-controller). Communicatie met domoticasystemen verloopt via het MQTT-standaardprotocol, zelfs met de AutoDiscovery-extensie voor controllers die deze functie ondersteunen (zoals Home Assistant, NodeRED, OpenHAB, ioBroker).

De module is beschikbaar op https://store.creasol.it/DomBusGatewayPIS , maar je kunt hem ook zelf maken met behulp van de image die gratis te downloaden is. Kijk op https://github.com/CreasolTech/DomBusGateway voor de instructies.

 

2. Virtuele seriële verbinding via TCP/IP tussen twee Linux-apparaten

Werkt met DomBus-modules die geprogrammeerd zijn met DomBus- en Modbus-protocollen.

Als de domotica-controller is gehost in een Linux-apparaat (bijvoorbeeld een Raspberry PI of NUC, nu "main" genoemd) en de DomBus-apparaten zijn verbonden met een ander Linux-apparaat (Raspberry, Rock PI S, QNAP, ..., nu "slave" genoemd), is het mogelijk om de hoofdcontroller het DomBus-netwerk te laten verbinden via een TCP/IP-verbinding, bekabeld of draadloos, op de volgende manier:

  1. Installeer de ser2net -service op het slave-apparaat (waar het DomBus-netwerk is aangesloten met behulp van de goedkope USB/RS485-adapter):
    sudo apt install ser2net
  2. Configureer de ser2net-service door het bestand /etc/ser2net.yaml aan te passen:
    sudo nano /etc/ser2net.yaml
  3. Verwijder bestaande, niet-gebruikte verbindingen en voeg de volgende regels in om de verbinding met één bus te definiëren:
    connection: &dombus
    accepter: tcp,2000
    enable: on
    options:
    kickolduser: true
    telnet-brk-on-sync: true
    connector: serialdev,
    /dev/ttyUSB0,
    115200n81,local
  4. Het is mogelijk om de TCP-poort (2000 in het voorbeeld) en de seriële poort (ttyUSB0 in het voorbeeld) te wijzigen.
  5. Als er meer dan één DomBus-bus op het slave-apparaat is aangesloten, definieert u voor elke bus een verbinding (met een andere TCP-poort voor elke bus).
  6. Start de ser2net-service opnieuw met de opdracht service ser2net restart
  7. Test of het werkt door de opdracht telnet localhost 2000 op het slave-apparaat te gebruiken; ctrl+] om af te sluiten
  8. Installeer de socat -applicatie op het hoofdapparaat (met Domoticz, Home Assistant, Node-RED, OpenHAB-controller...):
    sudo apt install socat
  9. Voer de volgende opdracht uit om de virtuele seriële poort /dev/ttyUSBDomBusNet te maken om de DomBus-apparaten te beheren die aan het slave-apparaat zijn gekoppeld: socat pty,link=/dev/ttyUSBDomUSBBusNet tcp:192.168.6.2:2000 waarbij 192.168.6.2 moet worden vervangen door het IP-nummer van het slave-apparaat
  10. Als de verbinding via internet of een of meer routers met NAT tot stand komt, is het wellicht nodig om poortdoorsturing/bestemmings-NAT op de routers te configureren
  11. Test het hele systeem door de opdracht cat /dev/ttyUSBDomBusNet uit te voeren: als dit werkt, schrijf dan een klein bash-script om de virtuele seriële poort te activeren en roep dat script aan vanuit /etc/rc.local. Zorg ervoor dat er aan het eind het teken "&" staat, zodat het script op de achtergrond wordt uitgevoerd:

    #!/bin/bash
    # New file /usr/local/sbin/dombusnet.sh , permissions 0700
    # Thanks to Patrick Schaerer for testing and suggestions
    TTYDEV=/dev/ttyUSBDomBusNet
    TCPSERVER=192.168.6.2
    TCPPORT=2000
    while true; do
    socat pty,link=${TTYDEV},waitslave tcp:${TCPSERVER}:${TCPPORT}
    sleep 5
    done
    # End of file


    # File /etc/rc.local
    # ........
    /usr/local/sbin/dombusnet.sh &
    exit 0

Dit is een goedkopere oplossing om DomBus-modules te bedienen via een bekabelde of draadloze verbinding, voor het geval dat DomBus-modules zich in een gebied bevinden waar al een Linux-apparaat actief is.

3. DomBus-modules aansluiten met behulp van een RS485-naar-Ethernet- of WiFi-converter

Werkt met DomBus-modules die geprogrammeerd zijn met Modbus-protocollen. Sommige LAN/wifi-modules ondersteunen ook een virtuele seriële poort en werken ook met het DomBus-protocol.

Met behulp van een ethernet <--> RS485-converter zoals de MOXA NPORT of andere apparaten kunt u heel eenvoudig RS485-apparaten (DomBus-modules of andere Modbus RTU-modules) aansluiten die zich op een andere plek dan de controller bevinden.

In dit geval moet er een driver worden geïnstalleerd om een virtuele COM-poort (virtuele seriële poort) te creëren voor toegang tot de externe RS485-bus.

Hieronder vindt u een lijst met RS485 naar ethernet converters :

  • Waveshare RS485 naar WiFi/Ethernet : niet getest, maar de fabrikant zegt dat het werkt met behulp van het socat-programma (Linux)
  • Waveshare RS485 NAAR ETH (ook beschikbaar met PoE-ondersteuning ): niet getest, maar de fabrikant zegt dat het werkt met behulp van het socat-programma (Linux)
  • PUSR W610 RS485/RS232 naar wifi/ethernet : niet getest, maar de fabrikant zegt dat het werkt met het SoCAT-programma (Linux) of de Windows-software van de fabrikant. De TCP-poort is configureerbaar op de module (lokaal/extern poortnummer).
  • Protoss PW11 of PW21 RS485 naar WiFi/Ethernet : niet getest, maar het zou moeten werken
  • Lilygo T-CAN485 : WiFi-board gebaseerd op ESP32, getest met DomBus-modules met Modbus-firmware en een Loxone-controller. (Bedankt Filip voor het delen van de informatie!)

Als u andere apparaten kent die voor dit doeleinde gebruikt kunnen worden tegen een redelijke prijs, laat het ons dan weten.

4. ESP32 + ESPHome gebruiken om Modbus-modules zoals DomBus met Modbus-firmware aan te sluiten

Werkt met DomBus-modules die geprogrammeerd zijn met het Modbus-protocol.

Slawomir beschrijft op de GitHub-pagina https://github.com/SCiunczyk/wallbox-diy hoe je ESP32 + ESPHome-firmware kunt gebruiken om een gateway te creëren tussen Modbus-apparaten (DomBus-modules geprogrammeerd met Modbus-firmware, niet Dombus-firmware) en Home Assistant, via wifi. Dit is slechts een deel van het beschreven project, dat het mogelijk maakt om een elektrisch voertuig op te laden met behulp van eenfasestroom (laag vermogen, van 1 kW tot 7 kW, meestal gebruikt in de zonne-energiemodus) en driefasestroom (gebruikt om het voertuig op volle snelheid op te laden, van 4 kW tot 22 kW) met behulp van de Creasol DomBusEVSE-module .
Hartelijk dank aan Slawomir voor het delen van de informatie over zijn slimme wallbox!

 

Domoticz, betrouwbaar gratis en open source domoticasysteem

Domotics

Invoering

Domoticasystemen hebben twee hoofddoelen:

  1. maak het gebouw slim en voeg nieuwe functies en automatiseringen toe
  2. stroomverbruik besparen

maar om voordeel te halen uit dergelijke technologieën moet het GEMAKKELIJK zijn !

Domoticz is gratis open source-software die werkt als controller voor een domoticasysteem, en het is vrij eenvoudig te implementeren door mensen met een minimale programmeervaardigheid.

Het is geschreven in C++, vereist zeer weinig resources, is multi-platform en beheert een grote hoeveelheid domotica-hardware (sensoren, actuatoren, I/O's, ...).

Hoewel het het beste past bij een Linux-platform (bijvoorbeeld een Raspberry PI single board controller, met een stroomverbruik van minder dan 3 W, uitgerust met Raspbian Linux OS, of Rock Pi S dat minder dan 0,5 W verbruikt), werkt het ook op Windows en MacOSX.

Pluspunten

  • Geoptimaliseerd voor gebruik met computers met weinig bronnen : 0,5 GB RAM en 1 GHz dual-core CPU is genoeg voor vrijwel elk domoticasysteem!
  • Gebruikt minder dan 50 MB schijfruimte, exclusief back-ups.
  • Geschreven in een programmeertaal op laag niveau, C++ : het is snel en licht .
  • Ondersteunt verschillende programmeertalen (python, perl, php, lua) voor plug-ins (gebruikt om nieuwe hardware en protocollen te implementeren) en scripts (gebruikt om automatiseringen te creëren en om de geïnstalleerde apparaten te beheren).
  • Bijna alle configuraties worden gedaan door WebUI : het is niet nodig om bestanden te bewerken!
  • WebUI kan worden aangepast, en het is ook mogelijk om Dashticz te gebruiken om een andere WebUI te implementeren (zie afbeelding )
  • Zeer stabiele, gemakkelijke updates zonder zorgen .
  • WebUI kan worden gebruikt door elke webbrowser die HTML5 ondersteunt, is responsief en werkt dus goed met pc, tablet en smartphone. Ook zijn er enkele APPs voor Android en iOS beschikbaar, maar niet noodzakelijk.
  • De webUI integreert ook de plattegronden en kamerplannen om een lay-out te tonen met alle sensoren/actuatoren erin.

Nadelen

  • Gebrek aan ondersteuning voor een bepaald hardwaretype
  • WebUI ziet er misschien "ouderwets" uit

Enkele screenshots en video's van Domoticz-panelen, weergegeven in een pc-browser

Energiepaneel , met weergave van het opladen van auto's, warmtepompen, fotovoltaïsche energie, geïmporteerde en geëxporteerde energie en bedieningselementen met betrekking tot energie/kracht.

Energiepaneel in Domoticz

Grafieken voor het eigen energieverbruik thuis

Voertuigpaneel , met weergave van het opladen van de auto (met behulp van onze DomBusEVSE-module om een doe-het-zelf-wallbox te maken), totale laadenergie, ook verdeeld in energie uit fotovoltaïsche energie en uit het elektriciteitsnet, huidig batterijniveau en bereik, laadvermogensfactor om de efficiëntie, voertuigafstand en plaats, ...

Kia voertuigpaneel in Domoticz

 

Warmtepomppaneel , dat het huidige stroomverbruik, fotovoltaïsch vermogen, instelpunten, status, ... toont. Het volledige paneel is erg lang en bevat ook de klepstatus, temperatuur en vochtigheid van de ruimte, ... Het is mogelijk om op te merken dat het vermogen van de warmtepomp automatisch wordt beheerd door een Domoticz-automatisering (script) om alle energie uit fotovoltaïsche energie te verbruiken .

Warmtepomppaneel in Domoticz

Warmwaterpaneel , met behulp van een ketel met geïntegreerde warmtepomp, met enkele bedieningselementen die rechtstreeks in de warmtepomp zijn geïntegreerd, en enkele externe sensoren.

Warmwater middels warmtepomp, met Domoticz domoticasysteem

Warmwaterverbruik

Inbraakalarmpaneel , met 3 werkmodi, weergavestatus (om IPcams te zien), sirenes, enkele lichten, PIR en magnetische contactsensoren.

Alarmpaneel met Domoticz domoticasysteem, met enkele magneetcontactsensoren, sirenes, display, bewegingssensor, ...

Plattegronden (met dank aan Paolo Patt. voor de video)

Wat je kunt doen met Domoticz

  • Verlichting: gaat AAN/UIT met drukknoppen , op een specifiek tijdstip ( bijvoorbeeld 25 minuten na zonsondergang inschakelen en 40 minuten vóór zonsopgang uitschakelen ). Dimmen en van kleur veranderen .
  • Deurbel: maakt een momentopname van IPcam wanneer iemand aanbelt en stuurt de foto via Telegram naar één persoon of een groep: ook e-mail en vele andere meldingssystemen zijn geïmplementeerd.
  • Poort, voetgangersdeur, garagedeur, hoofddeur kunnen op afstand worden geopend (bijvoorbeeld vanaf een smartphone): wanneer Amazon-bezorger aanbelt en je weg bent, zie je de foto op Telegram en kun je de poort openen om te laten hij komt binnen en levert goederen voor u af!
  • Weersensoren : buitentemperatuur, vochtigheid, druk, regen, wind, windrichting, .... kunnen worden gemonitord en vastgelegd in grafieken
  • Bewaakt de kamertemperatuur, relatieve vochtigheid, CO 2 en beheert het verwarmings-/koelings-/ventilatiesysteem op een slimme manier
  • Bewaakt het stroomverbruik/de productie van/naar het elektriciteitsnet , stuurt een waarschuwing wanneer het stroomverbruik een drempel bereikt waarboven er een dreigende stroomonderbreking zal zijn, en activeert/deactiveert apparaten om het stroomverbruik te optimaliseren
  • Wanneer stroom uit hernieuwbare bronnen beschikbaar is (bijvoorbeeld fotovoltaïsche zonne-energie), kan deze de warmtepomp zo beheren dat de meeste energie uit hernieuwbare bronnen wordt verbruikt
  • Bewaakt het niveau van de regenwatertank dat wordt gebruikt voor de irrigatie van tuin en moestuin
  • Beheer de alarmsensoren (magneetcontactsensoren, PIR's, radars, ...) en sirenes volledig , om een volledig functioneel en aanpasbaar inbraakalarmsysteem te krijgen
  • ...

Hardware-ondersteuning

  • RaspberryPI en RockPI GPIO's
  • DomBus- modules
  • ESP8266, ESP32 en afgeleiden: goedkope WiFi-modules met meerdere I/O's die meerdere apparaattypen kunnen beheren
  • RFXcom, Zwave, Enocean draadloze apparaten op 433/868/915 MHz
  • ZigBee-apparaten, op 2,4 GHz
  • meerdere 1wire- en I2C-busapparaten
  • Philips Hue (RGB led-lampen)
  • LAN GPIO's en sensoren (Denkovi, Lantronix, ...)
  • meerdere zonne-omvormers

en vele andere apparaten en protocollen.

Bekijk het artikel dat in het kort laat zien hoe je een domoticasysteem ontwerpt met behulp van DomBus-modules !!

FramboosPI

Hoewel Domoticz op veel platforms werkt, waaronder Windows en Mac, is Raspberry een goede oplossing, een single-board computerhardware met quad-core ARM MCU die stabiel en goedkoop is en normaal gesproken minder dan 3 W verbruikt.

Normaal gesproken is Raspberry uitgerust met een Raspbian-besturingssysteem (Debian GNU/Linux voor Raspberry), en zoals elk Linux-besturingssysteem ondersteunt het vele diensten zoals web, dhcp, dns, ftp, Samba, mail, ... veilig en betrouwbaar.

RockPI S

Dit is een zeer kleine single board computer met quad-core CPU, 512 MB RAM en een zeer laag stroomverbruik: normaal gesproken 400 mW. Een ideale oplossing voor Domoticz, als je werkt zonder veel scripts (automatiseringen) die veel CPU vereisen.

 

Domoticz- en Creasol DomBus-modules

Wij zijn een elektronisch bedrijf dat domoticasysteemmodules produceert die zijn geoptimaliseerd voor hoge betrouwbaarheid en een zeer laag stroomverbruik, verkrijgbaar met 2 verschillende firmwares:

  1. DomBus eigen protocol, werkend met Domoticz
  2. Modbus-standaardprotocol, werkt met vrijwel alle domoticasystemen

Creasol DomBus-modules en Domoticz

Welk besturingssysteem gebruik je voor Domoticz?

  • Linux (Raspberry PI, Rock PI, NUC, PC, ....)? Je kunt de Creasol DomBus plugin op twee manieren installeren:
    1. door Python Plugin Manager of Domoticz Plugin Manager te gebruiken, als u deze hebt geïnstalleerd: dit is een Python-plug-in waarmee u eenvoudig andere Python-plug-ins kunt installeren en bijwerken.
    2. door de Creasol DomBus-plug-in op deze manier op te halen:
      cd /home/pi/domoticz/plugins #voer de map domoticz/plugins in
      git-kloon https://github.com/CreasolTech/CreasolDomBus
  • Windows: voer in de domoticz-map de map met plug -ins in (of maak deze aan), maak een CreasolDomBus- submap en plaats daarin plugin.py en CreasolDomBusProtocol.py die u kunt downloaden van https://github.com/CreasolTech/CreasolDomBus .

Start Domoticz opnieuw op en in Instellingen -> Hardware vindt u nieuwe Creasol DomBus-hardware: voeg een instance toe, geef een naam op (bijvoorbeeld dombus), selecteer de seriële poort die is aangesloten op de RS485/USB-converter (of de virtuele seriële poort die is aangesloten op een netwerk/RS485-module) en klik op de knop Toevoegen.

Wanneer u een nieuwe DomBus-module aansluit, vindt u een nieuw apparaat in het Domoticz Switches-paneel : selecteer het ( knop Bewerken ) en verander het adres in een uniek adres, door het veld Beschrijving van het apparaat te wijzigen en de tekst HWADDR=0x0001 toe te voegen (zet de adressen op 1, als dit de eerste module is), of schrijf een adres naar keuze. Klik op de knop Opslaan en laad vervolgens het paneel Schakelaars (of het paneel Hulpprogramma's, ...) opnieuw. U zult nieuwe apparaten vinden die aan die module zijn gekoppeld.
De volgende gekoppelde modules worden op dezelfde manier weergegeven, en op dezelfde manier moet u het standaardadres wijzigen in 0x0002, 0x0003 enzovoort. Elke module, één uniek adres! Domoticz voegt automatisch één apparaat toe voor elke modulepoort .

Ook kunnen veel modulepoorten op verschillende manieren worden geconfigureerd, zo kan een digitale ingang ook worden geconfigureerd als water/gas/energieteller, twinknop (OMHOOG/OMLAAG-knop bestuurd door een enkele poort), temperatuursensor NTC, analoge ingang (naar een spanning of een weerstandswaarde meten), afstandssensor, ...
Met Domoticz kan de configuratie worden uitgevoerd door eenvoudigweg het veld Beschrijving van het apparaat te schrijven .

Ook ondersteunen DomBus-modules (met DomBus-protocol) DCMD-opdrachten : net als bij KNX is het mogelijk om een poort in te stellen om automatisch verschillende apparaten te activeren , bijvoorbeeld als er kort op een knop wordt gedrukt, schakelt u het licht in (aangesloten op dezelfde module of op een andere DomBus-module), als deze 1 seconde is ingedrukt, schakel dan een ander apparaat in, als deze 2 seconden is ingedrukt, doe iets anders, en als 4 seconden ... Het is duidelijk dat het op deze manier mogelijk is om zeer eenvoudige automatiseringen te schrijven heel gemakkelijk, en ze werken ook als de hoofdcontroller (Domoticz) niet werkt.
Ten slotte is het met DCMD-commando's ook mogelijk om Domoticz-scènes/groepen te activeren .

Voor zeer complexe systemen is het ook mogelijk om meer USB/RS485-adapters (of netwerk/RS485-modules) te gebruiken om verschillende bussen te hebben, bijvoorbeeld één voor elke verdieping, waardoor voor elke bus één DomBus-hardwareplugin mogelijk is. Zo blijven, als een bus stopt met werken (voor bijvoorbeeld onderhoud), andere bussen doorrijden.
In dit geval werken DCMD-commando's alleen binnen dezelfde bus: het is niet mogelijk om apparaten in een andere bus automatisch te activeren zonder via de Domoticz-controller te gaan.
Dombus domoticamodules ook verbonden via wifi

Hoe een domoticasysteem te bouwen met behulp van DomBus-modules

Domotics

How to make your house smart using DomBus modules

Strong reliability, Very low latency, Very very low power consumption: these are the features offered by DomBus modules, to make your house a smart home!

Nowadays always is wireless, but WiFi modules consumes too much, Zigbee/Thread has a poor range and need several mesh nodes: in any case with wireless devices you can expect devices to become unreachable.
Ethernet is much safe, but wiring is not easy: star connection with large switches to connect all devices.

To achieve the maximum reliability and very very low power consumption, DomBus modules use the industrial RS485 wired bus to communicate: with a 4 wires shielded cable (common alarm cable with 2*0.50mm² + 2*0.22mm² wires inside)  it's possible to carry both data and 12Vdc power supply. RS485 can work with up to 1km of cable, using the terminating 100-150 Ohm resistors on the ends of the bus : you can find the terminating resistor in each DomBus module, and it should be enabled through the PCB jumper in the two furthest modules. RS485 allows connection with any network topology (star, linear, mixed), making it easy to connect multiple modules, obviously you need to install a thin cable!

Works locally (no cloud and internet connection is needed), no battery, no pain: zero latency and very strong security!

DomBus modules are really low power consumption, less than 15mW with no outputs active, so it's possible to supply dozens of modules with no problem. Also, DomBus31 module that has 8 relays, consumes only 600mW when all 8 relays are ON; DomBus36 module has 12 relay outputs consuming less than 750mW with all relays on; DomBus21 module has 3 latching relays with 15A capability (3kW), consuming only 15mW even with relays are ON! We believe that power optimization is important: many wifi modules consumes more than 1Watt each, but 1W means more than 8 kWh/year for each WiFi module!

How to build the home automation system

      1. 12V power supply with UPS functionChoose a reliable power supply for the bus: we suggest to use a 13.5V power supply unit with lead-acid battery charge feature. Power supply should be strong enough to supply domotic bus, network switches and routers, IPCams and NVR, ... , so the whole system can work even in case of power outage.
      2. Rock PI S single board computer for home automation systemsChoose a low power domotic controller: for small system you can use  Rock PI S , which consumes only 0.4W, or  Raspberry PI  that is powerful (more ram, higher CPU speed) that consumes 2.3W. Kits with ready to use operating system and software are available from store.creasol.it
      3. Switching regulator 12-20Vin 5V 3A output for raspberry or rock pi s SBCChoose a reliable power supply for the domotic controller, if used: the best solution is a a DC/DC converter with Type-C or MicroUSB connector, supplied by the 13.5V power source, so the domotic controller is protected from blackout.
      4. USB to RS485 adapter converter for Modbus RTU and DomBus protocolsConnect the domotic bus data to a RS485/USB adapter, and supply wires to the 13.5V power supply through a fuse. Use RS485 cables or, alternatively, common alarm shielded cables: 2x0.22mm² for data and 2x0.5mm² for Vbus supply. Connect the shield to GND only on one side.
        If connection by wire is impossible, you can connect by RF/WiFi/LAN using the appropriate interface.
      5. DomBusTH: temperature + humidity + touch sensor + 6 inputs/outputsDomBusTH module placed on a blank cover with hole in the centreIn any room where you have to measure temperature and humidity, place a DomBusTH module: it is very compact and can be mounted on a blank cover with a 3-4mm hole in the center. It also has red/green leds (that can be used for notifications, like alarm on/off, import/export power, ...), white led (that can be used for notifications and as blackout emergency light), 1x analog input to monitor Vbus voltage, 4x I/Os (that can be connected to switches, pushbuttons, dual buttons, buzzer, energy/gas/water meters with pulsed output, alarm sensors, ...) and  2x open-drain outputs  (that can be connected to the DomRelay2 module to get 2 relay outputs to command lights, roller shutter motors, appliances, ...).
      6. DomBus23 module with 2 relay outputs, 1 AC input, 1 mosfet output (dimmer), 2 I/Os, 2 low voltage AC inputs, 2 0-10V analog outputsIf you need to interface a gate or garage door, you can use DomBus23 module, that has 2x relay outputs (to send open/close/pedestrian commands), 2x low voltage optoisolated inputs (to be connected to photocell power supply or 12/24V light indicating the gate state), 1x 115/230V optoisolated input (to be connected to 230V flash lamp, if needed to get status from this output, or can be used to monitor power outages). Also, DomBus23 has 1x 12-24V 10A mosfet output (can be used to supply a 12/24V led stripe, with dimming function), 2x analog outputs 0-10V (can be used to regulate the heat pump power, valve, or other appliances with 0-10V input, as like as other led dimming modules), and 2x I/Os.
      7. DomBus12 module with 9 I/O. 2 ports can be configured as output to drive external relay outputs.If you need several inputs for alarm sensors (magnetic contact sensors and PIRs), you can use the compact DomBus12 module that has 7x I/Os (configured as digital inputs, analog inputs, twinbuttons, counters, buzzer outputs, ...) + 2x open-drain outputs (that can be connected to external DomRelay2 module to get 2 relay outputs, or can be configured as digital inputs through PCB jumpers to have totally 9 inputs).
      8. Domotic module with 12 inputs, 3 AC inputs, 3 relay outputs, designed for burglar alarm systemsIf you want to make a homemade alarm system and need more inputs and also some outputs, you can use DomBus37 module  that has 12x low voltage inputs, 3 AC inputs (100-250Vac) and 3 relays outputs, or DomBus38 module that has 12x low voltage inputs, 4 SPDT relays, 2 relay and 1 AC input.
      9. If you need several relay outputs, you can use  DomBus31 module  that has 6x relays with 5A 250V SPST capability and 2x relays with 10A 250V SPDT capability (terminal block with both normally-open and normally-closed outputs). This is very low power consumption module, that consumes less than 600mW with all 8 relays ON!
      10. 12 relay output module for home automation system, Modbus or DomBus protocolsIf you need more relays, we have DomBus36 module that has 12 relay outputs in 3 groups: 1 common + 4 relays for each group, to get easy and quick wiring, consuming less than 750mW with all 12 relays ON!
      11. If you need to control high power appliances with up to 3kW power, you can use DomBus21 module: it has 3 latching relays with 15A capability, 1 AC input (to monitor 230V presence, and also as a zero-cross detector to switch ON/OFF relays preventing overcurrent and overvoltage) and 4 low voltage inputs (for pushbuttons, switches, meters, temperature probes, ...)
      12. EVSE module to build a homemade wallbox DIY to charge electric vehicles. Using Modbus or DomBus protocolsUse DomBusEVSE module  to charge the electric car: you can select how much power to get from the grid, from 0% (use only photovoltaic power) to 100% (use all available power) preventing overloads and disconnections. This is a full features charging system: for example it has the EVMINVOLTAGE feature that permit to charge the electric vehicle with the minimum power needed to keep voltage below 253V (preventing solar inverter derating).
      13. Any energy, gas or water meter with pulsed output can be connected to DomBus12, DomBus21, DomBus23, DomBus32 and DomBus33, DomBus37, DomBus38 and DomBusTH I/Os.
      14. Din Rail domotic module with 3 relays, 3 AC inputs, 5 I/Os.Use  DomBus33 module  to manage a light system that uses pushbutton switches that activate step-by-step relays: DomBus33 permits to know the status of the light and control the step-by-step relay coils to toggle, switch on and switch off lights, with the ability to have a button to switch all lights off (or a simple automation that switch off lights when alarm is activated in AWAY mode).

If you're renovating your house don't forget to:

  • install magnetic contact sensors on windows, doors, blinds, external and internal sirens, external PIRs or RF radars: using Domoticz, Home Assistant, ... it's possible to  build a complete alarm system  with full notifications (text, pictures, small videos) in Telegram
  • install at least  one IP cam oriented to the main gate , so you can receive a picture in your smartphone (Telegram) when somebody push the door bell button,
  • do not install thermostats to control room temperature: it's much better to  install temperature sensors in each room (DomBusTH module)  and let the domotic controller to controls the heater or heat pump : in this way it's possible to overheat (in Winter) or overcool (in Summer) the house when extra power is available from photovoltaic
  • use DomBusEVSE to charge electric vehicles (DIY wallbox) and DomBusTracker2 to control a single or dual axis sun tracker in the garden.

For any questions please contact us by DomBus Telegram group https://t.me/DomBus , Whatsapp or by email to Dit e-mailadres wordt beveiligd tegen spambots. JavaScript dient ingeschakeld te zijn om het te bekijken. : your questions and suggestions are really important and let us improve the documentation!

DomBus or Modbus protocol?

DomBus modules are provided with two protocols of your choice:

  1. DomBus protocol, very powerful multimaster protocol that works only with Domoticz controller by installing its python plugin, and Home Assistant, OpenHAB, Node-RED, ... by using the DomBusGateway bridge (software daemon, Home Assistant App or hardware module). 
    DomBus protocol permit to get zero latency and DCMD functions: commands exchanged between modules, like KNX®, that permit to make simple automations that work even if the domotic controller is OFF.
  2. Modbus RTU standard protocol that works with almost any home automation system, and it designed for custom applications or to work with industrial systems.


Some application notes

How to supply a domotic system

 

DomBusTH module used in a bedroom

 

Domotic system using DomBus23 connected to a garage door or gate Domotic system using DomBus23 to interface 2 to 3 led strips

 

Domotic system with alarm sensors (PIRs, magnetic contact sensors, ...)

 

How to control heat pump and ventilation by Domoticz or Home Assistant and DomBus modules

 

Schema to control heat pump, ventilation, energy meter, temperature and humidity sensors, and much more

 

Electric vehicle smart charging using Domoticz

Using DomBus modules with Domoticz

  1. In Domoticz, install the Creasol DomBus plugin, if not already done, from GitHub or from Python Plugin Manager
  2. Connect this DomBus module to the domotic controller by a simple RS485/USB adapter (the preferred reliable solution), or by a RS485/net module or radio interface . Please note that more DomBus modules can be connected together to the same bus. Also, it's possible to manage more DomBus buses, for example one for each floor.
    It's recommended to supply each bus at 13.8V, with a backup battery, to get a home automation system working even in case of  blackout; protect the bus with a fuse (1A or more, depending how many devices are connected).
    Assure that termination resistor is connected/enabled in each bus end (two 120 Ohm resistors for each bus); DomBus modules already have a termination resistor that can be enabled by a solder iron.
  3. Check in the Switches panel for the new device, edit it, and in the description field add the following "command" 
    ,HWADDR=0x0101
    or similar to program the module with a new, unique, address between 0x0001 and 0xfeff (hexadecimal format), then save
  4. Reload the Switches panel: all device ports will be added automatically and will be ready to use.

DomBus modules with Home Assistant

  1. You have three ways to get DomBus modules working with Home Assistant (or other controllers supporting MQTT with AutoDiscovery):
    • By using the DomBusGateway app (ready-to-use add-on for HAOS or HA Supervised) 
    • By using the DomBusGateway bridge (python software)
    • By using the DomBusGatewayPIS hardware
  2. Use the DomBusGateway system you prefer: DomBusGateway is a bridge between the DomBus network and any home automation system supporting MQTT; moreover, thanks to AutoDiscovery, all entities will be created automatically.
  3. Enable MQTT integration in Home Assistant
  4. Connect this DomBus module to the domotic controller (or DomBusGatewayPIS hardware)  by a simple RS485/USB adapter (the preferred reliable solution), or by a RS485/net module or radio interface . Please note that more DomBus modules can be connected together to the same bus. Also, it's possible to manage more DomBus buses, for example one for each floor.
    It's recommended to supply each bus at 13.8V, with a backup battery, to get a home automation system working even in case of  blackout; protect the bus with a fuse (1A or more, depending how many devices are connected).
    Assure that termination resistor is connected/enabled in each bus end (two 120 Ohm resistors for each bus); DomBus modules already have a termination resistor that can be enabled by a solder iron.
  5. If more devices of the same type must be connected, it's recommended to modify the module address: connect DomBusGateway by telnet (port 8023) then type the commands
    showbus (list the modules attached to the bus)
    showmodule ff32
    (specify the address of the module you wan to configure)
    setport 1 hwaddr=101 (to set the device hardware to the new, unique value 101: valid address from 1 to efff, hex format)

You'll find the new device, with that address, in the MQTT integration and in the dashboard, with all entities already available.

DomBus modules with Node-RED, OpenHAB, ioBroker and other system supporting MQTT

Please check previous section, dedicated to Home Assistant: DomBus devices can be managed by any system supporting MQTT by using the bridge DomBusGateway: a python daemon running in background, or a dedicated hardware (Rock PI S) running DomBusGateway software.

Systems that support AutoDiscovery automatically detect all entities (ports) of the DomBus module.

A telnet interface on DomBusGateway permits to make some customization, for example device hardware setting, port configuration, ...

Using DomBus modules with Modbus protocol

As said, DomBus modules are available in two versions:

  1. supporting Modbus protocol: this is a standard master/slave protocol that can be useful in some cases, for example to manage relay outputs, inputs that do not change frequently, sensors, DomBusEVSE module (to build a EV charging station), DomBusTracker2 (to control a single/dual axis solar tracker), ...
  2. supporting DomBus protocol: this is a proprietary protocol, low latency, that also permits to exchange commands between modules (called DCMD) to realize simple automations that work even in case that the domotic controller is down. This is the preferred protocol, expecially when alarm sensors are needed.

If Modbus firmware is needed, it's possible to configure DomBus modules using the proper Modbus registers: check the page of each module to list the Modbus registers.

 

 

Meet de verbruikte/geproduceerde energie met Domoticz, Home Assistant, Node-RED, OpenHAB, ...

Domotics

We'd like to describe some solutions to measure the energy consumed and produced by the building using Domoticz home automation system and energy meters like DDS238 and SDM120, SDM230 (single phase), SDM630 (threephase).

Having information about the used/produced power is useful to correctly manage loads (or heating/cooling system, electric vehicle charging, ....) in the right way, maximizing the own-produced energy from photovoltaic plant.

Solution 1: interfacing any energy meter with pulsed output using a DomBus module

This solution works with any kind of energy meter with pulsed output.

Using a DomBus module to get import / export power/energy in Domoticz

Normally, energy meters have 1 or 2 pulsed opto-insulated outputs to send 1000, 1666 or 2000 pulsed every kWh imported and exported.

If DomBus modules are used in the home automation system, it's easy to configure one or two input ports as IN_COUNTER to measure the imported/exported power and energy.

The following schema shows a system using DomBus module, but what it's interested in this case is that it shows a Eastron SDM230 energy meter, with 2 pulsed outputs connected to the I/O ports IO8 and IO9 of module DomBus12 (but DomBus23, DomBus33 and DomBusTH can be used as well). This is a reliable solution: if Domoticz controller is stopped, DomBus module continues counting pulses up to 64k (equivalent to 32-64kWh) and when Domoticz resumes, the energy counter is restored correctly without loosing pulses.

powerMeters

Using DomBus12, DomBus23, DomBusTH, DomBus32 or DomBus37 it's very easy to read the pulses from energy meters, compute the instant power and get two devices in Domoticz that show the usage and return power, usage and return total energy and graphs. Below the instructions that refer to Eastron SDM230 energy meter: similar procedure for any other energy meter with pulse outputs, like DDS238 energy meter.

  1. connect the pulse outputs to any available I/O, for example IO8 and IO9 for DomBus12, IO1 and IO2 for DomBusTH or DomBus23 or DomBus32 or DomBus37.  The SDM230 common terminal block should be connected to GND (0V). Other energy meters may have output S0+ that should be connected to the DomBus I/O and S0- to GND.
  2. configure Pulse1 output, on SDM230, as EXP kWh (check the manual to know how to do that); Pulse2 is pre-configured as IMP kWh (measure the energy imported from grid)
  3. configure the Domoticz device connected to Pulse2: press Edit on that device, and replace in the Description field IN_DIGITAL or IN_TWINBUTTON (the default value) with IN_COUNTER,TYPENAME=kWh  and save. Please note that kWh is CASE SENSITIVE!
    Now the device will be automatically moved to the Utility panel and configured as energy meter. Edit it again, write a name (for example PowerMeter_Import), and select Usage type.Energy Power Meter Devices in Domoticz
  4. if produced energy should be measured, configure the Domoticz device connected to Pulse1 as before: press Edit on that device, and replace in the Description field IN_DIGITAL or IN_TWINBUTTON with IN_COUNTER,TYPENAME=kWh,DIVIDER=2000 (where divider number correspond to the pulses/kWh of your meter) and save.
    Now the device will be automatically moved to the Utility panel and configured as energy meter. Edit it again, write a name (for example PowerMeter_Export), and select Return type.
  5. In case of both import and export devices are created, it's needed to specify on Import device the Unit number of the Export device, and vice versa. So, select Setup -> Devices and write down the Unit number corresponding to Import (for example 98), and Export device (for example 99), then go to Utility panel, edit Import device and add to the description ,OPPOSITE=99 (Unit of the Export device) and save; edit Export device and add to the description ,OPPOSITE=98 (Unit of the Import device) and save. In this way, when a pulse is received on Import device, the power on Export device will be immediately set to 0, and vice versa, when a pulse is received on Export device, the power on Import device will be set to 0.

Domoticz needs up to 5 minutes before updating the energy counter correctly.

Domoticz import and export devices using DomBus modules

Check the youtube videoyoutube small that shows the instant power shown on the web browser (Domoticz panel) every 2 seconds.

Solution 2 - Using DDS238-2 ZN/S (single phase) or DTS238-7 ZN/S (three phases) Modbus energy meters with DomBus modules

It's possible to connect up to 4 DDS238-2 ZN/S energy meters to a single DomBusEVSE module. DDS238-2 ZN/S have 2 terminal blocks with A and B signals (RS485 Modbus), so it's possible to connect together up to 4 energy meters to the A/B terminal block of DomBusEVSE module: in this way it's possible to measure, for each meter, import/export power, energy, voltage, frequency and power factor.

Values are updated every 5 seconds.

DomBusEVSE is a module designed to control an electric vehicle charging (Mode-3 EV charging station / wallbox). It supports up to 4 energy meters, single and three phases, providing imported energy and power, exported energy and power, active power (negative if power is fed to the grid), voltage, frequency and power factor.

DomBus34 is a module. It supports up to 4 energy meters, single and three phases, providing imported energy and power, exported energy and power, active power (negative if power is fed to the grid), voltage, frequency and power factor.

TODO: connection schema

 

Solution 3 - Using ESP8266 module (NodeMCU, Wemos, ...) with Eastron energy meters with ModBus RS485 interface

AN energy meter domESP1

The energy meter is connected between the first circuit breaker and the circuit breakers used for each zone: in this way it measure the used/produced power globally.

Please choose the energy meter model that integrates the RS485/Modbus interface, so it's possible to connect to ESP8266 board through a RS485 to TLL converter so ESPEasy can read power (positive if used, negative if produced), voltage and other variables.

Lua scripts

Some LUA scripts for Domoticz are available, to manage the house power: in the Winter, they activates electric heaters automatically when exported power (from photovoltaic plant on the roof?) is greater than electric heater power. Similarly, any kind of device can be configured (e.g. dehymidifiers / dryers).

It also send an alert when power usage is above the max available power, to prevent disconnections from the electric grid (overcurrent protection).

Scripts are available in github, https://github.com/CreasolTech/domoticz_lua_scripts

 

Creasol DomBus and Home Assistant

Domotics

Introduction

Creasol DomBus devices are home automation modules that manage inputs, outputs and sensors, available with two protocols:
DomBus proprietary protocol (works with Domoticz by using a python plugin, and also works with Home Assistant, Node-RED, OpenHAB, ioBroker and other systems supporting MQTT-AutoDiscovery protocol by using DomBusGateway software),  and Modbus RTU standard protocol that works with Home Assistant, Node-RED and other controllers by using Modbus integration.

Actually we produce the following modules:

  • DomBusTH: Temperature + Relative Humidity sensors, red + green + white LEDs, 4 GPIO, 2 open-drain outputs, 1 analog input
  • DomBus12: 7 GPIO, 2 open-drain outputs (configurable also as inputs)
  • DomBus21: 3 latching relays 15A (3kW), 1 AC input, 4 inputs
  • DomBus23: 2 relay outputs, 1 mosfet output (for 12-24V LED dimming or other DC loads), 2 analog outputs 0-10V, 2 GPIO, 2 low voltage opto-inputs (5-40V), 1 230Vac opto input
  • DomBus31: low power module with 6 N.O. relay outputs + 2 N.O./N.C. relay outputs
  • DomBus32: 3x relays, 3x 230Vac inputs, 5 IOs
  • DomBus33: 3x relays, 3x 230Vac inputs, 5 IOs with special firmware to control 3 lights activated by existing step-by-step relays
  • DomBus36: 12x relays
  • DomBus37: 12x inputs, 3x 230Vac inputs, 3x relay outputs
  • DomBus38: 12x inputs, 4 SPDT relays, 2 SPST relays, 1 AC input
  • DomBusEVSE: EVSE module usable to build a smart wallbox (electric vehicle charging station)
  • DomBusTracker: stand-alone 2-axis solar tracker controller, that can be interfaced by Domoticz, HomeAssistant, Node-RED, OpenHAB, ioBroker, Modbus custom software, ...

Modules are available at https://store.creasol.it and explained in details at https://www.creasol.it/domotics

Using DomBus modules it's possible to make a full domotic system: the following picture describe a real example of a house using Domoticz + DomBus modules to control:

  • full alarm system, with PIR and magnetic contact sensors on windows/doors/blinds
  • climate control (heating and cooling by heat pump) with optimizations to use the most energy from renewable (photovoltaic system on the roof)
  • ventilation control, disabling air renewal, in winter, when the wind blows from certain directions (to prevent combustion fumes from entering the house)
  • lights on/off control
  • 230V sockets that can be enabled/disabled by smartphone
  • garden irrigation and rainwater tank level measure/control
  • door bell control: when someone ring the bell, send a picture to the smartphone by Telegram. Obviously, it's also possible to open the gate or pedestrian gate by smartphone
  • when presence/movement is detected outside, with the alarm enabled, grab a short 20s video from IPcam near the outdoor sensor and send video to Telegram.
  • electric vehicle charging station
  • single or dual axis sun tracker for optimized photovoltaic system

DomBusTH is a really powerful and cheap board, to be mount on a blank cover with a 4mm hole in the center, with a touch sensor (to have a virtual pushbutton) that measures emperature and humidity, and have 3 LEDs: red and green LEDs are used to notify alarm, ventilation or electricity power import/export status, and white led is used as night light and emergency light (in case of blackout). Also, it can be connected to piezo buzzer for sound alerts, pushbutton switches, and external relay module DomRelay2 to control 230V sockets or roller shutter motor.

Also, GPIO/input of DomBus modules can be connected to energy meter with pulsed output, to measure the current imported/exported power. As written above, it's possible to show the actual imported/exported power on RED/GREEN Leds of a DomBusTH module.

Other modules are available at https://store.creasol.it/domotics and fully described at https://www.creasol.it/domotics

Using DomBus modules with DomBus firmware

Although DomBus protocol is not a standard, this is the best solution because:

  • it's a multi-master protocol: all modules can be master and transmit.  Instead, Modbus protocol is a master/slave protocol, and needs that a controller continuously poll all devices to know their states.
  • modules notify the controller as soon as a state changes (alarm input, pushbutton, counter/meter, temperature, ...), with less than 100ms latency
  • modules can communicate each-other to get small automation working even if the controller is OFF, as KNX does.

How to get DomBus + HomeAssistant working?

  1. Install mosquitto or another MQTT broker : it's used to get home automation system communicating with all devices
  2. Install MQTT integration on Home Assistant
  3. Install DomBusGateway python software: it's used to communicate to DomBus modules by RS485 bus, and to HomeAssistant (or other controller) by MQTT AutoDiscovery. Configure the file dombusgateway_conf_local.py
  4. Connect the DomBus module to the bus: you can immediately see a new device with the default hardware address of the DomBus module (for example ff38 for DomBus38)
  5. Change the default address of the module to a unique address (in hex from 1 to efff, or from 1 to 9999) by
    * connect DomBusGateway in telnet:  telnet localhost 8023
    * select the bus, if system have more than one DomBus bus, with command  showbus 2  to select bus number 2. Ignore if only 1 bus is used.
    * select the installed module, for example showmodule ff38
    * change address to 3801, for example, with the command setport 1 hwaddr=3801
  6. Now a new device will be available in Home Assistant, for the module with new address 3801

Repeat step 4 and 5 for all modules that should be connected, to form a reliable network of modules (inputs, outputs, sensors, ...) that can work even in case of blackout by supplying the bus using a power supply unit with 12V lead-acid battery.

Using DomBus modules with Modbus firmware

In case that DomBus modules are equipped with Modbus firmware, it's possible to use Home Assistant Modbus integration already available in HA.
Modbus protocol is standard and well supported by Home Assistant as like as other systems (Node-RED, OpenHAB, ...).

Configuration examples are available on GitHub page.

Using DomBusEVSE module with Home Assistant

DomBusEVSE is a smart module that permits to get a home-made EV charging station Mode-3 for vehicles.

The Modbus version of DomBusEVSE can be used with the HomeAssistant hub using the native Modbus integration.

More information are available in the product page, where it's possible to know how to get it working with HA, and in the specific page for HomeAssistant.

Home assistant dashboard for DomBusEVSE module

DomBus36, a 12 relays module with Home Assistant

DomBus36 is a simple module with 12 relay outputs, grouped in 3 groups to have an easier wiring: each group share the same common, so you don't need to make jumpers to connect the common wire (Line, Neutral, Ground or +12/24V) to all relays.
Relays are protected from overvoltage and overcurrent, and module has a very low power consumption: less than 15mW with all relays OFF, and less than 750mW when all 12 relays are ON. Please compare with the power consumption of a Shelly, Sonoff, Denkovi or KMTronic module!

Using DomBus36 module with Home Assistant and Modbus protocol
Using DomBus36 module with Home Assistant and Modbus protocol, already integrated in HA. The 12 ports (entities) are configured in the configuration.yaml file.

DomBus37, a versatile module with 12 low voltage inputs, 3 AC inputs and 3 relay outputs

DomBus37 is a versatile module integrating inputs, AC inputs (to sense 230V presence) and relay outputs.
In the application note below the simplest configuration with Home Assistant.
12 inputs, 3 AC inputs and 3 relay outputs module with HomeAssistant

Using DomBus12 to measure water tank level, temperatures, start irrigation and light, check alarm sensors

DomBus12 is a compact and cost effective module with 9 I/Os. Each I/O can be configured as button, switch, double-pushbutton (UP/DOWN pushbutton connected to a single port), counter, meter, NTC temperature sensor, distance sensor, buzzer, led, ...

Using DomBus12 module to measure temperature, tank level, start irrigation and lights, check alarm sensors

 

Domoticz: how to fix data in the database domoticz.db and manage database backups

Domotics

How to fix data in the database

Sometimes sensor or counter data registered by Domoticz in the database may be wrong due to bad measure or counters inited from a wrong value.

What to do?

Check the device chart with all values, and use shift+click on the bad values to cancel them from the database.

In case of counters, if you have to change the current energy value (or else), you have to:

1. Stop domoticz  (service domoticz stop or other command)

2. Make a backup of domoticz.db database: (cp domoticz.db backups/domoticz_20231216.db or something else)

3. Connect to the database using the command sqlite3 domoticz.db

4. Modify the counter values in Meter_Calendar (or other table) using the following queries:
.tables
select * from Meter where DeviceRowID=1722 order by Date;
update Meter set Value=Value-56000 where DeviceRowID=1722 and Date>='2023-11-28 21:10:00';
update Meter_Calendar set Value=Value-56000 where DeviceRowID=1722 and Date>='2023-11-28 21:10:00';

5. also, you have to modify the last value for that device with the sql query
update DeviceStatus set sValue='6;518227.4281' where ID=1722;

Of course you have to use the right idx value corresponding to your device, and right values and date.
The examples above are only examples.
The step 5 is used to set the current value of the meter: your problem was that you updated the Meter and Meter_Calendar tables, but not the DeviceStatus tables, so when domoticz restarted, it continued to use the bad value.
I hope this can be helpful for you!

 

How to export database backups in a external USB hard disk

If you're running Domoticz on a single board computer with SD or SSD memory, and you have an external hard disk connected by USB, to prevent the flash memory (that can be written only about 100 thousands times) I suggest to move the DOMOTICZ/backups directory on the external hard disk (that must be mounted at boot time, so it should be placed in /etc/fstab).
The following commands permit to enter DOMOTICZ directory, create a domoticz dir in the external hard disk, move the domoticz backup on the hard disk and create a symbolic link to it:

cd DOMOTICZ
mkdir /mnt/USB/domoticz
mv backups /mnt/USB/domoticz/
ln -s /mnt/USB/domoticz/backups .

How to disable database hourly backup

I also suggest to disable the hourly database backup, because it takes several seconds where automations stop working. To do this it's sufficient to remove the hourly directory and create a file with the same name, so Domoticz will not be able to create hourly directory and will skip the hourly backup:

cd /mnt/USB/domoticz/backups
rm -rf hourly
> hourly

 

Hoe je een zelfgemaakte wallbox maakt om elektrische voertuigen op te laden

Domotics

Korte checklist om zelf een laadstation te maken met de Creasol DomBusEVSE-module

Door de onderstaande instructies te volgen, kunt u een EV-laadstation maken dat het stroomverbruik van het elektriciteitsnet controleert om overbelasting en ontkoppeling te voorkomen en ook om alleen energie uit fotovoltaïsche energie te gebruiken. De DomBusEVSE-module kan, eenmaal geprogrammeerd, zelfstandig werken, in stand-alone modus, zonder de noodzaak van een domotica-controller .

  1. Zorg ervoor dat je weet wat je doet: je moet kennis hebben van vermogensdissipatie en elektrische systemen . Om zelf een wallbox te kunnen maken, moet je een elektrotechnicus zijn!
  2. Je moet ook enige computerkennis hebben en weten wat een domoticasysteem en het Modbus-protocol is.
  3. De DomBusEVSE-module is de EVSE-controller die communicatie mogelijk maakt met de ingebouwde lader van uw voertuig, voor AC-laden, enkelfasig en driefasig : kies de DomBusEVSE-versie voor uw behoefte:
    1. met het eigen DomBus -protocol, werkend met Domoticz ,
    2. met het Modbus- standaardprotocol dat werkt met Home Assistant , Node-RED , OpenHAB en vele andere domoticasystemen.
  4. Hieronder vindt u de schema's voor eenfasige en driefasige bedrading : u hebt minimaal een 2P- of 4P-aardlekschakelaar (beveiliging) en contactor, de EV-kabel en een RS485/USB-adapter (of RS485/TCP) nodig. Componenten zijn verkrijgbaar in onze winkel , ook verkrijgbaar in KIT's , maar omdat ze standaard zijn, kun je ze overal vinden.
  5. Het is beter om 10 mm² draden te gebruiken voor 32 A en 6 mm² draden voor 16 A wallbox, om de vermogensdissipatie op kabels te minimaliseren. Verbindingen moeten periodiek worden gecontroleerd om er zeker van te zijn dat de schroeven goed zijn aangedraaid, zodat de aansluitingen niet opwarmen na 15 minuten of langer bij maximaal laadvermogen!
  6. Als u een domoticasysteem heeft met een netenergiemeter aangesloten op de domoticacontroller, die het netvermogen meet (negatief in het geval dat stroom wordt geëxporteerd naar het elektriciteitsnet), heeft u geen extra meter nodig die is aangesloten op de EVSE-module: maak gewoon een eenvoudige automatisering die periodiek de huidige netstroom naar de EVSE-module stuurt (elke 1-6s).
  7. Een vermogens-/energiemeter die het laadvermogen/energie van de EV meet is niet strikt noodzakelijk, maar wordt wel aanbevolen. DomBusEVSE ondersteunt DDS238-2 ZN/s (enkelfasig) en DTS238-4 ZN/S (driefasig).
  8. RS485-bussen hebben minimaal 1 afsluitweerstand (100-150 Ohm) nodig, en veel beter een weerstand aan elk busuiteinde: voor EVSE-huisautomatiseringsbussen is het mogelijk om de weerstand in te schakelen door de Rb PCB-jumper kort te sluiten. Bij EVSE-energiemeters is de weerstand al ingeschakeld in de EVSE-module.

Meer informatie:

  • Info over de DomBusEVSE-module
  • Creasol-winkel met enkele producten voor EV
  • HomeAssistant: DomBusEVSE configureren
  • HomeAssistant: DomBus-modules gebruiken met HA
  • Knooppunt-RED: DomBusEVSE configureren
  • Domoticz: DomBusEVSE configureren

Eenfase zelfgemaakte wallbox EV-laadstationschema

Zelfgemaakte wallbox werkend met Domoticz HomeAssistant, NodeRED, OpenHAB, ...

Driefasig schema van een zelfgemaakte wallbox EV-laadstation

Driefasige zelfgemaakte wallbox voor domoticz, home assistent, node-red, OpenHAB, ... met behulp van het Modbus RTU-protocol

 

Node-RED dashboard voor uw zelfgemaakte wallbox met behulp van de DomBusEVSE-module

DIY Zelfgemaakte slimme wallbox met Node-RED

Home Assistant-dashboard voor uw wallbox met behulp van de DomBusEVSE-module

Zelfgemaakte wallbox met Home Assistant

 

 

Micro-omvormer WVC-2000 kenmerken

Micro-omvormer WVC-2000 kenmerken

Domotics

De T-inverter WVC-2000-familie (WVC-1600, WVC-2400, WVC-2800) is erg mooi en goedkoop, beschikbaar in twee versies: met sub-1GHz transceiver (heeft een DTU nodig om dat protocol te beheren en om te zetten naar WiFi ) en wifi, verbinding maken met het "Cloud Intelligence" sensornetwerk.
Hoe dan ook, we raden sterk aan om dit product over te slaan omdat:

  • het is niet veilig : door hem los te koppelen van het elektriciteitsnet (stroomuitval of de RCBO UIT te schakelen), springt de geproduceerde spanning naar 285V en daalt dan in 30 seconden naar 248V en blijft op 248V tot zonsondergang! Dit is niet veilig, de omvormer moet controleren op 230V en stoppen met produceren in geval van stroomuitval om elektrische schokken te voorkomen.
  • omvormer met zeer laag rendement : aangezien de omvormer gelijkstroom- en wisselstroomtelemetrieën naar de Cloud Intelligence stuurt, is het gemakkelijker om de verhouding tussen wisselstroom en gelijkstroom te berekenen en is deze lager dan 0,92 (8% verlies). Sterker nog, met slechts 600W uitgangsvermogen en een omgevingstemperatuur van 30°C, gaat de temperatuur van de omvormer naar 58°C en dat is niet goed
  • zeer slecht MPPT-algoritme : als we het AC-vermogen vergelijken dat wordt geproduceerd door 830Wp-panelen die deze omvormer gebruiken, en een ander fotovoltaïsch systeem dat een SolarEdge-omvormer gebruikt, is de algehele efficiëntie van deze omvormer 0,815 ten opzichte van die van SolarEdge.
  • hoge lekstroom : het is verplicht om het chassis van de omvormer aan te sluiten op de aarding vanwege de lekstroom die hoogstwaarschijnlijk wordt geproduceerd door de hoge condensatoren die zijn verbonden met de aarde in het EMI-filter.

 

Ontdek ons assortiment domoticamodules voor Smart Home!

DIY slimme oplader voor elektrische voertuigen

De volgende video toont de slimme EVSE-module die kan worden gebruikt om de elektrische auto op te laden.

DomBus-modules voor Domoticz, Home Assistant, Node-RED, OpenHAB, ...

De volgende video toont een presentatie van enkele domoticamodules die door Creasol zijn ontworpen en geproduceerd om een betrouwbaar, eenvoudig en energiezuinig domoticasysteem te krijgen.

 

 

Creasol DomBusGateway: DomBus 2 MQTT-brug voor HomeAssistant, NodeRED, OpenHAB, ioBroker, MQTT...

Domotics

Software of vooraf geconfigureerde computer die één of meerdere DomBus-netwerken (netwerk van domoticamodules die via een bus met elkaar zijn verbonden) beheert en via MQTT met AutoDiscovery gegevens uitwisselt met een domoticacontroller.

Lees meer …

Domoticz: LUA script to create SelfConsumption, SelfSufficiency, TotalUsage, TotalProduction devices

Domotics

The script_time_selfconsumption.lua file, available at https://github.com/CreasolTech/domoticz_lua_scripts , permits to update 5 devices in Domoticz measuring the self-consumption and self-sufficiency of the building, when one or more power sources are available (photovoltaic on the roof, photovoltaic in the garden, wind turbine, ...)

The script will update the following utility meters:

  • TotalProduced energy/power:      (the array POWERMETER_GENS in config_power.lua contains the list of meters measuring power for each plant)
  • SelfConsumption power:          totalProduced-exportedPower
  • TotalConsumption energy/power:   selfConsumption+importedPower
  • SelfConsumption percentage:      selfConsumption/TotalProduced
  • SelfSufficiency percentage:      selfConsumption/TotalConsumption

Domoticz and self-consumption and self-sufficiency charts

Script installation

Enter the GitHub project https://github.com/CreasolTech/domoticz_lua_scripts and download script_time_selfconsumption.lua config_power.lua, globalfunctions.lua and globalvariables.lua into the DOMOTICZ/scripts/lua directory.

The following variables should be defined in config_power.lua:

PowerMeterImport='PowerMeter Import'             -- Meter measuring import power
PowerMeterExport='PowerMeter Export'             -- Meter measuring export power
POWERMETER_GENS={'PV_PowerMeter', 'PV_Garden'}   -- list of devices measuring power from renewable plants (PV on the roof, PV on the garden, wind, ...)

-- The following 5 devices have to be created manually (Setup -> Hardware -> Create virtual device)
POWERMETER_USAGE='Power_Used'                    -- Electric+Counter virtual device (to be created manually)
POWERMETER_PROD='Power_Produced'                 -- Electric+Counter virtual device (to be created manually)
POWERMETER_SELF='Power_SelfConsumption'          -- Electric+Counter virtual device (to be created manually)
PERCENTAGE_SELF='Perc_SelfConsumption'           -- Percentage virtual device (to be created manually)
PERCENTAGE_SUFF='Perc_SelfSufficiency'           -- Percentage virtual device (to be created manually)

Check the domoticz log for any errors, and wait at least 5 minutes to see the new devices charts.

Updating the database domoticz.db

The following operations are NOT RECOMMENDED because CAN DAMAGE THE DATABASE.

If you have months or years of data, and you want to import all data in the new meters, you can get information from the database, save in a CSV file to elaborate with a spreedsheet program, then add them to the database. ALWAYS MAKE A BACKUP OF THE DATABASE before each operation!

In my case, I have two solar photovoltaic systems, a powerImport device and powerExport device measuring the power from grid and power to grid. Domoticz is running in Linux OS. In the following instructions, comments describing each action are rapresented with #text...

cd /home/pi/domoticz   #enter domoticz directory
cp domoticz.db /home/backup/domoticz_202407011753.db   #make a backup of database
sqlite3 domoticz.db   #run sqlite client program
sqlite> .output /tmp/file1.csv
sqlite> SELECT * FROM Meter_Calendar WHERE DeviceRowID=105 ORDER BY Date; #105=idx of first solar meter
sqlite> .output /tmp/file2.csv
sqlite> SELECT * FROM Meter_Calendar WHERE DeviceRowID=1942 ORDER BY Date; #192=idx of second solar meter

Open file1 and file2 with libreoffice or other spreedsheet program, then merge the column by using the same date in the same row, then add a column with the sum of the two energies in each row, and another column with the counter value, as shown in the following picture.

where 2104 is the idx of the new POWERMETER_PROD value (you can get it entering the Utility panel in Domoticz, and clicking on Edit button on that device).

Save the file in /tmp/file3.csv then

sqlite3> .mode csv
sqlite3> .import /tmp/file3.csv Meter_Calendar
sqlite3> UPDATE DeviceStatus SET sValue="0;35732997" WHERE ID=2104;

The second line imports the file data in the existing table with day-by-day data of every meter device, the third line update the meter status with the current counter value. Replace 35732997 with the last couter value in the file3.csv + today energy, in Wh.

Check the POWERMETER_PROD chart: you should see the total produced power in the last days, months or  years.

Now, get exported energy data from the PowerMeterExport device (idx=967 in my case):

sqlite> .output /tmp/fileExport.csv
sqlite> SELECT * FROM Meter_Calendar WHERE DeviceRowID=967 ORDER BY Date;

then open fileExport.csv and compute, for each date, SelfConsumption=ProductionEnergy-ExportedEnergy, and import data with the commands

sqlite> .import /tmp/selfConsumption.csv Meter_Calendar
sqlite> UPDATE DeviceStatus SET sValue="0;13673479" WHERE ID=2100;

where 2100 is the idx of the created POWERMETER_SELF device, and 13673479 is the last counter value + today SelfConsumption energy.

Calculate the selfConsumption_percentage=int(SelfConsumption*100/ProductionEnergy) and export a CSV file with the fields
idx,perc,perc,perc,date


then import in the database with the command

sqlite> .import /tmp/selfConsumption_perc.csv Percentage_Calendar

With percentage device you don't need to update the DeviceStatus table: that's needed only for counters.
Export in a spreedsheet the imported power (from grid), then calculate the TotalUsedEnergy=SelfConsumption+ImportedEnergy, and finally calculate the SelfSufficiency_percentage=int(selfConsumption*100/TotalUsedEnergy); import all data in the same way explained above.

 

 

 

Implementatie van een waterstroommeter in mijn domoticasysteem

Domotics

Gebruik van een waterstroomsensor met DomBus-modules

Waterfluxsensor aangesloten op DomBus-module en Home Assistant of Domoticz domoticasysteem Waterstroomsensoren zijn handig om het koud- en warmwaterverbruik te meten. Sommige waterfluxsensoren zijn gebaseerd op een hallsensor om de interne rotorrotatie te meten en pulsen tot 100-200 Hz te genereren.
Hall-waterstroomsensoren zijn geen gevoelige sensoren, vooral als ze van ijzer zijn gemaakt zoals op de afbeelding wordt weergegeven. We raden daarom aan meters te kiezen met de beste gevoeligheid, bijvoorbeeld 1-30 l/min, met gebruik van messingmateriaal : wees voorzichtig dat als de stroming snelheid lager is dan 1 liter per minuut, geeft de sensor 0 pulsen!
DomBus-modules kunnen werken met hogesnelheidssensoren, genereren tot 500 pulsen/seconden , zijn geoptimaliseerd voor een zeer laag stroomverbruik en hebben doorgaans veel veelzijdige poorten die kunnen worden geconfigureerd als ingangen, uitgangen, tellers, sensoren, ...

De onderstaande afbeelding laat zien hoe DomBus37 is aangesloten op enkele temperatuursensoren, alarmsensoren, waterstroomsensor en vermogens-/energiemeters.

DomBus37 home automation module with 12 inputs, 3 relay outputs, 3 AC inputs, connected to a hot water heat pump boilerDombus37 en domoticz smartphone-momentopname

Grafieken met warmwaterverbruik, gemaakt door Domoticz en Creasol DomBus37

Gebruik van de waterflowmeter, temperatuursensoren, energiemeters met DomBus37 en Domoticz

Wanneer DomBus-modules worden gebruikt met Domoticz (in dit geval de DomBus37-module geprogrammeerd met het DomBus-protocol), moet u het volgende configureren:

  • NTC-temperatuursensoren (10k bij 25°C, B=3950) als IN_ANALOG,FUNCTION=3950 ;
  • de waterstroommeter is geconfigureerd als IN_COUNTER,A=0,0025 (400 pulsen per liter) met delerparameter=1000 om van liter naar m³ om te rekenen;
  • vermogens-/energiemeters (DDS238-2) als IN_COUNTER,TYPENAME=kWh,DIVIDER=2000

Bewaking van het niveau van de regenwatertank met behulp van DomBus-modules en ultrasone afstandssensor

Domotics

PLEASE CHECK THE ENGLISH VERSION TO GET THE UPDATED VERSION OF THIS PAGE!

Rainfall water tank with level measurement by DomBus moduleThe following application note shows how to measure the level of rainwater (or other liquid) inside a tank, using a waterproof ultrasonic distance sensor JSN-SR04T.

This solution works perfectly with Domoticz home automation system, a complete, free and open source software for domotic applications, using DomBus modules programmed with DomBus firmware.

Also, using the DomBus modules with Modbus firmware, works also with Home Assistant, Node_RED, OpenHAB and other domotic systems supporting the standard Modbus protocol.

      

The following graph displays the measured level of rainwater inside a tank: level decreases when water is used (during garden irrigation, for example) and increases during rains; below the connection diagrams of the ultrasonic distance sensor to the DomBus12 module .

The following DomBus modules support the ultrasonic distance sensor:

  • DomBusTH, with DomBus or Modbus firmware: 6 I/Os module with RGB leds, touch sensor and temperature/humidity sensors, supporting up to 5 distance sensors (IO1, IO2, IO3, IO5, IO6) + 1 trigger output (IO4) controlling all sensors (short the o4 PCB jumper to set IO4 port as output).
  • DomBus12, with DomBus or Modbus firmware: 9 I/Os module, supporting up to 6 distance sensors (IO1, IO2, IO3, IO4, IO5, IO6) + 1 trigger output (IO7) controlling all sensors (all triggers connected to IO7, that should be set as output by shorting the RO7 PCB jumper).
  • DomBus23, with DomBus or Modbus firmware: versatile module with different types of ports, supporting 1 distance sensor (IO1) + 1 trigger output (IO2) controlling the sensor: IO2 have to be set as output by shorting the RO2 PCB jumper.
  • DomBus32, with DomBus or Modbus firmware: 3 relay + 3 AC inputs + 5 I/O modules, supporting 4 distance sensors (IO1, IO2, IO3, IO4) + 1 trigger output (IO5) controlling all sensors: IO5 have to be set as output by shorting the RO5 PCB jumper.
  • DomBus33, with DomBus or Modbus firmware: 3 relay + 3 AC inputs + 5 I/O modules designed for lighting systems, supporting 4 distance sensors (IO1, IO2, IO3, IO4) + 1 trigger output (IO5) controlling all sensors: IO5 have to be set as output by shorting the RO5 PCB jumper.
  • DomBus33, with DomBus or Modbus firmware: 3 relay + 3 AC inputs + 5 I/O modules designed for lighting systems, supporting 4 distance sensors (IO1, IO2, IO3, IO4) + 1 trigger output (IO5) controlling all sensors: IO5 have to be set as output by shorting the RO5 PCB jumper.

Water tank level measured using a waterproof ultrasonic distance sensor

Connection schema for the ultrasonic distance sensor used to measure and monitor the rainwater tank level

Domoticz tank level device configuration

Documentation for JSN-SR04T waterproof distance sensor

Click to get the JSN-SR04T distance sensor datasheet

Operating voltage 5 V (it works at 3.3V too)
Operating current 30 mA
Quiescent current 4-5 mA
Frequency 40 kHz
Measuring range 25-450 cm
Resolution 2 mm
Measuring angle 30 degrees
Sensor dimensions 23.5 x 20 mm with 2.5 m long cable
PCB dimensions 41 x 28.5 mm (to be protected by humidity!)

 

Using DomBusTH module to control up to 5 distance sensors

  • Connect the 5V power supply and GND to the distance sensor boards (they works also with 3.3V).
  • Connect IO1, IO2, IO3, IO5 or IO6 to the "echo" sensor output. In case of IO5 (that is factory configured to works as open-drain output), to use it as input port connected to the "echo" output, you have to open R05 (with a cutter) and short the RO5 (with a solder iron) PCB jumpers. The same for IO6.
  • Connect IO4 to the "trigger" sensor input. Also, short the "O4" pcb jumper to use this I/O port as output.
  • Configure (by software) IO4 (trigger) and IOx (echo) as DISTANCE (normally these ports are factory configured as digital inputs or outputs). Using Domoticz, just write in the description field of the sensor devices (both trigger and echo ports) the string ",DISTANCE" to set the port as distance sensor. In case of Modbus, program the address 255+portnumber to the value 13, corresponding to the DISTANCE sensor type.

The module returns the distance in millimiters, and is updated every 15s.

Using DomBus12 module to control up to 6 distance sensors

  • Connect the 5V power supply and GND to the distance sensor boards (they works also with 3.3V).
  • Connect IO1, IO2, IO3, IO4, IO5 or IO6 to the "echo" sensor output. In case of IO5 (that is factory configured to works as open-drain output), to use it as input port connected to the "echo" output, you have to open R05 (with a cutter) and short the RO5 (with a solder iron) PCB jumpers. The same for IO6.
  • Connect IO7 to the "trigger" sensor input. Also, short the "RO7" pcb jumper to use this I/O as output.
  • Configure (by software) IO7 (trigger) and IOx (echo) as DISTANCE (normally these ports are factory configured as digital inputs or outputs). Using Domoticz, just write in the description field of the sensor devices (both trigger and echo ports) the string ",DISTANCE" to set the port as distance sensor. In case of Modbus, program the address 255+portnumber to the value 13, corresponding to the DISTANCE sensor type.

The module returns the distance in mm, and is updated every 15s.

Using DomBus12 module in a greenhouse / tunnel to measure temperature and water tank level

Domoticz configuration

  1. Configure the trigger output as DISTANCE:
    go to Switches panel, select the trigger device (IO4 for DomBusTH, IO7 for DomBus12, IO2 for DomBus23, IO5 for DomBus32/33), and write DISTANCE in the Description field, then exit.
    The trigger port now can be optionally disabled from Domoticz, by enter Setup -> Devices panel, and clicking in the blue arrow to remove this device from the list
  2. Configure the echo sensor output port, by selecting the corresponding Domoticz device (for example IO1), the writing in the Description field DISTANCE,A=-0.1,B=165
    A
    and B are parameters used to convert the sensor output (distance in mm) to the desired unit format. In the example above, if the sensor output is 400mm and distance from sensor to the tank bottom is 165cm, the value displayed in Domoticz will be
    value=400mm*(-0.1)+165=165-40=125cm corresponding to the tank level (total high=165cm, distance from sensor to fluid level=40cm, level=125cm)
    Alternatively, setting DISTANCE,A=0.1,B=0 it's possible to get back the distance in cm (A divide the sensor output (in mm) by 10).

Modbus configuration

  1. Configure the trigger output as DISTANCE:
    check in the module webpage the Modbus address for the trigger port, for example for DomBus12 IO7 the Modbus register address is 6;
    configure that port as DISTANCE ( set register address 256+6=262 to value 13 )
  2. Configure the sensor output port as DISTANCE:
    check in the module webpage the Modbus address for the sensor port, for example the Modbus address of DomBus12 IO1 is 0;
    configure that port as DISTANCE ( set register address 256+0=256 to value 13 )

Every 15 seconds the distance value will be refreshed and can be read from the port address (reading address 0, in the example above).

Domoticz reset de router automatisch als de internetverbinding wegvalt

Domotics

Using Domoticz it's possible to supply a router through the normally-closed relay output (SPDT relay); so, normally power supply is applied to the router, but if internet connection goes down, after some seconds or minutes Domoticz remove the power supply, wait for 10s, and apply power supply again to restart the router.

Script that automatically reset the router when internet connection goes down

This monitoring procedure is performed by a bash script that sends pings to two different hosts, and if they do not respond, after some seconds or minutes, sends a command to Domoticz to activate the relay output that remove power supply to the router.

First, check that 127.0.0.1 (and your network, if you prefer) are specified in the Domoticz panel Setup -> Settings -> Local Networks: in this way any connection to domoticz from the specified networks do not need authentication (no username and password is required). If you add your LAN, all devices from your LAN can enter domoticz without asking for username and password.

domoticz setup settings localnetworks
To install the bash script, copy and paste the following code into the raspberry/linux shell:

[code]#become root
sudo su
#download script
if [ `which wget` ]; then
wget -O /usr/local/sbin/netwatchdog.sh http://docs.creasol.it/netwatchdog.sh
elif [ `which curl` ]; then
curl -o /usr/local/sbin/netwatchdog.sh http://docs.creasol.it/netwatchdog.sh
else
#wget and curl not installed: install now
apt install wget curl
wget -O /usr/local/sbin/netwatchdog.sh http://docs.creasol.it/netwatchdog.sh
fi
chmod 755 /usr/local/sbin/netwatchdog.sh
# prepare /etc/rc.local so it is sufficient to remove a # to let raspberry start the script at boot time
sed -i 's:^exit 0:#/usr/local/sbin/netwatchdog.sh >/dev/null 2>/dev/null \&\nexit 0:' /etc/rc.local
sed -i 's/amp;//' /etc/rc.local[/code]

Now, find the idx corresponding to the relay output: open the web browser to the Domoticz page, go to Setup -> Devices to list all installed devices. Look in the idx column to find the idx of the router power supply device.

How to find idx of a device

Now, copy&paste the following commands in the raspberry shell to put the script in debug mode (variable DEBUG=1 : in this way the script will print several debugging messages on the console and reduce the timings to check the script easily), edit the script (you have to write the right idx in the variable ROUTER_RELAY_IDX, check other variables, and type ctrl+x to exit):

[code]#set DEBUG=1 in /usr/local/sbin/netwatchdog.sh
sed -i 's/^DEBUG=0\(.*\)/DEBUG=1\1/' /usr/local/sbin/netwatchdog.sh
#edit script
nano /usr/local/sbin/netwatchdog.sh[/code]

and finally start the script in debug mode (reset the router after only 20s of ping failures), writing some information in the console and other information in the logfile:

[code]/usr/local/sbin/netwatchdog.sh[/code]

Remove the internet cable or switch-off the router: you should see that ping returns 100% packet loss and after 20s the script send a command to Domoticz to reset the router. Type ctrl+c to terminate the script.

 If it works, type the following commands to edit /usr/local/sbin/netwatchdog.sh setting DEBUG=0 and to modify /etc/rc.local so the script is executed at boot time:

[code]#set DEBUG=0 in /usr/local/sbin/netwatchdog.sh
sed -i 's/^DEBUG=1\(.*\)/DEBUG=0\1/' /usr/local/sbin/netwatchdog.sh
#and now let linux starting the script
sed -i 's:^#/usr/local/sbin/netwatchdog.sh:/usr/local/sbin/netwatchdog.sh:' /etc/rc.local[/code]

Now you have to reboot to let linux start the netwatchdog.sh script.

Good luck.

Need help? join the DomBus channel on Telegram!

 

FAQ veicoli elettrici e fotovoltaico

Domotics

Introduzione

Perché questa pagina? In Italia la propaganda per il fossile imperversa: ricordiamo che l'Italia, nonostante muoiano prematuramente oltre 90 mila persone a causa delle polveri sottili, ogni anno versa circa 30 miliardi di euro in sussidi alle fonti energetiche fossili (2022): forse anche per questo c'è una insistente disinformazione che circola nei media e nei social.

Bando quindi alle chiacchiere da bar e veniamo alle auto elettriche!

Critiche ricorrenti ai veicoli elettrici

Dopo 8 anni bisogna cambiare la batteria!

Non è vero: di solito la batteria è garantita 7-8 anni con almeno il 70% di autonomia residua, e questo non significa che debba morire appena scaduta la garanzia. In gennaio 2021, prima di acquistare l'auto elettrica, leggevo di un taxista di Modena che aveva percorso con la propria auto elettrica oltre 400mila km, ed un'altra persona che ne aveva percorsi addirittura 630mila km. Beh, mi auguro di poter cambiare l'auto dopo 18 anni dall'acquisto, anziché tenerla finché avrò esaurito la batteria!

Non ci sono sufficienti colonnine di ricarica

Al momento  in cui scrivo questa pagina, secondo https://www.motus-e.org/fake-news/ sul suolo nazionale sono presenti 33 mila punti di ricarica accessibili al pubblico (marzo 2023). Per avere un metro di comparazione, i distributori di benzina in Italia sono circa 21 mila, mentre gli impianti di distribuzione del metano sono fermi a poco più di 1.400 (Dati EAFO). La rete delle infrastrutture per la ricarica pubblica in Italia è peraltro in continuo e costante ampliamento.

Aggiornamento gennaio 2025: sono installate in Italia oltre 64 mila colonnine, per un parco auto elettriche circolante di 300 mila unità circa: una colonnina ogni 5 auto!

Il problema sono le batterie perché usano metalli rari

Informazioni del 2023: mentre i telefoni e piccoli dispositivi attualmente utilizzano batterie Li-NMC (Litio, Nichel Manganese Cobalto) le quali hanno un'elevata densità di potenza (e sono quindi compatte), le auto elettriche si stanno orientando verso la tecnologia LFP (Litio Ferro Fosfato) che hanno una densità minore ma costano anche meno, non contenendo il cobalto. Mentre il Ferro è il metallo più abbondante sulla crosta terrestre, il Litio è il quarto metallo in ordine di abbondanza, quindi sono componenti tutt'altro che rari, tant'e' che lo stesso litio, presente nella quantità di 6-9kg per ogni auto, dopo il picco di costo dd fine 2021 ora sta diminuendo il suo prezzo in quanto sono state aperte nuove fonti di approvvigionamento.

Il problema delle batterie è lo smaltimento

Per le auto è fondamentale che la batteira abbia una elevata efficienza. Ma si stima che dopo 10-15 anni la batteria di un'auto possa diventare un punto critico (autonomia ridotta del 20% rispetto all'autonomia iniziale): in tal caso, oppure nel caso di smaltimento di un'auto, la batteria può essere impiegata come accumulo statico per case o altre strutture. Ad esempio lo stadio di Amsterdam è coperto da pannelli fotovoltaici e impiega numerose batterie delle prime Nissan Leaf rottamate (2012, ...) per l'accumulo di energia.
Dopo il riuso (quindi dopo 20 anni o più) potranno comunque essere riciclate al 95%, ovvero i minerali saranno recuperati interamente per generare nuove batterie o nuovi prodotti.

Qui potrete trovare il video di un agente di commercio altoatesino che ha percorso 300.000 km con la sua e-Golf vedendo l'autonomia scendere del 10%.

Le auto elettriche sono più pesanti ed inquinano di più perché consumano più pneumatici

E' vero che normalmente si ha un consumo superiore di pneumatici, dovuto più che altro al comportamento del guidatore che spesso tende a sfruttare maggiormente l'elevata prestazione del motore elettrico in termini di coppia (accelerazione). Uno studio di Science Direct confronta le emissioni di auto a combustione interna con auto elettriche, stabilendo che la minore emissione di PM10 delle elettriche considerando freni e pneumatici. in quanto queste ultime utilizzano molto raramente i freni privilegiando la frenata rigenerativa (utilizzando il motore elettrico per rallentare l'auto ricaricando la batteria).

Costo chilometrico più alto rispetto al diesel

Ci sTariffa flat bechargeono colonnine veloci (150kW o più di potenza) il cui costo a consumo è veramente alto, 0.89€/kWh, ma bisogna essere anche un po' furbi: ci sono le tariffe flat!
Acquisti un "abbonamento" e in un mese hai N kWh di energia che puoi ricaricare a tariffa fissa, a prescindere dal tipo di colonnina. Se li finisci prima del tempo, acquisti un nuovo "abbonamento". Funzionano come le ricaricabili, ma poi si rinnovano ogni mese se non vengono disattivate.

Prendiamo la tariffa più svantaggiosa: 0.40€/kWh.
Con 1kWh si percorrono circa

  • 5km in autostrada, a 130km/h => 8€/100km
  • 7.5km in extraurbana => 5,35€/100km

Come vedi i costi sono decisamente inferiori rispetto al costo chilometrico per un'auto diesel o ibrida!

Il futuro è l'auto ad idrogeno

L'auto ad idrogeno è un'auto elettrica che, anziché avere la batteria, ha una cella combustibile.

Essendo che il processo di produzione dell'idrogeno "verde" ha un rendimento del 50-60% e il rendimento della cella combustibile è di gran lunga inferiore. Il risultato è che il costo a km di un'auto ad idrogeno è 3 volte quello di un'auto elettrica.
Ma allora perché si parla tanto di idrogeno verde nella tassonomia dell'Europa?
La produzione di idrogeno verde (da fonti rinnovabili) viene attualmente concepita come sistema di stoccaggio di energia nel momento di maggior produzione per l'utilizzo

  • nell'industria chimica, ad esempio per la produzione di ammoniaca
  • nella produzione di e-fuels, ovvero combustibili sintetici da impiegare in futuro in aerei e navi.

Produzione di idrogeno per la conversione in energia elettrica? NO, non conviene.

Esempio: autobus Solaris Urbino Hydrogen: ha una cella combustibile da 70kW, una batteria al titanato di litio da 29kWh, e con una carica di idrogeno da 37.5kg ha un'autonomia di 350km. Con il costo finale dell'idrogeno a 13.7€/kg (stazione di rifornimento di Bolzano, realizzata con 9.5 milioni di euro di cui 5 milioni di € di fondi europei), il costo per percorrere 350km risulta di 510€, 145€/100km. Il costo dell'idrogeno diminuirà con il tempo.
Facendo un confronto, l'autobus elettrico Iveco E-Way, con batteria da 350kWh, ha un'autonomia di 570km ed un costo di 19€/100km (calcolato con tariffa di ricarica 0.31€/kWh corrispondente ad un abbonamento Enel X-Way).

Allora il futuro sono i biocarburanti!

Solo per soluzioni estreme dove è richiesto un alta concentrazione di energia che le batterie non possono garantire.
Un ettaro di terreno coltivato a ricino per ottenere biocarburante consente di ottenere all'anno 46MWh di energia equivalente. Un ettaro di parco solare fotovoltaico produrrebbe in un anno 625MWh di energia elettrica, quindi la produzione di biocarburante non è conveniente. Fonte

Un altro studio che confronta la produzione di biodiesel (che comunque è un inquinante, producendo durante la combustione ossidi di azoto, benzoapirene e polveri sottili, tutti cancerogeni):
* Con 1mq di suolo posso coltivare colza per produrre biocarburante necessario a percorrere 2km
* Con 1mq di pannello fotovoltaico posso produrre energia elettrica per percorrere 900km
Fonte: https://www.vaielettrico.it/biocarburanti-vs-elettrico/

Charging electric vehicle at really full speed and efficiency with home made wallbox working with Domoticz Home Assistant Node-RED ....

Ad inquinare sono le navi e gli aerei

Si, ma in misura molto inferiore rispetto al traffico merci su gomma e soprattutto al traffico passeggeri.

Fake news sui veicoli elettrici smentiti dal dirigente del Consiglio Nazionale delle Ricerche di Bologna

Due video in cui vengono date informazioni chiare e scientifiche:

https://www.youtube.com/watch?v=iS4eBzMAgQo 

https://www.youtube.com/watch?v=hMq_-0rD1YQ

e-fuels, biocarburanti, accumulatori: https://youtu.be/eJN0AQX9sPg

Pericolo incendio su auto elettriche

In Italia la disinformazione è sconvolgente.
Vige il pensiero comune sulla pericolosità d'incendio delle auto e autobus elettrici, nonostante che i dati reali siano completamente opposti.
Su 100mila auto, il rischio più alto vale per la auto ibride; per le auto a benzina/diesel/gpl/metano è la metà di quelle ibride, e il rischio di incendio per le auto elettriche e meno di un centesimo rispetto alle ibride. Questi sono i fatti, anche se le chiacchiere da bar a volte dicono altro.
Tabella dati su probabilità di incendio veicoli per categoria elettrici, benzina diesel metano gpl, ibridi

Costi di esercizio di auto elettriche, ibride, gpl a confronto

Nel link seguente sono riportati i costi a km delle auto, rilevati dall'ACI, in base a quanti km si percorrono annualmente.
I costi si riferiscono ad un'auto di proprietà, ed i costi vengono calcolati in modo standardizzato. Nel caso di auto elettriche, si considera la ricarica fatta alle colonnine pubbliche.
https://www.vaielettrico.it/costi-di-esercizio-a-confronto-elettriche-ibride-gpl/

Informazioni utili

  1. La potenza si misura in Watt, o migliaia di Watt (1kW=1000W), ... L'energia in Joule, Wh (corrispondente alla potenza di 1W per un'ora di tempo), kWh (corrispondente a 1kW di potenza per la durata di un'ora), ... L'unità di misura kW/h non ha senso e non esiste!
  2. La capacità della batteria viene in genere misurata in kWh: una batteria da 50kWh ha la possibilità di fornire una potenza di 50kW per un'ora di seguito, prima di scaricarsi completamente, oppure una potenza di 20kW per 2 ore e mezzo (se vai in autostrada a 130km/h probabilmente consumi 26kW, quindi avrai autonomia poco inferiore a 2 ore, ovvero 250km).
    Se devo caricare la batteria a 6kW di potenza, il tempo di ricarica dallo 0 al 100% sarà almeno di 50kWh / 6kW = 9h  (dividiamo sia le cifre che le unità di misura!).
    Analogamente, il tempo di ricarica dal 30% all'80% (metà capacità, ovvero 25kWh) sarà di circa 5 ore.
  3. Al punto precedente ho scritto "almeno", perché il processo di ricarica non ha rendimento al 100%: c'è un'elettronica di controllo da alimentare, una pompa di calore per il raffreddamento della batteria (in estate), perdite sul convertitore AC/DC e PFC, perdite sui cavi... il rendimento nella ricarica varia molto a seconda della potenza (migliora con potenze alte) e potrebbe aggirarsi sull'85-90%. Teniamo quindi presente che per ricaricare l'auto dissipiamo il 10-15% di energia in calore, quindi anche i tempi di ricarica sono il 10-15% superiori rispetto alla formuletta del punto 2.
  4. Auto ibride e auto elettriche: due mondi molto diversi, e lo vedi sollevando il cofano. Un'auto mild-hybrid, full-hybrid e peggio ancora una plugin-hybrid hanno il cofano strapieno di componenti (che possono rompersi e che richiedono manutenzione periodica). Se apri invece il cofano di un'auto elettrica dentro trovi molto poco e ampi spazi vuoti.
    L'auto elettrica non richiede cambi d'olio, filtro aria, filtro carburante. Non ha frizione e spesso non ha il cambio (solo modelli sportivi hanno in genere un cambio automatico a 2 marce). Nell'auto elettrica devi cambiare il filtro abitacolo, ogni 30mila km circa, e i pneumatici. Neanche le pastiglie dei freni si cambiano, in quanto si utilizza quasi sempre la frenata rigenerativa.
  5. Benefici economici di un'auto elettrica: oltre alla riduzione del costo chilometrico, i tagliandi sono praticamente una formalità, non si paga bollo per 5 anni, e dopo i 5 anni si paga 1/4 del bollo calcolato su una "potenza termica" (quella riportata in libretto) bassissima: ad esempio la mia auto ha una potenza di 150kW, ma nel libretto di circolazione è riportata una potenza termica di 29kW. Praticamente dopo i 5 anni pagherò un importo irrisorio di bollo (ma questo è un dato attuale: in futuro le cose possono cambiare!).
  6. Meglio un accumulatore grande (tanta autonomia, a costo e peso maggiori) o un accumulatore più piccolo (meno autonomia, ma costo e poso inferiore)?
    A parte il costo, minor peso significa minor consumo di pneumatici. Inoltre una maggior capacità di batteria implica quasi sempre un maggior tempo di ricarica, quindi quando capiterà di fare un viaggio molto lungo bisognerà fare più soste ma probabilmente più brevi rispetto ad un'auto con autonomia superiore.
    Ho pianificato un viaggio di 1100km da Pieve di Soligo (Veneto) a Santa Maria di Leuca (Puglia) attraverso il sito https://www.abetterrouteplanner.com : con Kia Niro (con batteria da 64kWh, 450km autonomia, ricarica a max 77kW) mi basta fare 5 ricariche impiegando 3 ore 21 minuti di ricarica. Con una Peugeot e208 (con batteria da 50kWh, 340km di autonomia, ricarica a max 100kW) devo fare 7 ricariche impiegando solo 2 ore e 55 minuti.
    Batterie grandi consentono di avere grandi autonomie, ma richiedono tempi di ricarica più lunghe a parità di potenza.
    Quindi il fattore determinante nell'auto è la potenza massima di ricarica, e nei viaggi lunghi conta molto una buona programmazione delle ricariche: la potenza di ricarica è massima quando la batteria è scarica, e man mano che si ricarica la potenza deve necessariamente diminuire per non rovinare la batteria (non si deve superare la tensione massima consentita), quindi la soluzione più intelligente è ricaricare quando la batteria è intorno al 10% terminando la ricarica intorno all'80% o meno.
  7. La ricarica domestica o al lavoro è certamente la soluzione più comoda: quando l'auto è parcheggiata si ricarica.
    Il sistema EVSE presente nel sistema di ricarica consente di specificare al caricatore di bordo nell'auto la potenza massima che può assorbire in quel momento.
    Si possono utilizzare dei cavi con presa schuko per caricare l'auto a 8-10-16A (da 1.5 a 3kW circa): è la soluzione più economica, lenta e bisogna stare attenti a non oltrepassare il limite di potenza contrattuale per evitare i distacchi, in quanto i cavi di ricarica non hanno un sistema per verificare la potenza prelevata dalla rete.
    Si possono usare anche wallbox che misurano la potenza prelevata dalla rete elettrica: in questo modo la wallbox potrà specificare dinamicamente la potenza massima che l'auto potrà prelevare al fine di evitare distacchi e minimizzare il tempo di ricarica, oppure stabilendo quanta potenza al massimo prelevare dalla rete. Ad esempio, se ho il fotovoltaico e stabilisco che la wallbox potrà prelevare al massimo 0 Watt dalla rete, utilizzerò solo energia rinnovabile dal fotovoltaico per caricare l'auto. Se ho il contatore da 5kW e imposto nella wallbox una potenza massima di 5500W, utilizzerò la massima potenza disponibile per la ricarica e questa verrà variata in base ai consumi istantanei della casa (forno, lavatrice, eccetera) per non superare mai la potenza che ho impostato.
  8. Importanza di non caricare a bassa potenza per non sprecare energia: nel seguente video viene mostrato come varia il fattore di potenza quando si ricarica un'auto. I caricatori di bordo lavorano male a bassa potenza (lavorano in modalità discontinua, con un peggioramento dell'efficienza), pertanto è bene ricaricare sempre ad almeno 4kW.
    Per misurare l'efficienza "indicativa" di ricarica bisogna:
    1. eseguire una ricarica dell'auto, possibilmente a corrente costante e con un bassa corrente (ad esempio 10A) , partendo da un SoC basso fino ad un SoC alto, misurando l'energia consumata. Nel caso si utilizzi una wallbox fai-da-te con DomBusEVSE, basta impostare EVMaxCurrent = 10 ed eseguire la ricarica con EVMode=100%
    2. Efficienza = Capacita netta batteria *  (SoC finale - SoC iniziale) / 100 / Energia utilizzata in ricarica
    Ripetere dopo qualche giorno la ricarica, partendo dallo stesso SoC iniziale (o simile), misurare l'energia, e calcolare l'efficienza con la formula del punto 2.
  9. Ricarica pubblica: ci sono due tipi di colonnine, AC (in corrente alternata) e DC (in corrente continua).
    Le colonnine di ricarica in AC forniscono una corrente alternata, a 230V monofase o 400V trifase, che verrà convertita in corrente continua dal caricatore a bordo auto (On Board Charger). Solitamente gli OBC nelle auto hanno una potenza massima di ricarica pari a 7, 11 o 22 kW. Le colonnine AC possono essere già fornite di cavo per il collegamento dell'auto (tethered), ma la maggior parte ne è sprovvista ed in questo caso bisogna munirsi di un cavo AC Type-2 (salvo eccezioni) da 11 o 22kW secondo la potenza massima del proprio OBC.
    Per ricaricare la batterie con potenze (e quindi velocità) maggiori, bisogna collegare l'auto ad una colonnina di ricarica DC, che integra tutto il sistema di conversione da corrente alternata trifase a corrente continua (in modo da bypassare l'OBC dell'auto)  per caricare la batteria secondo le indicazioni fornite dal Battery Management System presente nella batteria. In sostanza, l'auto comunica alla colonnina DC la percentuale di carica, la tensione massima e la corrente massima di ricarica, che variano in funzione alla temperatura e allo stato di carica seguendo un certo profilo di carica, e la colonnina fornisce energia in base a tali parametri. Ci sono colonnine DC a 25, 40, 50, 75, 100, 110, 150, 250, 350, 400kW: quelle con potenza superiore a 100kW vengono anche definite HPC, e sono in fase di installazione anche megawatt charger con l'obiettivo di fornire potenze di ricarica ancora superiori, adeguate ad auto supersportive e soprattutto ai mezzi pesanti.
    Il grafico sottoriportato mostra la curva di potenza di una batteria, che risulta massima quando la batteria è scarica per poi diminuire quando la batteria supera il 70-80% di carica: questo è uno dei motivi per cui, nei viaggi molto lunghi conviene eseguire ricariche brevi fino al 70-80% piuttosto che voler raggiungere per forza il 100% di ricarica.
    Ricaricando la batteria al 100% inoltre si perde la possibilità per i primi km di sfruttare la frenata rigenerativa, in quanto la batteria non avrebbe la possibilità di accumulare energia essendo già carica completamente.
    Profilo di ricarica audi etron
  10. Esercizi per capire cos'è la potenza e cos'è l'energia.

    Esercizio1:
    La POTENZA si misura in Watt. Ad esempio, il computer Raspberry PI4 (molto usato in domotica) consuma 2.3W, quando ha un carico di lavoro CPU basso.
    Quanta ENERGIA consuma il Raspberry in 1 anno?
    Energia=potenza * tempo, quindi 2.3W * (24x365) ore = 2.3*24*365 W*h=20148 Wh ovvero 20.148 kWh
    Si moltiplicano i numeri, ma si moltiplicano anche le unità di misura!

    Esercizio2: 
    In casa ho una batteria da 15kWh (capacità batteria = energia che può essere stoccata): se ho un esubero di potenza dal fotovoltaico di circa 2kW e la batteria è completamente scarica, quanto tempo mi serve per ricaricarla?

    Come prima, Energia = Potenza * Tempo => Tempo = Energia/Potenza=15kWh/2kW = (15/2) kWh/kW = 7.5h
    In realtà impiegherà un po' di più in quanto il rendimento del sistema non è 100%.

Come ricaricare il veicolo elettrico alle colonnine pubbliche

Consiglio di scaricare l'app tariffev oppure un altro comparatore che consente di visualizzare la mappa delle colonnine disponibili e, per ciascuna di esse, conoscere l'app ed abbonamento con il prezzo più vantaggioso: la registrazione a tariffev è gratuita, ed il comparatore funziona anche dal browser web all'indirizzo https://tariffev.it .

Ad esempio, in agosto 2026 ad una colonnina EnelXWay da 22kW, il prezzo a kWh migliore è di 0.39€/kWh di notte e 0.54€/kWh usando l'app EVDC in modalità pay-per-use. Chi ha necessità di ricaricare spesso a questo tipo di colonnine durante il giorno potrà invece trovare economico l'abbonamento usando l'app A2A e-moving per caricare a 0.42€/kWh.

In questo caso, in una colonnina Plenitude da 110kW si può utilizzare l'app EVDC pagando 0.53 o 0.56€/kWh, oppure A2A e-moving in abbonamento a 0.42€/kWh. Altre app risulteranno più costose.

L'immagine mostra la tariffa applicata dal gestore EnBW utilizzando la propria app su stazioni HPC da 400kW: 0.51€/kWh in modalità pay-per-use, oppure 0.34€/kWh con abbonamento pagando 11.99€ ogni mese.

Come funziona il pagamento? Esistono le seguenti modalità:

  1. Attraverso app su smartphone: bisogna registrarsi, inserendo i propri dati per la fatturazione del costo di ricarica ed i dati della propria carta di debito/credito. Alcune app consentono la gestione di un wallet, ovvero si ricarica il proprio conto virtuale ad esempio con 50€, e si utilizza quel credito per il pagamento delle ricariche godendo a volte di alcuni benefici: sconto sulla tariffa, oppure carta RFID in regalo, ... Alternativamente può essere eseguire il pagamento con la carta ad ogni ricarica, in questo caso verrà prenotato l'addebito di circa 50€ per iniziare la ricarica, che poi viene restituito dopo aver terminato la sessione di carica.
  2. Attraverso RFID, in formato tessera o portachiavi, che è possibile acquistare o ricevere gratuitamente dai gestori: in questo caso la ricarica inizia e termina avvicinando la card alla colonnina, senza necessità di utilizzare l'app sul telefono.
  3. Plug&Charge: è un sistema in fase di consolidamento che consente alla colonnina di ricarica (mediante un lettore presente nel connettore) di leggere un tag RFID presente sull'auto al fine di identificare il conto associato all'auto da cui prelevare l'importo di ricarica. E' il sistema più semplice e immediato da utilizzare, può funzionare solo su colonnine tethered ovvero che includono il cavo di ricarca, ed al momento è abilitato su poche colonnine e supportata da pochi tipi di auto.
  4. Carte di debito o credito con pagamento stile  distributore "self service".

Come pianificare un viaggio per sapere quando e dove ricaricare

Prima di un lungo viaggio vale la pena utilizzare un pianificatore per verificare quante ricariche sono necessarie, e dove. Ovviamente si può poi decidere di ricaricare dove si vuole, a seconda dell'orario e degli impegni, sfruttando le pause pranzo, visite turistiche, eccetera.

Un pianificatore molto utilizzato è ABRP , disponibile sia in app sia nel web: si definisce il tipo di veicolo utilizzato, luogo di partenza e arrivo, ed il sistema fornisce indicazione sul percorso e luoghi consigliati per la ricarica.

Auto elettriche economiche 2026

Leggi l'articolo da Rinnovabili.it

Curiosità

Quanto costa percorrere con l'auto elettrica 15mila km in un anno?

Dipende da quanto si paga l'energia elettrica e come si ricarica. L'immagine fornisce in sintesi il caso reale (non estremo) di ricarica prevalentemente durante il giorno (le giornate in estate sono lunghe, e si può ricaricare anche nel weekend) e disponibilità di un impianto fotovoltaico sul tetto, senza accumulo, il costo nel 2022 per percorrere 15mila km, riscaldare e raffrescare casa, far funzionare lavatrice, lavastoviglie, 2 frigoriferi, 1 congelatore, eccetera, è stato di negativo (ovvero il corrispettivo per la vendita dell'energia è stato superiore alla somma delle bollette elettriche e delle ricariche dell'auto eseguite alle colonnine pubblichedi cui 64€ per la ricarica alle colonnine pubbliche).

L'elettrificazione di casa e della mobilità è certamente un ottimo investimento: oltre alla riduzione dei costi, il beneficio economico è impagabile. Immagina di uscire per una passeggiata e non sentire la puzza di smog dovuto al trasporto e al riscaldamento a legna/pellet!!!

Come riportato nell'immagine, l'impianto fotovoltaico è l'artefice del cambiamento (verso un mondo meno inquinato) e del risparmio, ma hanno contribuito in maniera significativa anche l'auto elettrica e l'impianto domotico, utilizzando il software free Domoticz che attraverso uno script controlla la pompa di calore in modo da privilegiare il consumo nei momenti in cui l'elettricità costa meno e il rendimento risulta migliore.

Aggiunge alcune considerazioni: va benissimo l'impianto fotovoltaico a SUD d'inverno, se si usa la pompa di calore: la maggior parte dei consumi avviene nei mesi di dicembre/gennaio in cui ci sono poche ore di luce ed in cui il sole sorge a sud-est e tramonta a sud-ovest. Al contrario, nei 6 mesi caldi, il sole sorge a est e tramonta a sud: in questo caso il fotovoltaico su due falde rivolte a est e ovest consente di avere produzioni anche di prima mattina e in tardo pomeriggio, quando l'energia da fotovoltaico scarseggia ed i costi risultano più alti, contribuendo quindi sia a stabilizzare la rete sia ad avere una migliore remunerazione evitando il "picco di mezzogiorno" in cui ci sarà presto un eccesso di produzione elettrica.
Il seguente grafico mostra l'andamento del prezzo (linea rossa) e dell'energia richiesta dall'Italia ora per ora, stimata per domani. Normalmente, nei giorni lavorativi, il prezzo sale al mattino (quando c'e' tanta richiesta di energia e ci sono tanti impianti fotovoltaici "stupidi" che impiegano l'energia per ricaricare l'accumulatore), e poi alla sera quando viene meno l'energia dal fotovoltaico; nelle belle giornate di sole,  da aprile a ottobre, si può invece osservare un calo dei prezzi nelle ore pomeridiane (quando c'e' tanta produzione fotovoltaica e gli accumulatori sono carichi).

Il seguente grafico mostra l'andamento dei prezzi orari dell'energia in una giornata di weekend soleggiato, sabato 27 maggio 2023: si può notare come l'elevata produzione da fotovoltaico induca una drastica riduzione dei prezzi, a dimostrazione che le energie rinnovabili contribuiscono a ridurre il costo dell'energia.
Sarebbe tuttavia opportuno che l'energia venga pagata dal consumatore in base al PUN orario, come avviene in Danimarca, affinché l'utente sia protagonista della stabilizzazione della rete: nel caso specifico sarebbe infatti opportuno che le auto elettriche vengano caricate quando il PUN è basso ovvero quando c'e' un eccesso di produzione.

Prezzo Unico Nazionale il 27/05/2023 - Prezzo basso per eccesso di produzione fotovoltaico
Consiglio: nel caso di fotovoltaico rivolto a est e ovest è possibile installare 8kW circa di pannelli fotovoltaici collegati ad un inverter da 6kW (proprio perché non c'e' il picco di produzione). Meglio comunque sarebbe un tracking solare in grado di garantire una produzione quasi costante durante il giorno: maggior informazioni nella pagina in inglese con alcuni esempi sul tracking solare

Quali sono i consumi di una casa con riscaldamento/raffrescamento con pompa di calore e impianto radiante?

Ho fotovoltaico senza accumulo, e non sono contrario all'accumulo a prescindere. Più avanti penso di installare un piccolo accumulo per superare le ore serali in cui il costo è alto (essendo alti i consumi serali).
Sono di Treviso, ho impianto da 7.2kWp sul tetto, su falde a est e ovest, che d'inverno rende come un 4.5kWp a sud.
Riscaldo casa con pompa di calore, e nei mesi critici (dicembre/gennaio) il PV produce circa 4-10kWh/giorno e devo importare circa 30-40kWh al giorno. In questo caso le batterie non servono, soprattutto perché ho la pompa di calore che, grazie all'impianto domotico autocostruito, insegue i consumi del fotovoltaico (se produce molto, aumenta i suoi consumi).
Negli altri periodi importo circa 4-5kWh al giorno: di notte la PDC non funziona, e d'estate raffresco il pavimento di giorno in modo da accenderla solo quando il fotovoltaico produce.
Nel 2022 l'energia elettrica per alimentare e riscaldare casa, e percorrere anche 15mila km con l'auto elettrica, mi è costata meno di zero (ho guadagnato 117€ grazie alla remunerazione dell'energia immessa in rete).
Quindi, per le mie esigenze, posso dire che:

* la maggior parte di energia viene importata d'inverno, e qui l'accumulo non serve a nulla a meno che tu non abbia un fotovoltaico di potenza esagerata che produce a mezzogiorno molto più di quanto consumi la PDC

* se ottimizzi l'uso degli elettrodomestici (accendendoli di giorno) e puoi ricaricare l'auto di giorno, ti basta un accumulo che copra il tuo fabbisogno notturno, che in genere è basso

* se puoi caricare l'auto solo di notte puoi pensare ad un accumulo più grande, ma tieni presente che stoccare e recuperare energia non è un processo senza perdite!

* l'auto elettrica si ricarica bene durante la pausa pranzo in cui la potenza dal fotovoltaico è massima. Nei mesi invernali la ricarico invece di notte.

Comunque sto valutando la possibilità di installare un accumulo da 6-10kWh per migliorare l'autoconsumo da marzo a ottobre, consapevole che i vantaggi non saranno economici bensì di sistema, nel senso che ridurrò l'impatto di casa sui consumi dalla rete.

Energia prodotta dal fotovoltaico sul tetto: Treviso, 2700Wp verso est + 4500Wp verso ovest
Energia prodotta dal fotovoltaico durante un anno intero

Energia importata dalla rete (fotovoltaico 7.2kWp, no accumulo, ampia casa A4 con pompa di calore)
Energia importata

Energia immessa in rete
Energia esportata

Articolo pubblicato su VaiElettrico, 2025-01-04

Abito con mia moglie in provincia di Treviso, ho una casa singola di circa 250mq del 1992 che è stata ristrutturata 7 anni fa per avere un migliore isolamento termico (cappotto termico esterno) e per non utilizzare più il gas come fonte primaria di energia termica: ho infatti due pompe di calore, una per il riscaldamento (da 8kWt, consuma al massimo 3kW) ed una per l'acqua calda sanitaria, un impianto fotovoltaico sul tetto da 7.2kWp con inverter da 6kW, ed un contratto energia elettrica 100% rinnovabile con potenza di 5kW (potenza disponibile 5500W, oppure 6350W per max 2 ore ogni 4).
Ho inoltre una Kia eNiro del 2021 con accumulatore da 64kWh netti.
Ho schematizzato nell'immagine l'energia prodotta, importata, autoconsumata, i relativi costi, eccetera.


E' un bilancio provvisorio in cui ho stimato al ribasso il rimborso GSE (che in realtà dovrebbe essere superiore) per l'energia immessa in rete, e l'importo della prossima bolletta relativa all'energia elettrica di dicembre.
Ho inoltre riportato i grafici dei consumi mensili della pompa di calore per il riscaldamento e raffrescamento, e l'energia mensile utilizzata per ricaricare l'auto, suddivisa poi in energia proveniente dal fotovoltaico ed energia proveniente dalla rete.
Si può notare come in Pianura Padana sia molto più alto il fabbisogno energetico in inverno per il riscaldamento domestico, rispetto al raffrescamento estivo.
In questa situazione le ricariche dell'auto in inverno avvengono utilizzando quasi esclusivamente energia dalla rete in quanto tutta l'energia prodotta dal fotovoltaico viene utilizzata nel mio caso dalla pompa di calore.
D'estate invece l'auto risulta un'ottima soluzione non solo per viaggiare in modo economico (l'energia dal sole costa di solito dai 6 ai 12 centesimi al kWh, nel senso che se non ricaricassi l'auto tale energia immessa in rete verrebbe retribuita dal GSE), ma anche per stabilizzare la rete: in particolar nel mese di maggio, quando l'irraggiamento solare è forte e le temperature sono basse, spesso l'energia dagli impianti fotovoltaici tende a superare l'energia consumata, portando l'inverter solare a ridurre la potenza immessa in rete per non oltrepassare la tensione di 253V (230V + 10%): in queste situazioni sarebbe auspicabile che venissero utilizzate le auto come sistema per ridurre la tensione di rete accumulando l'energia che altrimenti sarebbe persa.
Sempre per rimanere in tema, durante l'anno si sono spesso verificati dei periodi in cui il costo orario dell'energia (all'ingrosso) risultava quasi nullo: questa situazione si verificava in particolare nei weekend dei mesi di maggior produzione con temperature miti, oppure in periodo autunnale quando erano in corso importanti perturbazioni nell'Europa centrale con forti produzioni dagli impianti eolici. Anche in questo caso sarebbe auspicabile ricaricare l'auto, per sfruttare l'energia a basso costo, cosiccome sarebbe utile che anche i clienti domestici pagassero l'energia in base al prezzo orario, anziché alle fasce orarie, al fine di migliorare la stabilità della rete consentendo di consumare energia a prezzi agevolati nelle ore in cui è maggiormente disponibile e ridurre i consumi nelle ore di punta (prima mattina e sera).
Le condizioni di prezzi favorevoli saranno sempre più disponibili in futuro, anche se l'Italia sta affrontando con lentezza la transizione energetica rispetto ad altri paesi europei: infatti se in Europa nel 2024 il costo medio dell'energia elettrica è scesa del 16% rispetto al 2023, in Italia osserviamo un progressivo aumento dei prezzi in quanto dipendiamo ancora troppo dal gas. Quando finalmente avremo anche noi una discreta capacità eolica e fotovoltaica, avremo anche noi i prezzi dell'energia negativi o azzerati come succede spesso in altri paesi europei nelle situazioni favorevoli per eolico o fotovoltaico!
Termino con un parere relativo all'accumulo domestico, che ritengo superfluo ed economicamente sconveniente quando la pompa di calore è gestita in modo ottimizzato (inseguendo la produzione del fotovoltaico), raffrescando casa attraverso l'impianto a pavimento, e le ricariche all'auto possono essere fatte anche di giorno. Da aprile a ottobre l'energia importata dalla rete per il funzionamento di casa risulta mediamente inferiore ai 5kWh, corrispondenti a 1.3€ al giorno. Se avessi un accumulo potrei quindi risparmiare 1.3€ * 200 giorni = 260€ a fronte di un mancato introito dalla vendita di energia di 5kWh * 200 giorni * 1.15 (perdite per caricare e scaricare l'accumulo domestico * 0.10€/kWh = 115€, quindi avrei un beneficio di 260-115=145€ all'anno. Ma quanto sarebbe il tempo di rientro per l'installazione di un accumulo statico da 10kWh se il beneficio (sovrastimato) è di 145€ all'anno?
Per il bene dei cittadini della Pianura Padana, auspico in un cambio di mentalità da parte del Governo al fine di consentire l'installazione di nuovi parchi eolici offshore al Nord, installazione di parchi fotovoltaici con tracking per avere una maggior produzione durante le prime ore del giorno e il tardo pomeriggio, ed una maggior coscienza da parte di tutti i cittadini riguardo i temi ambientali: viviamo in uno dei territori più inquinati, cerchiamo di utilizzare le nuove tecnologie quando dobbiamo cambiare caldaia e auto! Serviranno tanti anni, ma quando avremo finalmente smesso di bruciare combustibili fossili e legnosi, potremo finalmente arieggiare casa senza il problema della puzza dovuta alle polveri sottili che ogni anno causa la morte di almeno 60mila italiani.
Spero che le informazioni riportate siano abbastanza comprensibili e possano essere utili a chi vuole valutare i benefici economici (oltre a quelli ambientali!) offerti dal fotovoltaico e dall'auto elettrica.

Consigli: che interventi fare e tempi di rientro

1. se non ti produci energia, la devi acquistare. L’energia elettrica costa molto, perciò l’impianto fotovoltaico si ripaga in pochi anni, grazie anche alla detrazione fiscale.
2. se produci l’energia e poi la disperdi, non hai fatto un grande affare: in particolare la casa va coibentata. Se hai un sottotetto non abitato, isolarlo posando dei pannelli XPS diventa una scelta mooolto conveniente e fai-da-te. Se hai un sottotetto non agibile, c’e’ la soluzione dell’insufflaggio di materiale isolante (palline di carta, o nel caso si abbiano caminetti/stufe a biomassa, fiocchi di lana di roccia o vetro).
3. il cappotto termico costa molto, ma per case datate come la mia è indispensabile per avere un basso consumo energetico d’inverno e poter quindi utilizzare una pompa di calore per il riscaldamento. In alternativa si possono rivestire internamente tutte le pareti.
4. il riscaldamento a pavimento è un altro elemento essenziale… chi acquista una casa che non ha ci pensi: se vuoi togliere il pavimento vecchio, installa anche l’impianto a pavimento. In alternativa si può installare anche un impianto radiante a soffitto, che funziona benissimo d’estate, un po’ meno d’inverno (quando ti siedi a tavola sentirai probabilmente le gambe fredde).
Soprattutto l’impianto radiante a pavimento ti consente di accumulare energia evitando nelle mezze stagioni ed in estate di accendere la pompa di calore di notte (quando il fotovoltaico non produce).
5. Sempre per chi deve ristrutturare casa, consiglio vivamente l’installazione della ventilazione meccanica controllata (VMC), eventualmente con chiller per deumidificare. E’ una soluzione ottima per avere il ricambio d’aria necessario a non avere muffa in casa ed avere aria fresca. D’estate può essere utilizzato per raffrescare e deumidificare l’aria (per cui non serve installare degli split in giro per casa).

Alcune CONSIDERAZIONI SUL FOTOVOLTAICO

1. avere le falde a est e ovest come nel mio caso va benissimo in estate, ma va male in inverno in cui il sole sorge a sud-est e tramonta a sud-ovest
2. per chi intende installare il fotovoltaico, raccomando di installare più pannelli possibili, perché il fabbisogno energetico aumenterà sempre e ampliare l’impianto un domani potrebbe essere molto più costoso che installare subito più pannelli. Chi è in monofase ha il limite di 6kW per l’inverter, e considerando che d’estate fa caldo ed i pannelli rendono meno, chi ha una falda a sud può installare sicuramente moduli per almeno 7.5kWp, chi ha le falde a est e ovest può installare anche 9kWp. Verificate con il vostro tecnico!
3. considerate gli ombreggiamenti che potete avere soprattutto in inverno, con il sole basso: se avete camini, alberi, o l’antenna TV con i pannelli sotto, problemi con piccioni sporcaccioni, valutate la possibilità di installare moduli fotovoltaici con ottimizzatori (solaredge, huawei, tico, …) in modo da avere sempre la massima produzione anche in caso di ombreggiamenti, oppure microinverter con MPPT per ogni ingresso.
4. i tempi sono maturi per lo storage domestico, che potete sempre installare facilmente più avanti se avrete optato per un inverter che supporti l’accumulo.
Scegliete un inverter senza ventola (indice di maggiore efficienza).
5. Non avendo alcuno storage non so bene le caratteristiche dei vari prodotti, ma tenete presente che la conversione DC/DC per caricare la batteria (quindi inverter ibrido in grado di caricare la batteria partendo dalla tensione dei pannelli fotovoltaici) è più efficiente della conversione AC/DC (ricarica batteria a partire dai 230Vac, ovvero quello che fanno gli inverter retrofit e i Tesla Powerwall), quindi in teoria è meglio dotarsi di inverter ibrido per un futuro accoppiamento ad una batteria.

Quanto produce un inseguitore solare a 2 assi?

Questi i risultati comparativi in Veneto, in una giornata autunnale, fra un inseguitore a due assi controllato dal nostro controller DomBusTracker e un impianto fotovoltaico sul tetto, orientato in parte a est e in parte a ovest.

Comparison between solar tracker and roof photovoltaic production

Wiring diagram for a dual axis solar tracker controller by DomBusTracker domotic module

Come viene remunerata l'energia immessa con lo scambio sul posto?

Il rimborso GSE può essere calcolato, all'incirca, nel seguente modo:

minimo(Energia immessa, Energia importata) * (prezzo zonale quartorario * coefficiente_perdita + CUS) =
minimo(Energia immessa, Energia importata) * (circa 0.10 * circa 1.052 + circa 0.0652)  valori relativi al 2024

Esempio: immetto in rete 3000kWh e prelevo dalla rete 5000kWh
Valore rimborsato = 3000 * (0.1052 + 0.0652) = 511€  da cui va sottratto il costo di gestione GSE, che dipende dalla potenza dell'impianto.

Quanto consuma l'auto elettrica in montagna?

In salita consuma, in discesa ricarica. La disponibilità di una grande batteria consente di poter immagazzinare molta energia, a differenza delle auto ibride o ad idrogeno.

Ad esempio a febbraio 2022 ho fatto un viaggio di piacere sulle Dolomiti venete/trentine. Salito in cima al Passo Pordoi (2239m SLM)  lo stato di carica della batteria era 59%. Da li sono sceso a Canazei, Moena, risalito al Passo San Pellegrino, Falcade, Agordo, Trichiana, e risalendo verso il Passo San Boldo, a circa 400m SLM lo stato di carica era ancora al 59%. In sostanza ho percorso 106km sfruttando l'energia accumulata scendendo dal Passo Pordoi.

106 km percorsi sfruttando i 1800m di dislivello in discesa dal Passo Pordoi

E' possibile autocostruirsi un sistema di ricarica / wallbox che si integri con la domotica?

Si, bisogna ovviamente essere abbastanza esperti di elettronica/informatica/impianti elettrici.

Ci sono diversi moduli EVSE in commercio che controllano la ricarica del veicolo e si integrano con sistemi domotici attraverso collegamento WiFi, LAN o RS485. Creasol produce un modulo, ad uso sperimentale, che supporta i protocolli DomBus e Modbus RTU, e può essere utilizzato con qualsiasi sistema domotico opensource (Node_RED, HomeAssistant, ioBroker, OpenHAB, Domoticz, ....).

Autocostruire una wallbox per la ricarica di veicoli elettrici

CIR, V1G intelligente per l'Italia

Articolo: https://elettricomagazine.it/emobility/ricarica-elettrica-cir-controllore-di-infrastruttura-di-ricarica/

Contratti di fornitura energia elettrica con tariffa basata sul prezzo zonale orario

Questo è quanto fornisce DeepSeek. Da verificare, e sicuramente manca l'offerta 100% rinnovabile Duferco Pianetablu.

In Italia, alcuni fornitori di energia elettrica offrono tariffe "dynamic pricing" o "a prezzo variabile orario", che si basano sul prezzo zonale orario (o sul PUN, Prezzo Unico Nazionale) invece di applicare un prezzo fisso o una media mensile.

Ecco i principali fornitori che propongono tariffe di questo tipo:

1. Illumia – Tariffa "Miglior Prezzo" (ex Next Energy)

  • Come funziona:

    • Prezzo dell'energia allineato al PUN (Prezzo Unico Nazionale) in tempo reale con aggiunta di una componente fissa (spread).

    • Bolletta calcolata sul consumo effettivo nelle diverse fasce orarie (F1, F2, F3).

  • Vantaggi:

    • Conveniente se consumi energia nelle ore più economiche (es. di notte o nei weekend).

  • Sito: Illumia

2. NeN – Tariffa "Dynamic"

  • Come funziona:

    • Prezzo variabile ogni ora in base al mercato elettrico (PUN + spread).

    • App per monitorare i prezzi in tempo reale e ottimizzare i consumi.

  • Vantaggi:

    • Possibilità di risparmiare spostando i consumi nelle ore più convenienti.

  • Sito: NeN

3. Wekiwi – Tariffa "Variabile PUN"

  • Come funziona:

    • Prezzo legato al PUN orario o mensile (a scelta del cliente).

    • Opzione con prezzo fisso o variabile con limiti di oscillazione.

  • Vantaggi:

    • Flessibilità e trasparenza sui costi.

  • Sito: Wekiwi

4. Energia Italia – Tariffa "Index"

  • Come funziona:

    • Prezzo basato sul PUN + un piccolo margine.

    • Aggiornato mensilmente o giornalmente a seconda del piano.

  • Vantaggi:

    • Adatto a chi vuole un prezzo di mercato senza fissare un costo a lungo termine.

  • Sito: Energia Italia

5. E.ON – Tariffa "EnergyWeb" (in passato)

  • Come funziona:

    • Prezzo variabile in base alla domanda e offerta del mercato.

    • Possibilità di monitorare i consumi via app.

  • Attenzione: Non sempre disponibile, meglio verificare l’offerta attuale.

  • Sito: E.ON

6. Octopus Energy (in arrivo in Italia)

  • Novità:

    • In UK offre tariffe "Agile" con prezzi aggiornati ogni 30 minuti.

    • Presto potrebbe lanciare un'offerta simile in Italia.

  • Sito: Octopus Energy

Come funzionano queste tariffe?

  • Il prezzo dell’energia cambia ogni ora/giorno/mese in base al mercato elettrico (GME).

  • Se hai un contatore smart, puoi sfruttare i prezzi più bassi (es. di notte o nei weekend).

  • Se invece hai un contatore tradizionale, il fornitore applica una media per fascia oraria (F1, F2, F3).

Conviene?

✔ Sì, se:

  • Hai un contatore smart e puoi spostare i consumi nelle ore più economiche.

  • Vuoi pagare un prezzo trasparente e legato al mercato.

❌ No, se:

  • Preferisci la stabilità di un prezzo fisso.

  • Non vuoi rischiare rialzi improvvisi in caso di crisi energetiche.

 

 

Energia rinnovabile in Italia

Collegamenti HVDC

Terna, il gestore dell'infrastruttura di rete di trasmissione italiana ha in cantiere, a partire dal 2023, di installare due reti dorsali HVDC per portare 2GW di potenza dal Sud Italia e isole verso il Nord. Spesa complessiva 11 miliardi di euro [Fonte]. HVDC sono collegamenti ad 500-600kV in corrente continua, quindi utilizzano due cavi conduttori, offrendo una perdita di circa 3% ogni 400km. Richiede delle costose stazioni di conversione AC/DC e DC/AC per la conversione in trifase e il collegamento quindi alla rete HVAC esistente (trifase a 115kV, 220kV o 380kV).

Parchi eolici offshore

Sono installazioni di turbine eoliche al largo della costa, su pali fissati sul fondale (se fondale basso) o su piattaforme galleggianti ancorate al fondale.
I vantaggi delle installazioni offshore sono:

  • ridotto impatto visivo: a 20km o più dalla costa si intravedono appena
  • maggiore velocità del vento e minor turbolenze, dovute alla superficie piatta
  • maggiore disponibilità di vento

Attualmente (2023) hanno un costo (a parità di potenza) superiore rispetto alle installazioni onshore (in terra ferma) dovute al costo della piattaforma galleggiante ed ancoraggio.
Facendo un paragone con il punto precedente, con 9 miliardi di euro sarebbe possibile installare parchi eolici offshore per una capacità di 3GW (magari in alto tirreno o adriatico) da collegare direttamente alla rete elettrica del Nord Italia. Forse sarebbe una soluzione più vantaggiosa rispetto a quella di installare tutto al Sud e dover investire capitali enormi per poi interconnettere il Sud al Nord, dal momento che il Nord attualmente richiede almeno 10GW di potenza rinnovabile.

Produzione annua in relazione alla velocità del vento

Il sito web di Energy Hunters risulta molto ricco di informazioni relative all'eolico.
Interessante è anche la caratteristica degli aerogeneratori, avvero la producibilità annua di energia in funzione della velocità del vento:

La potenza aerodinamica varia con il cubo della velocità, ma ci sono molti aspetti da dover tener presente fra cui la capacità dell'aerogeneratore di variare l'inclinazione della pala per ottimizzare la produzione e mettersi in sicurezza in caso di elevate ventosità.

Fotovoltaico

Efficienza delle diverse tecnologie fotovoltaiche in relazione allo sviluppo (clicca per scaricare PDF ad alta risoluzione).
Photovoltaic efficiency of different technologies

Biogas, biocarburanti

Alcune informazioni utili sull'efficienza di produzione di biogas e biocarburanti tratti dal video https://youtu.be/f-2qcqxKOy0 :

  • 1 ha di mais consente di produrre 15MWh di biometano
  • 1 ha di colture zuccherine/amilacee consente di produrre (in climi favorevoli come il Brasile) 6000 L di bioetanolo, ovvero 6.6MWh
  • 1 ha di colture oleaginose consente di produrre 1000 kg di biodiesel, corrispondenti a 10MWh di energia
  • 1 ha di fotovoltaico consente di installare da 500kWp a 1.5MWp a seconda della tipologia di installazione, con una producibilità che varia da 600MWh a 900MWh in Pianura Padana. In questo caso vi sono altri vantaggi rispetto ai biocarburanti: non si usano pesticidi, fertilizzanti e altri inquinanti, non è richiesta l'irrigazione e consumo di acqua, e viene consentita la coltivazione sotto i pannelli (agrivoltaico) con un ridotto irragiamento (e quindi consumo d'acqua).

 

 

 

Een geoptimaliseerde Rasbian + Domoticz-image installeren op een Raspberry Pi 3, Pi 4 of Pi 5.

Domotics

Domoticz is een multiplatform domoticasysteem dat zeer compact en snel is omdat het in C++ is geschreven. Het maakt het mogelijk om zelfs complexe automatiseringen te schrijven voor het beheer van bijvoorbeeld een compleet alarmsysteem, de volledige aansturing van een warmtepomp, enzovoort.

Een boek hierover is beschikbaar op https://github.com/rwbl/domoticz-homeautomation-workbook

Deze pagina laat zien hoe je een nieuwe, schone image maakt met Raspbian, Domoticz, een firewall en een back-up. Raspbian + Domoticz

Als u liever een hoogwaardige, reeds geprogrammeerde SD-kaart koopt, bezoek dan onze winkel . domoticz klein

Een image schrijven voor Raspberry Pi

We bieden een snelle oplossing voor het installeren van een vooraf geconfigureerde Raspbian-image voor Raspberry Pi 3, Pi 4 en Pi 5, compleet met de nieuwste Domoticz-software en geconfigureerd om het MicroSD-flashgeheugen te beschermen (het flashgeheugen kan niet meer dan 10.000 keer veilig worden beschreven) en een wekelijkse back-up te exporteren die gemakkelijk kan worden hersteld in geval van problemen.

Deze image is getest op zowel Raspberry Pi 3 als Raspberry Pi 4 en maakt gebruik van de nieuwste Raspbian-distributie.

Door deze image op een microSD-kaart te zetten, kunt u uw Domoticz-apparaten direct via de webinterface configureren.

De afbeelding wordt naar een microSD-kaart gekopieerd.

Je hebt een Linux-distributie, wget, sfdisk, fsarchiver en een microSD-kaart (of SSD) met minimaal 16 GB aan opslagruimte nodig.

Voer vanuit de bash-shell de volgende opdrachten in:

 export disk=/dev/sdh #vervang sdh door het microSD/SSD-apparaat
wget https://docs.creasol.it/raspberry_domoticz.sfdisk
wget https://docs.creasol.it/raspberry_domoticz.sfdisk
sfdisk $disk < raspberry_domoticz.sfdisk
fsarchiver -v restfs raspberry_domoticz.fsa id=0,dest=${disk}1 id=1,dest=${disk}2
echo -e "\\aMicroSD gekopieerd"

Functies

  • Werkt met zowel Raspberry Pi 4 als Raspberry Pi 3.
  • Raspbian + een recente versie van Domoticz
  • Geoptimaliseerd om het schrijven naar flashgeheugen te verminderen: /tmp en /var/log bevinden zich in het RAM-bestandssysteem, niet op de SD-kaart, en swap is uitgeschakeld. Tijdelijke Domoticz-bestanden worden naar /tmp geschreven, niet naar de SD-kaart, waardoor de levensduur van het geheugen wordt verlengd.
  • Firewall met iptables/netfilter, die geconfigureerd kan worden door /usr/local/sbin/myfirewallpi.sh te bewerken.
  • Een back-upfunctie die automatisch incrementele back-ups maakt van gewijzigde bestanden; één dag per week een volledige back-up en één dag per maand een image; de back-up kan eenvoudig worden geëxporteerd naar een aangesloten USB-harde schijf of NAS (FTP of CIFS).
  • Domoticz is gedeeltelijk geconfigureerd met enkele apparaten en de Creasol Dombus-plugin is al geïnstalleerd (de Domoticz-plugin maakt gebruik van Creasol DomBus-apparaten die via een RS485 seriële bus op de Raspberry Pi zijn aangesloten).

Toegang tot en configuratie van de Raspberry Pi met de geprogrammeerde image

Dit zijn de standaard inloggegevens voor deze afbeelding:
Linux-gebruiker: pi , wachtwoord: arangingenni
Linux-gebruiker: root , wachtwoord: geriandallse
Domoticz-gebruiker: domoticz , wachtwoord: creasol

Het wordt aangeraden deze standaardwachtwoorden te wijzigen!

Als je de Raspberry Pi met deze image opstart, krijgt deze de netwerkconfiguratie van je DHCP- server (router), zodat je er via de browser verbinding mee kunt maken via een URL zoals http://192.168.1.123:8080 ( controleer je DHCP-server om het IP-adres te achterhalen dat aan de Raspberry Pi is toegewezen , of voer een netwerkscan uit op je LAN). Als je verbinding maakt met de Raspberry Pi vanuit een 192.168.*.*-, 172.16.*.*- of 10.*.*.*-netwerk, is geen authenticatie vereist .
Bovendien is de SSH-service ingeschakeld , zodat u via een beveiligde shell (met SSH, PuTTY of een andere SSH-client) toegang kunt krijgen als gebruiker pi of root.


Hoe maak je een image van een Raspberry SD-kaart?

We hebben het bash- script raspberry_domoticz.sh (zie hierboven) geschreven waarmee een kopie van het Raspberry Pi-geheugen op een USB-stick kan worden opgeslagen en waarmee ook een nieuwe SD-kaart met de inhoud van een opgeslagen image kan worden aangemaakt .

Dit is nuttig omdat:

  1. Flashgeheugen kan niet oneindig vaak beschreven worden : normaal gesproken kan elke flashcel tot 10.000-100.000 keer beschreven worden. De voorgestelde image is geoptimaliseerd om het aantal schrijfbewerkingen naar de SD-kaart te beperken.
  2. Het is altijd een goed idee om een back-up te hebben van de draaiende Raspberry Pi , zodat je in geval van problemen het systeem kunt herstellen vanuit een oude back-up.
  3. Misschien moet je een bestaande SD-kaart klonen en de afbeeldingen op je pc of NAS bewaren.

Functies:

  • Afbeeldingen worden gecomprimeerd ... het is onzinnig om een afbeelding van 16 GB te hebben voor een bijna lege SD-kaart van 16 GB!
  • Afbeeldingen kunnen op verschillende SD-kaarten worden hersteld , dus het is mogelijk om dezelfde afbeelding te gebruiken om zowel een SD-kaart van 32 GB als een SD-kaart van 8 GB te beschrijven.
  • Het maken en herstellen van een image gaat echt snel , in vergelijking met andere systemen.

Helaas werkt dit systeem niet in Windows, maar... wie gebruikt er tegenwoordig nog Windows? Alles migreert naar Linux! Android is Linux. Raspbian is Linux. Je routers, access points en tv's gebruiken hoogstwaarschijnlijk het Linux-besturingssysteem! ;-)

Klik hier om het script raspberry_domoticz.sh te downloaden, sla het op in een uitvoerbare map op uw Linux-systeem (bijv. /usr/local/sbin) en geef het uitvoerrechten.
Voer raspberry_domoticz.sh uit en volg de instructies om een gecomprimeerde image van de Raspberry Pi SD-kaart te maken. Het werkt ook in live-modus, direct vanuit een werkend Linux-systeem, met een hoge kans op succes.

 

Wilt u meer? Presentatie van de uiterst betrouwbare DomBus.

 

Veelgestelde vragen (FAQ)

Enkele handige commando's

ps ax |grep domoticz : geeft een lijst van alle actieve processen weer, maar toont alleen de processen met de naam domoticz

netstat -lnp |grep domoticz : toont de TCP/UDP-poorten die door Domoticz worden gebruikt (normaal gesproken gebruikt het poort 8080).

lsusb : geeft een lijst van apparaten die via USB zijn aangesloten. lsusb -v toont details over USB-apparaten.

Hoe configureer je de GPIO-pinnen van een Raspberry Pi?

Met deze Raspbian-image kunnen GPIO's worden geconfigureerd door het bestand /etc/rc.local te bewerken en de gewenste GPIO in te stellen als 'out' (voor uitvoer), 'in' (voor invoer) of 'both' (voor bidirectionele communicatie).

 [code]#/etc/rc.local bestand

#GPIO instellen met de WiringPi-tool:
#syntax: gpio export GPIONUMBER out|in|both om in te stellen als uitvoer, invoer of I/O
gpio export 24 out # Instellen als uitvoer.
gpio export 23 out
GPIO-export 22 uit
GPIO-export 27 uit
GPIO-export 18 uit
GPIO-export 17 uit
gpio export 25 out #lightOut2
gpio export 8 out #lightOut3
gpio export 7 out #lightOut4
gpio export 12 out #lightOut1[/code]

Na het bewerken typt u /etc/rc.local om het script opnieuw te laden.

Hoe kan ik de Creasol DomBus-plugin bijwerken naar de nieuwste versie?

Typ in de root-shell het commando creasoldombus_update.sh.

Hoe configureer ik een statisch IP-adres voor de Ethernet-interface van Raspbian?

Bewerk het bestand /etc/dhcpcd.conf ( nano /etc/dhcpcd.conf ) en voeg de volgende regels aan het einde toe:

 interface eth0 static ip_address=192.168.1.250/24 static routers=192.168.1.1 static domain_name_servers=192.168.1.1 8.8.8.8

en opslaan met Ctrl-X.

De Raspberry Pi kan niet via SSH (poort 22) of HTTP (poort 8080) worden verbonden.

Zorg ervoor dat de LAN-kabel is aangesloten op de Raspberry Pi en dat een DHCP-server IP-adressen aan het apparaat kan toewijzen.

Er is een firewallscript geïnstalleerd, /usr/local/sbin/myfirewallpi.sh, dat vereist dat de eth0-interface al geconfigureerd is via DHCP of een statisch IP-adres.

Hoeveel stroom verbruikt een Raspberry Pi 4?

Aangezien domoticasystemen zijn ontwikkeld om de ecologische voetafdruk van gebouwen te verkleinen, is het belangrijk om te weten of een Raspberry Pi een geschikte hardware is voor een domotica-controller, met het oog op processorkracht, stabiliteit en energieverbruik.

Op internet vind je maar weinig artikelen die het stroomverbruik van een Raspberry Pi beschrijven. De beste manier is daarom om het stroomverbruik in de praktijk te meten.

Dit is de hardware die getest wordt: een Raspberry Pi 4 met 1 GB RAM, aangesloten op het LAN en gevoed door een gelijkstroomvoeding van 5V.

Raspberry Pi 4 1 GB

Hieronder de waarden van stroom en spanning gemeten met Raspbian OS.
1. Links, zonder enige belasting (zeer laag CPU-gebruik), is het stroomverbruik van de Raspberry Pi = 5V * 0,42A = 2,1W (normaal).

2. Rechts, met 100% belasting op de 4 kernen, is het stroomverbruik van de Raspberry Pi = 5V * 0,63A = 3,15W piek.

Raspberry Pi 4 1GB noload

Raspberry Pi 4 1GB Fullload

 

Raspberry Pi 4 1GB Fullload top

Firewallconfiguratie

Hoe activeer ik het IP-adres waarmee ik mijn Raspberry Pi/Domoticz van buitenaf kan benaderen?

Bewerk het firewallscript met het commando nano /usr/local/sbin/myfirewallpi.sh en wijzig de variabele ADMIN_SOURCE door de IP-adressen (of netwerken) toe te voegen die u wilt inschakelen:

ADMIN_SOURCE='80.86.145.56/29 149.13.157.0/24 37.0.0.0/8'

waarbij /24 betekent dat het laatste cijfer in het IP-adres elk getal tussen 0 en 255 mag zijn, en /8 betekent dat alleen het eerste cijfer wordt gecontroleerd, terwijl de overige 3 cijfers elk getal tussen 0 en 255 mogen zijn.

Sla het bestand op met CTRL-s en CTRL-x en voer vervolgens het script uit door /usr/local/sbin/myfirewallpi.sh te typen.

Hoe schakel ik inkomende verbindingen met de webserver in op een Raspberry Pi?

Wijzig het firewallscript met het commando nano /usr/local/sbin/myfirewallpi.sh en voeg poort 80 (http) of 443 (https) toe aan de variabele TCP_SERVICES_IN_wan

Sla vervolgens het script op (CTRL-s en CTRL-x) en voer het firewallscript uit met het commando /usr/local/sbin/myfirewallpi.sh

 

Back-upconfiguratie

De configuratie wordt opgeslagen in het bestand /usr/local/etc/backup.conf : bewerk dit met uw favoriete editor (bijvoorbeeld nano /usr/local/etc/backup.conf ).

Hoe maak je periodiek een afbeelding aan?

Bewerk de variabele DISKS:
DISKS="mmcblk0p1 mmcblk0p2"
om een image te maken voor de opstart- en rootpartities.

Hoe exporteer ik een back-up naar een externe USB-harde schijf?

BACKUP_DIR_CONTROL="/mnt/usb"
BACKUP_PARTITION_CHECK="/mnt/usb"
BACKUP_DIR="${BACKUP_DIR_CONTROL}/backup_domoticz"
BACKUP_DIR_MOUNT="mount -o nodev,noexec,async /dev/sda1 ${BACKUP_DIR_CONTROL}" # Mount /dev/sda1
BACKUP_DIR_UMOUNT="umount ${BACKUP_DIR_CONTROL}" # Ontkoppel /dev/sda1
BACKUP_DIR_AFTER_UMOUNT="hdparm -S12 /dev/sda" # Externe harde schijf loskoppelen

Hoe exporteer ik een back-up van een NAS die via CIFS (Samba) is gemount?

BACKUP_DIR_CONTROL="/mnt/nas"
BACKUP_PARTITION_CHECK="/mnt/nas"
BACKUP_DIR="${BACKUP_DIR_CONTROL}/backup_domoticz"
BACKUP_DIR_MOUNT="mount -t cifs -o username=USER,password=PASSWORD, //NAS_IP_ADDRESS/SHARE ${BACKUP_DIR_CONTROL}" # Koppel de NAS-partitie
BACKUP_DIR_UMOUNT="umount ${BACKUP_DIR_CONTROL}" # Ontkoppel de NAS-partitie
BACKUP_DIR_AFTER_UMOUNT="" # opdracht verzonden na BACKUP_DIR_UMOUNT: doe niets

 

 

Photovoltaic and renewable energy

Domotics

In this page some information about photovoltaic systems and renewable energy

Something about solar photovoltaic systems

To charge the eVehicle, and most important to supply the heat pump in the winter, you should have solar photovoltaic system, but where? On the roof or on the garden? What inclination and orientation for the panels?

In the summer there are no problems at all... the day is long and we always have an over-production. But in the autumn and winter?

The following tables and graphs show a simulation of a 2.7kWp photovoltaic system in 5 configurations and 2 dates (Autumn and Winter), for the Northern Italy, using data from the very useful European website https://ec.europa.eu/jrc/en/pvgis

Simulation using data from 20 September 2016

The following table shows the simulation for the begin of Autumn:
The first column shows the time of the day (GMT+1, not DayLight Saving time!), then second column a simulation for the panels on the roof, oriented to EAST with inclination of only 15 degrees from the horizontal line - blue track.
The third column shows the simulation for panels oriented to south direction, 15 degrees inclination - red track.
The forth column shows the simulation for panels oriented to south direction, vertically (90 degrees) - yellow track.
The fifth column shows the simulation of panels in south direction and 70 degrees inclination - green track.
Finally, the sixth column show the performance of a simple solar tracker with vertical axis that can rotate from east toward south and  west, with panel inclination 70 degrees - orange track.

Solar Photovoltaic simulation for the autumn

 

 Graph of simulation for 5 different configuration of solar photovoltaic system

It's possible to see that best performances can be achived using a solar tracker... since from Sunrise, the tracking system lead to a very high power that permits to start heat pump without using power from the grid.

 

Simulation using data from 1 January 2016

 Simulation using data from 1 January 2016

Simulation using data from 1 January 2016

 In this case, the solar tracking system does not help to improve the power, because the Sun in the Winter rise from south-east and fall to south-west.

 

Fotovoltaico in Italia, Scambio Sul Posto, remunerazione

Lo Scambio Sul Posto (SSP) è un meccanismo attraverso cui il Gestore dei Sistemi Energetici (GSE) remunera l'energia esportata in rete dai cittadini dotati di impianto solare fotovoltaico.

Spesso si sente dire che "è meglio consumare tutta l'energia prodotta", oppure "accumularla in batterie, perché il GSE non paga nulla". Ma è davvero così?

Se un impianto è dimensionato bene, è maggiore l'energia autoconsumata dell'energia esportata: in tal caso l'energia esportata viene pagata dal GSE in questo modo:

  • suddivisione della produzione nelle fasce orarie F1, F2, F3
  • per ciascuna fascia, viene moltiplicata l'energia mensile esportata in tale fascia per il Prezzo Unico Nazionale (PUN) medio mensile relativo a tale fascia oraria moltiplicata aumentata del 5% circa

Quindi, il GSE rimborsa, con lo Scambio Sul Posto: ( Export_F1 * PUN_F1 * 1.05 ) + ( Export_F2 * PUN_F2 * 1.05 ) + ( Export_F3 * PUN_F3 * 1.05 ).

Nell'area cliente del portale GSE è possibile vedere i calcoli eseguiti dal GSE sull'energia esportata e autoconsumata. Ad esempio a dicembre 2021 il PUN_F1 era di 0.32€/kWh, probabilmente ben al di sopra del prezzo di acquisto dell'energia elettrica (0.16€/kWh incluse tasse e contributi vari).

Normalmente, chi ha un impianto fotovoltaico esporta di giorno (quando il PUN + alto) e consuma di notte (quando il PUN è inferiore): il risultato è che conviene esportare l'energia anziché accumularla!
Dal punto di vista della remunerazione non cambia molto, tuttavia è preferibile cercar di esportare energia nelle fasce orarie in cui c'e' maggior richiesta: per questo vale la pena consultare, periodicamente, il Gestore Mercati Elettrici https://www.mercatoelettrico.org/it/

Nell'immagine si vede l'andamento del PUN, ora per ora, per l'8 settembre 2022: il PUN medio giornaliero risulta di 0.50€/kWh (500€/MWh) con punta di 0.70€/kWh alle 9 e 0.55€/kWh alle 20.

Mercato elettrico il 9 settembre 2022

Il risultato che si evince è che l'accumulatore, per uso residenziale, ha senso SOLO per chi ha usufruito del Superbonus 110% (lo Stato ha finanziato tutto l'impianto, quindi non è giustamente prevista la remunerazione dell'energia esportata), a chi ha una potenza contrattuale troppo bassa per far funzionare gli elettrodomestici di casa (in tal caso l'accumulatore previene il distacco per superamento della potenza massima contrattuale) e a chi è disponibile a spendere per avere energia anche in caso di blackout. Negli altri casi è un costo che non sarà mai ripagato, tantopiù che il processo di ricarica della batteria e di conversione in alternata non hanno efficienza 100%, ma avviene sempre con perdita di energia.

Import / Export power and energy monitoring

Monitoring can be done by using the free and high-reliable home automation system controller Domoticz , one energy meter with pulsed output (like Eastron SDM-230) and a DomBus module (like DomBus12, DomBus23 or DomBusTH).

ToDo: schema

Domoticz collects data permitting to display charts comparing exported/imported energy month-by-month across several years.

The following chart shows the produced energy using a photovoltaic system, 7.2kWp on the roof, east and west orientation, in the last 3 years.

Energy produced by a PV system

The following charts show the imported energy:

Imported energy measured by DomBus12 + Domoticz + SDM230

imported energy

The following charts show the exported energy (energy sourced to the electric grid):

Export energy and power measured by Domoticz, DomBus module and Eastron SDM230 energy meter

Energy measured by my home automation system

 

Comparison of photoltaic system: panels oriented to East and West, and panels oriented to South

The following graphs refers two different solar systems, mounted on roof in the North of Italy:

1) 2.7kWp oriented to East + 4.5kWp oriented to West (totally 7.2kWp)

pv paolo

2) 6kWp oriented to South

pv roberto

From the graphs it's clear

  • in the Summer daily production is the same (44kWp for the first solution with 7.2kWp, 37kWp for the second with 6kWp)
  • in the Winter, daily production of the second solution (panels oriented to South) performs more than double of the first solution (panels oriented to East and West).

Electric vehicles

Interested on electric vehicles? We have a page about electric cars with several FAQ, in Italian language.

Want to charge the electric car using our domotic module? Check https://www.creasol.it/EVSE

Making a wallbox by yourself

 

Domoticz LUA script dat controleert of deuren/ramen open staan

Domotics

The following script check temperature for one or more zones, to find out if windows or doors are open: in that case send notification by Telegram

Useful to avoid energy consumption during winter or summer, when someone forget windows/doors open.

The up-to-date version of this file is avaible at http://docs.crasol.it/script_time_openwindows.lua

[code]-- Script that checks temperature and try to discover if doors/windows are open: in that case sends notification by Telegram.
-- Useful to limit energy consumption in winter and summer, if someone forgets windows or doors open.
--
-- This script should be named DOMOTICZ_HOME/scripts/lua/script_time_SCRIPTNAME.lua , e.g. /home/pi/domoticz/scripts/lua/script_time_openwindows.lua
-- It will be called every minute and will check and compare, for each zone (defined below), the current temperature with previous temperature.
--
-- The following user variables must be set:
-- telegramChatid : the Telegram chat ID where notifications should be sent : see https://www.domoticz.com/wiki/Telegram_Bot
-- telegramToken : the Telegram token : see https://www.domoticz.com/wiki/Telegram_Bot
-- HeatingOn: a variables that assumes the following values
--   0 => Heating/Cooling system is OFF
--   1 => Heating is ON
--   2 => Cooling is ON
--
-- Creasol - https://www.creasol.it/products

debug=1    -- if True, print debug information
domoticzUrl='http://192.168.3.230:8080'

-- zones: array that associate for each zone the name of the temperature device, and max difference for temperature
-- This script automatically create a variable zTemp_ZONENAME that contains the temperature measured before
zones={    --zonename  {tempsensor,difference}
    ['Cucina']={'Temp_Cucina',0.6},    
    ['Bagno']={'Temp_Bagno',0.6},
    ['Camera']={'Temp_Camera',0.6},
    ['Camera_Valentina']={'Temp_Camera_Valentina',0.6},
    ['Camera_Ospiti']={'Temp_Camera_Ospiti',0.6},
    ['Stireria']={'Temp_Camera',0.6}, --TODO: replace Temp_Camera with Temp_Stireria
}

commandArray={}    -- reset commandArray, an associative array that will contain the list of commands for Domoticz.

function telegramNotify(msg)
    os.execute('curl --data chat_id='..uservariables['telegramChatid']..' --data-urlencode "text='..msg..'"  "https://api.telegram.org/bot'..uservariables['telegramToken']..'/sendMessage" ')
end

function min2hours(mins)
    -- convert minutes in hh:mm format
    return string.format('%02d:%02d',mins/60,mins%60)
end

function timedifference (s)
    year = string.sub(s, 1, 4)
    month = string.sub(s, 6, 7)
    day = string.sub(s, 9, 10)
    hour = string.sub(s, 12, 13)
    minutes = string.sub(s, 15, 16)
    seconds = string.sub(s, 18, 19)
    t1 = os.time()
    t2 = os.time{year=year, month=month, day=day, hour=hour, min=minutes, sec=seconds}
    difference = os.difftime (t1, t2)
    return difference
end

function checkVar(varname,vartype,value)
    -- check if create, if not exist, a variable with defined type and value
    -- type=
    -- 0=Integer
    -- 1=Float
    -- 2=String
    -- 3=Date in format DD/MM/YYYY
    -- 4=Time in format HH:MM
    local url
    if (uservariables[varname] == nil) then
        telegramNotify('Created variable ' .. varname..' = ' .. value)
        url=domoticzUrl..'/json.htm?type=command&param=saveuservariable&vname=' .. varname .. '&vtype=' .. vartype .. '&vvalue=' .. value
        -- openurl works, but can open only 1 url per time. If I have 10 variables to initialize, it takes 10 minutes to do that!
        -- commandArray['OpenURL']=url
        os.execute('curl "'..url..'"')
        uservariables[varname] = value;        
    end
end

if (debug) then print('------------------------- openwindows --------------------------------') end

timenow = os.date("*t")
minutesnow = timenow.min + timenow.hour * 60

checkVar('HeatingOn',0,0)    -- 0=heating off, 1=heating on, 2=cooling on

for n,v in pairs(zones) do    -- check that temperature setpoint exist
    -- n=zone name, v=array with temperature sensor name and max acceptable temperature drop in degrees
    checkVar('zTemp_'..n,1,otherdevices[v[1]])    -- if zTemp_Cucina does not exist, create variable and store current temperature
    if (otherdevices[v[1]]==nil) then
        telegramNotify('Zone '..n..': temperature sensor '..v[1]..' does not exist')
    end
end

if (uservariables['HeatingOn']==1) then
    -- Heating enabled
    -- compare zTemp_ZONE (old temperature) with current temperature
    for n,v in pairs(zones) do
        -- n=zonename (HeatingSP_n = setpoint temperature)
        -- v[1]=tempsensor
        -- v[2]=max difference
        diffTemp=tonumber(otherdevices[v[1]])-uservariables['zTemp_'..n]
        if (diffTemp>=0) then
            -- current temperature > old temperature: update old temperature
            commandArray['Variable:zTemp_'..n]=otherdevices[v[1]]
        else
            -- current temperature < old temperature
            -- compute gradient (diffTemp/TIME)
            gradient=diffTemp*60/timedifference(uservariables_lastupdate['zTemp_'..n])    -- degrees/minute
            --if (diffTemp<=-0.2) then
                if (debug) then print('Zone='..n..' gradient='..string.format('%0.3f',gradient)..' Temp='..otherdevices[v[1]]..'C diffTemp='..diffTemp) end
                if (math.abs(gradient)<(0.2/30)) then -- temperature falls slowly, less than 0.2C on 30 minutes
                    -- |gradient|=v[2]) then
                        telegramNotify('Zone '..n..': window open!! Gradient='..string.format('%0.2f',gradient*60)..'K/hour');
                        commandArray['Variable:zTemp_'..n]=otherdevices[v[1]]    -- update zTemp_ZONE temperature
                    end
                end
            --end
        end
    end
elseif (uservariables['HeatingOn']==2) then    
    -- HeatingOn=2 => Cooling
    -- TODO
else
    -- HeatingOn=0 => Heating or Cooling = OFF => don't check windows
end

if (debug) then
    for i, v in pairs(commandArray) do
        print('### ++++++> Device Changes in commandArray: '..i..':'..v)
    end
end
::mainEnd::
return commandArray[/code]

 

Fire alarm detection with Domoticz home automation system

Domotics

A very cheap and useful fire alarm system is presented below. The idea is to use simple temperature sensors and get an alert on building internal sirens and Telegram when the temperature in a room increases quickly.

As temperature sensors are commonly used in any room for climatization, no extra sensors are needed.

Fire alarm requirements

  • Single board computer with low power consumption, like Rock PI S or Raspberry or Nuc.
  • A microSD for Rock PI S or Raspeberry with operating system and Domoticz free open-source software to manage all sensors and automations reliably.
  • script_time_fireAlarm.lua file (already installed in the Domoticz microSD shown at previous step)
  • temperature sensors

Temperature and humidity sensors for home automation systems

If you want to try our DomBusTH module, it integrates a temperature and relative humidity sensors, as like as RGW led, 4 I/Os, 2 outputs, in a small board that can be placed on a blank cover.

This is the perfect board to be placed in every room where temperature and humidity should be monitored for climate control. Through the 2 outputs it's possible to control 2 relays to open/close a shutter, for example. The 4 I/Os can be connected to alarm sensors (magnetic contact sensors applied to windows/doors, PIRs) or pushbuttons.
Also, using the script below it's possible to realize a fire alarm system that works also with this kind of temperature sensor.

The following video shows the DomBusTH module installed on a blank cover, measuring temperature and relative humidity, showing the current imported (red) or exported (green) power in kW, having a touch sensor used to select two different functions, and 6 I/Os (2 I/Os connected to a piezo buzzer).

Fire alarm script

On https://github.com/CreasolTech/domoticz_lua_scripts it's possible to find two scripts:

  • script_time_fireAlarm.lua , the script that check every minute the temperature on each room and verify that it does not increases to fast
  • config_fireAlarm.lua , the configuration file where it's possible to list all zones, defining the temperature device name and temperature increase rate.

Fire detection using Domoticz - Config file

When the temperature in a room increases, in 1 minute, more than the value specified for that room, a notification is sent to a Telegram group (or channel) and, optionally, one or more devices can be activated: for example it can activate the internal siren for few seconds, and the light in bedroom during the night.

Telegram notification for fire alarm detection system

 

 

ESPEasy-firmware installeren op het NodeMCU v3-bord en configureren voor gebruik met Domoticz

Domotics

Introduction

creDomESP1 all 600NodeMCU v3 is a very useful and powerful controller based on ESP8266 microcontroller with 2.4GHz WiFi, GPIO ports, analog input, I2C bus, UART and 1wire ports, equipped with a dual-in-line strip male connector.

It's a very cheap open-source platform, a bit expensive in terms of current consumption (normally 80mA @5V = 400mW), but very appreciated in home automations and Internet of Things.

Using the ESPEasy firmware, it's possible to combine this card with Domoticz/raspberry home automation controller.

Creasol has designed the DomESP1 board that permits to easily supply the NodeMCU board by a switching mode regulator, and connect inputs, outputs, I2C and 1wire sensors/devices (e.g. DS18B20 thermal and other humidity sensors) by terminal blocks. The board, as shown in the picture, has 4 relay outputs with 5A 250V switching capaibility, and all circuitry to manage I2C bus, 1wire bus, ....

A LED on every input and output permits to check the status of the board and found any problem on wire connections or firmware configuration: LEDs are enabled by pressing the button Test .

The LEDs enable feature and the switching mode power supply lead to a full control of inputs/outputs with an optimized power consumption.

It's possible to purchase:

  1. the plain DomESP1 board: the client should purchase and program by himself the ESP8266 module, 900 mil header pitch;
  2. the DomESP1 board, with the ESP8266 module already programmed with the latest ESPEasy firmware.

 

Installing firmware on NodeMCU board and first configuration

  1. On Linux, install esptool: for Debian/Ubuntu/similar, run the command
    apt update; apt install esptool
  2. Download ESPEasy version 2.0.0 from https://www.letscontrolit.com/wiki/index.php/ESPEasy#Loading_firmware or clicking on https://github.com/letscontrolit/ESPEasy/releases selecting the last version available, and uncompress the zip archive: inside the bin directory you can find several images, read the README.txt to find out which image is for you. For LoLin modules with 4M of ram, a good image is bin/ESP_Easy_mega-20190813_test_core_242_ESP8266_4M.bin
  3. Connect the NodeMCU board to the PC using a microUSB cable
  4. Run the command to load the firmware:
    on Linux you should install esptool and execute, from the shell,
    /usr/bin/esptool --baud 115200 --port /dev/ttyUSB0 write_flash 0 ESPEasy_R120_4096.bin
    on Windows or Mac, please read the instructions within the ESPEasy package
    You should see on the console the following result:

    esptool.py v2.5.0
    Serial port /dev/ttyUSB0
    Connecting....
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Features: WiFi
    MAC: b4:e6:2d:36:e7:d1
    Enabling default SPI flash mode...
    Configuring flash size...
    Auto-detected Flash size: 4MB
    Erasing flash...
    Took 1.30s to erase flash block
    Wrote 411648 bytes at 0x00000000 in 39.8 seconds (82.7 kbit/s)...

    Leaving...
    Hard resetting via RTS pin...

  5. Enable WiFi on a smartphone or PC, and connect to the SSID ESP_0 using the password configesp
  6. Set the SSID of the WiFi network where the device will be connected, and associated WiFi password, then click on Connect button.
  7. At this point, the device will be associated to the selected WiFi network with the given SSID an password.
  8. Scan the network to find the IP address of the device, and connect to it using a browser: http://DEVICE_IP_ADDRESS
  9. Configure the main parameters:
    creDomESP1 config1
  10. Set the GPIO default configuration:
    creDomESP1 config hardware
  11. Configure devices (e.g. temperature sensors):
    creDomESP1 config device
    creDomESP1 config devices
  12. If the two blue LEDs on the NodeMCU board are annoying you, you can remove them, of course: in this case you avoid extra power consumption for useless LEDs.

 

Domoticz LUA script that checks and manages power consumption

Domotics

Introduction

This LUA script can be used to add the following functions to Domoticz:

  1. power outage detect and emergency lights => turns on Leds (connected to devices supplied by 12V + backup battery) in case of blackout (power failure)
  2. shows import and export electricity power, through red/green leds on Creasol DomBusTH (this small module has the ability to show 1 or more flashes on the red and green LEDs available in the module itself); red LED flashes 1 time if import power <1kW, 2 times if <2kW, ... green led flashes 1 time if export power <1kW, 2 times if power < 2kW, 3 times if power <3kW, ....)
  3. in case of high power usage, the script sets heat pump to work at lower level to reduce power consumption, or disconnect loads to prevent power cut. In case there are not any load that can be automatically disconnected, send alert through leds/buzzer/siren, and send alert by Telegram
  4. automatically enable loads in case of extra power from renewable sources, to increase the own-consuming: for example activate an electric heater if temperature is below a TempSet and available power (from photovoltaic?) is greater than the heater power

Block diagram

Diagram representing the features added by the script_device_power.lua script

Although it seems a bit complicted, this diagram can be divided in the following parts:

  1. connection to the energy meter (with pulsed output, 1 pulse every Wh, 1000 pulses per kWh)
  2. power outage detection (in this schema, it's connected to the heat pump power line, because if the power to the heat pump is missing during the winter, it can be a real problem!)
  3. LEDs to be activated in case of power cut (emergency lights)
  4. red and green LEDs that show import or export power (1 flash=0-1kW, 2 flashes=1-2kW, 3 flashes=2-3kW, ...): this feature is available on Creasol DomBusTH module
  5. temperature and humdity monitoring
  6. relay outputs to activate electric appliances in case of extra-power production (from photovoltaic or other renewable energy source)
  7. heat pump controlling (to modulate its power consumption)
  8. buzzer in case that power usage is above certain thresholds, so the electricity meter can lead to a power disconnection

Connecting the energy meter

In the block diagram above the Eastron SDM230 power meter is used, but any power meter with pulse outputs for import/export energy can be used for this purpose.

SDM230 has 2 optoisolated pulse outputs, one that emits 1 pulse every 1Wh imported energy, and another one that emits 1 pulse every 1Wh exported energy.

The result that we want to achieve is to have two devices, in Domoticz, showing the imported and exported power.

Imported and exported energy
 

Using a DomBus module to interface pulse outputs energy meter

In case of using a DomBus RS485 module to interface the energy meter, this is following procedure to configure two DomBus input ports as counters:

  1. connect the pulse outputs to any available I/O, for example IO8 and IO9 for DomBus12, IO1 and IO2 for DomBusTH or DomBus23.  The SDM230 common terminal block should be connected to GND (0V).
  2. configure Pulse1 output, on SDM230, as EXP kWh (check the manual to know how to do that); Pulse2 is pre-configured as IMP kWh (measure the energy imported from grid)
  3. configure the Domoticz device connected to Pulse2: press Edit on that device, and replace in the Description field IN_DIGITAL or IN_TWINBUTTON (the default value) with IN_COUNTER,TYPENAME=kWh  and save. DomBus12Please note that kWh is CASE SENSITIVE! Now the device will be automatically moved to the Utility panel and configured as energy meter. Edit it again, write a name (for example PowerMeter_Import), and select Usage type.
  4. if produced energy sDomBus12hould be measured, configure the Domoticz device connected to Pulse1 as before: press Edit on that device, and replace in the Description field IN_DIGITAL or IN_TWINBUTTON with IN_COUNTER,TYPENAME=kWh and save. Now the device will be automatically moved to the Utility panel and configured as energy meter. Edit it again, write a name (for example PowerMeter_Export), and select Return type.
  5. In case of both import and export devices are created, it's needed to specify on Import device the Unit number of the Export device, and vice versa. So, select Setup -> Devices and write
    How to find out the idx of power meter devices
    How to find out the idx of power meter devices
    down the Unit number corresponding to Import (for example 98), and Export device (for example 99), then go to Utility panel, edit Import device and add to the description ,OPPOSITE=99 (Unit of the Export device) and save; edit Export device and add to the description ,OPPOSITE=98 (Unit of the Import device) and save. In this way, when a pulse is received on Import device, the power on Export device will be immediately set to 0, and vice versa, when a pulse is received on Export device, the power on Import device will be set to 0.

Domoticz needs up to 5 minutes before updating the energy counter correctly.

Power outage detection and emergency lights

Use any device you prefer to detect if electricity from grid is available or not. In the diagram above, the voltage from a circuit breaker (heat pump circuit breaker, in the example) is sensed by a optoisolated input.

If a wired-bus is used to connect domotic modules, and this is supplied by a backup-battery power supply (13.6V power supply + lead acid battery, or a UPS), it's possible to connect LEDs to the domotic modules and turn on LEDs in case of power outage (as emergency lights). The same can be done on battery-powered devices that have enough energy capacity.

Show current imported / exported power on red / green leds

DomBusTH module

Maybe the following function is available only on DomBusTH module, that has a special feature so LEDs can be configured in Domoticz as Selector Switch where 0 means OFF, 10=1 pulse, 20=2 pulses, 30=3 pulses, 40=4 pulses, and so on. Check the youtube small video that shows DomBusTH module programmed to show the ventilation status on white led and current exported power on green led (and imported power on red led, of course)!

In this case it's possible to get red LED flashes a number of times corresponding to the current imported power, and similarly green LED flashing a number of times corresponding to the exported power. This can be useful in the kitchen to check the available power from renewable sources, or verify that we're not consuming more power than what is permitted by the electricity meter, without the need to mount large display or tablet to show the current power.

DomBusTH also integrates a white light (usable as emergency light), temperature and relative humidity sensors, 4 I/O (that can be connected to pushbutton switches, buzzer, ...) and 2 open-drain outputs (that can be connected to external relays).

Activating loads and appliances automatically

Using any relay module it's possible to activate some appliances when there is excess energy from renewable sources: in this case it's possible to improve the own-consumption and reduce the needed of energy from the grid.

The script is able automatically enable and disable heaters, heated towel rails, dehumidifiers, ....

Limiting electricity power from grid to avoid power cut

The script has 2 thresholds above which the electric power must be reduced within a certain time. In Italy, the electricity grid permits to get

  • nominal power + 10% forever
  • nominal power + 27% for max 90 minutes
  • more than nominal power till 14 kW for max 2 minutes

Power thresholds and max durations can be defined in the configuration file for the script, so when the imported power is above those thresholds the script try to limit the imported power by regulating, for example, the heat pump and/or swithing off some loads.

If there is nothing else to switch off and imported power level is above one of these thresholds, script is able to activate buzzers, leds, sirens or other systems to notify the building people that they have to reduce power consumption. Also, it can send a notification by Telegram.

Installation

The following list of commands can be just copied and pasted in linux shell to download and install the scripts. For those who use Windows operating system, installation is quite simple: just download and copy 4 files in the domoticz/scripts/lua directory, and edit those files to match the own configuration. Files are available in https://github.com/CreasolTech/domoticz_lua_scripts

#from linux shell, type the following commands (copy and paste): lines starting with # are comments, and can be ignored
#become root
sudo su -
#enter domoticz directory /scripts/lua
cd ~pi/Domoticz/scripts/lua
if [ -d domoticz_lua_scripts ]; then
cd domoticz_lua_scripts
#update domoticz_lua_script local repository
git pull
cd ..
else
which git
if [ $? -ne 0 ]; then
#install git
apt install git
fi
#download domoticz_lua_scripts repository with all scripts
git clone https://github.com/CreasolTech/domoticz_lua_scripts.git
fi
cp -i domoticz_lua_scripts/script_device_power.lua domoticz_lua_scripts/config_power.lua .
if [ ! -r globalvariables.lua ]; then cp domoticz_lua_scripts/globalvariables.lua . ; fi
if [ ! -r globalfunctions.lua ]; then cp domoticz_lua_scripts/globalfunctions.lua . ; fi
#now edit config file
nano config_power.lua

Measuring instant power with Eastron SDM230 connected by ModBus

Used to check power from energy meter (SDM120, SDM230, ...) and performs the following actions

1. Send notification when consumed power is above a threshold (to avoid power outage)

2. Enabe/Disable electric heaters or other appliances, to reduced power consumption from the electric grid

3. Emergency lights: turn ON some LED devices in case of power outage, and turn off when power is restored

4. Show on DomBusTH LEDs red and green the produced/consumed power: red LED flashes 1..N times if power consumption is greater than 1..N kW;
green LED flashes 1..M times if photovoltaic produces up to 1..M kW

AN energy meter domESP1

Installation

The script is available on github, click here to see the project on GitHub, or  click here to get the script

File: scripts/lua/script_device_power.lua

Destination directory: DOMOTICZ_DIR/scripts/lua

To install the script, type the following commands from the Linux shell, ignoring the comments (starting with #). If you don't know how to do, search the web how to connect to your Linux device using putty or another ssh client.

#become root
sudo su -
#install/upgrade curl, a command to fetch files from the web
apt install curl
# go to domoticz directory
cd /home/pi/domoticz
# fetch the script
curl -o scripts/lua/script_device_power.lua https://raw.githubusercontent.com/CreasolTech/domoticz_lua_scripts/master/script_device_power.lua
# now, edit the script modifying the first part with your configuration
nano scripts/lua/script_device_power.lua

 

Gratis domoticasysteem dat de warmtepomp regelt om het stroomverbruik van fotovoltaïsche energie te optimaliseren

Domotics

Selecteer de Engelse taal om de meest recente versie van dit artikel te lezen!

Invoering

een creDomBus31 pdc vmc

In dit artikel leest u hoe u de warmtepomp en het ventilatiesysteem (HVAC) kunt beheren met de opensourcesoftware van Domoticz die is geïnstalleerd op een Rock PI S of Raspberry PI (maar andere hardware is ook prima). Zo kunt u optimaal gebruikmaken van energie uit hernieuwbare bronnen (in dit geval een fotovoltaïsch systeem) en zo de elektriciteitsrekening verlagen .

Ten eerste zou een slim gebouw geen thermostaten moeten hebben om de kamertemperatuur te regelen , omdat ze meestal niet zo slim zijn als een domotica-controller. Het is beter om in sommige kamers een temperatuur- (en vochtigheids-)sensor te hebben en de uitlaatwatertemperatuur aan te passen om het beste comfort en benodigde stroomverbruik te krijgen .

Het regelen van een gebouw met een stralingssysteem met warmtepomp en zonnepanelen op het dak is een beetje complex, omdat er rekening moet worden gehouden met verschillende zaken:

  • buiten minimum en maximum temperatuur

  • kamertemperaturen (en diff = verschil met de instelwaarde)

  • variatie van diff met de tijd (afgeleide van diff op tijd)

  • huidige stroom van het net (als deze negatief is, is er wat extra stroom beschikbaar van zonne-energie, en is het beter om dit te gebruiken om het vermogen van de warmtepomp te verhogen)

  • elektriciteitskosten, om het verbruik te verhogen wanneer elektriciteit goedkoper is en om het vermogen te verlagen tijdens de piekuren (meestal van 7.00 tot 9.00 uur 's ochtends en van 18.00 tot 21.00 uur 's avonds) om bij te dragen aan de stabiliteit van het elektriciteitsnet!

  • zonne-energievoorspelling, dus het is mogelijk om het vermogen van de warmtepomp in de ochtend of avond te verlagen als er nog voldoende energie van de zonnepanelen beschikbaar is om de UIT-tijd van de warmtepomp te compenseren.

Het doel is om in alle kamers een comfortabele temperatuur te creëren. Misschien kan de temperatuur worden verlaagd als kamers niet worden gebruikt, en kan het gebouw oververhit raken in de winter, wanneer er extra vermogen van zonnepanelen beschikbaar is. Als de instelwaarde 21°C is, maar er extra vermogen van zonnepanelen beschikbaar is, kan de instelwaarde dynamisch worden verhoogd naar bijvoorbeeld 21,5 of 22°C.
Om deze reden worden temperatuur-/vochtigheidssensoren in sommige kamers verkozen boven handmatige thermostaten!

Dit is een zeer compact bord, DomBusTH , dat gebruikt kan worden met Domoticz, Home Assistant, ..., met een temperatuur- en vochtigheidssensor , een aanraaksensor (die fungeert als een multifunctionele drukknop), rode + groene + witte leds (voor meldingen), 4 ingangen (alarmsensoren, drukknoppen, ...) en 2 uitgangen (die kunnen worden aangesloten op een extern relais, bijvoorbeeld om een rolluik OMHOOG/OMLAAG te sturen). Dit is slechts een advies voor ons product, maar het is natuurlijk mogelijk om hiervoor elke temperatuursensor te gebruiken!

Domoticz ondersteunt meerdere scripttalen. In dit geval is gekozen voor LUA-script omdat het zo duidelijk is dat het eenvoudig te leren, gebruiken en aan te passen is.

In GitHub https://github.com/CreasolTech/domoticz_lua_scripts is het mogelijk om het script_time_heatpump_emmeti.lua voorbeeld te vinden om EMMETI Mirai SMI EH1018DC te besturen via Modbus, waarbij de uitlaatwatertemperatuur en compressorvermogen worden ingesteld. Het script is erg ingewikkeld omdat het is aangepast aan de behoeften van een specifiek gebouw, dus het is aan te raden om te beginnen met een aantal eenvoudige regels om een automatisering te maken, en vervolgens de regels aan te passen en te verbeteren om het gewenste gedrag te krijgen.

Wat heb je nodig?

  • een single board computer (zoals Raspberry PI, Rock PI) of NUC of andere mini-PC , met minstens 1 USB-poort (die indien nodig kan worden uitgebreid met een USB-hub)
  • Linux besturingssysteem + Domoticz software. U kunt ook een SD-bord vinden met besturingssysteem + software al geïnstalleerd en klaar voor gebruik: kijk op https://store.creasol.it/19-kit voor enkele kits .
  • Goedkope USB/RS485 adapter om de warmtepomp via RS485 aan te sluiten. Als alternatief is het mogelijk om een WiFi-RJ45/RS485 module te gebruiken.
  • Goedkope USB/RS485-adapter of WiFi-RJ45/RS485-module om alle DomBus-modules via de RS485-bus te verbinden, indien nodig.
  • temperatuursensoren
  • specificaties voor uw warmtepomp Modbus-registers, wat geduld en wat vaardigheden om een automatisering te maken om de warmtepomp te regelen .

Waarom Domoticz?

U kunt andere systemen gebruiken, zoals Home Assistant, Node-RED, OpenHAB, ... De keuze voor Domoticz is goed omdat het eenvoudig, stabiel is en het mogelijk maakt om complexe automatiseringen eenvoudig te maken door te programmeren in LUA. Andere domoticasystemen zijn niet zo veelzijdig, maar ze kunnen ook worden gebruikt met enkele beperkingen.

Besturing van de warmtepomp via ModBus

De warmtepomp heeft één ingang waarmee u kunt kiezen tussen half of vol vermogen . Deze wordt vooral 's nachts gebruikt om het geluid te verminderen en de frequentie van de compressor en de ventilator te beperken tot ongeveer 50% (de frequentie/het vermogen van de compressor kan worden ingesteld op 0 tot 100%).

Omdat de compressorfrequentie verlaagd kan worden, is het mogelijk om deze functie te gebruiken om het vermogen van de warmtepomp te verminderen.

Heat pump managed by a LUA script to overheat in case of extra power from photovoltaic

De watertemperatuur is een goede oplossing om het comfort in huis te maximaliseren, terwijl de compressorfrequentie perfect is om het stroomverbruik te regelen.

Standaard beschikt de warmtepomp over een algoritme om de uitlaatwatertemperatuur te berekenen op basis van de huidige buitentemperatuur en de compressorfrequentie (het vermogen) proportioneel te regelen op basis van het verschil tussen de berekende temperatuur en de huidige watertemperatuur.

Het idee is om een betere controle van de uitlaatwatertemperatuur te implementeren op basis van :

  1. verschil tussen kamerinstelling en huidige temperatuur diffTemp
  2. afgeleide van diffTemp (het is belangrijk om te weten of het verschil tussen setpoint en temperatuur afneemt of toeneemt!)
  3. minimum (maximum in de zomer) buitentemperatuur
  4. huidige stroom van het fotovoltaïsche systeem (om het eigen verbruik te verbeteren)
  5. piekvermogen van het elektriciteitsnet , om het stroomverbruik in de piekuren (vroeg in de ochtend en laat in de middag) te verminderen: dit wordt alleen gebruikt om het elektriciteitsnet te helpen piekvermogen en hoge energieprijzen te vermijden
  6. fotovoltaïsche energieprognose : als het hoog genoeg is, is het mogelijk om het vermogen 's nachts en tijdens piekuren te beperken en het vermogen overdag te verhogen. Als de energie van fotovoltaïsche energie onvoldoende is, is het beter om de warmtepomp tijdens piekuren op een laag vermogen te houden, maar deze wel AAN te houden.

Het regelalgoritme is geïmplementeerd in een LUA-script dat de juiste waarde van de uitlaatwatertemperatuur en de compressorfrequentie (vermogen) berekent en deze parameters via Modbus (RS485) naar de warmtepomp stuurt met behulp van de opdracht mbpoll of via een plug-in om de warmtepomp te regelen, indien aanwezig.

De RS485-warmtepomp wordt via een RS485/USB-adapter aangesloten op de domoticacontroller (in dit geval RaspberryPI). De DomBus31-module wordt ook gebruikt om de ingangen van de warmtepomp te regelen (thermostaat aan/uit, spoel-/stralingstemperatuur, verwarmen/koelen en vol vermogen/half vermogen).

Eigenlijk is de warmtepomp altijd geconfigureerd in de "nachtmodus" en regelt het lua-script beide

  1. de temperatuur van de uitlaatvloeistof is nodig om het juiste comfort in huis te hebben
  2. compressorvermogenpercentage , om het vermogen te regelen

's Nachts worden zowel de vloeistoftemperatuur als het vermogen verlaagd om het energieverbruik en het geluid van de ventilator/compressor te beperken.

Overdag nemen zowel de temperatuur van de vloeistof als het vermogen toe (hogere temperatuur => hoger rendement), met uitzondering van de piekuren in de ochtend en avond. In die periode is het verstandig om het verbruik te verminderen om de stabiliteit van het elektriciteitsnet te verbeteren en zelfs om geld te besparen.

Als er een extra productie is van fotovoltaïsch (energie die naar het net wordt geëxporteerd), worden de vloeistoftemperatuur en het vermogen verhoogd om alle beschikbare energie van fotovoltaïsch te verbruiken. Ook worden kamerinstellingen automatisch verhoogd in geval van extra vermogen van fotovoltaïsch, om het vermogen dat 's avonds of 's nachts wordt verbruikt, te verminderen.

De bestanden script_time_heatpump_emmeti.lua en config_heatpump_emmeti.lua zijn beschikbaar op Github https://github.com/CreasolTech/domoticz_lua_scripts

Elektriciteitsenergiekosten en prognose voor fotovoltaïsche energie

Op dezelfde GitHub-pagina is script_time_entsoe.lua te vinden. Hiermee worden de elektriciteitsprijs en -kosten per uur , de gemiddelde elektriciteitsprijs , de zonne-energieprognose per uur en de totale dagelijkse energieprognose berekend.
De elektriciteitsprijs wordt berekend voor de geselecteerde zone (bijv. Noord-Italië of Denemarken2, ...) en de energiekosten per uur worden berekend door 3 extra parameters op te geven, afhankelijk van uw leverancier.
Voor de voorspelling van zonne-energie is het mogelijk om de oriëntatie/declinatie/kWp voor een of meer systemen te specificeren, zodat het mogelijk is om de energie per uur voor alle strings te berekenen als zonnepanelen met verschillende oriëntaties worden geplaatst. Helaas worden zonnevolgers niet beheerd door deze voorspellings-API.

Het script_time_entsoe.lua produceert 4 variabelen die uurwaarden bevatten, gescheiden door puntkomma's:

  • uurtarief + gemiddelde elektriciteitsprijs vandaag
  • uurlijks + gemiddelde elektriciteitsprijs morgen
  • uurlijks + totale fotovoltaïsche energie vandaag
  • uurlijks + totale fotovoltaïsche energie morgen

Door de scripts globalvariables.lua en globalfunctions.lua op te nemen is het mogelijk om de volgende functies te gebruiken:

  • tonumber( getItemFromCSV(uservariables['entsoe_today'], ';', timeNow.hour) ) om de huidige gemiddelde elektriciteitsprijs te krijgen
  • tonumber( getItemFromCSV(uservariables['entsoe_today'], ';', 24) ) om de huidige gemiddelde elektriciteitsprijs te krijgen
  • tonumber( getItemFromCSV(uservariables['pv_today'], ';', 24) ) om de totale voorspelde energie van fotovoltaïsche energie, vandaag, te verkrijgen
  • tonumber( getItemFromCSV(uservariables['pv_tomorrow'], ';', 24) ) om de totale voorspelde energie van fotovoltaïsche energie voor morgen te verkrijgen

Met Domoticz is het mogelijk om complexe automatiseringen te schrijven die rekening houden met alle parameters, waardoor u geld kunt besparen door het eigen verbruik te verhogen en het energieverbruik te verminderen in de piekuren waar de elektriciteitskosten hoger zijn. Ook is het op deze manier mogelijk om de energieflexibiliteit te verbeteren , door het elektriciteitsnet te helpen door het verbruik (of de export van energie) te verminderen wanneer de beschikbaarheid laag is (tijdens piekuren).

Import energy in a house with optimized heat pump management

 

Smart heat pump control by Domoticz to minimize power consumption

Domoticz-plug-in voor het beheer van de Emmeti Mirai SMI-warmtepomp

Een plugin voor Domoticz die warmtepompen van Emmeti beheert, is beschikbaar op https://github.com/CreasolTech/domoticz-emmeti-mirai

Schermafbeelding van de belangrijkste parameters van de Emmeti Mirai SMI warmtepomp beheerd door Domoticz

Schermafbeelding van de belangrijkste parameters van de Emmeti Mirai SMI warmtepomp beheerd door Domoticz

 

Het integreren van een verlichtingssysteem met stapsgewijze relais in Home Assistant, Domoticz, ...

Domotics
 

The following solution is meant for those who live in a house with a “classic” electrical system based on stepper relays (step-by-step) and want to make it smart without gutting the electrical cabinet or losing the reliability of physical buttons.

Many people suggest replacing old relays with Wi-Fi modules (like Shelly or Sonoff), but I prefer a wired approach (RS485) that is much more reliable and consumes a very low power, much less than WiFi devices. Indeed, I want the system to keep working even if the domotic controller is down.

I’m using the Creasol DomBus33 , a DIN-rail module designed specifically for this “hybrid” integration.

How it works:

  • 3 Relay Outputs: They connect in parallel to your existing 230V relay coils. They just send a short pulse to toggle the light on/off, exactly like your wall buttons do.

  • 3 AC Inputs: These are connected to the stepper relay outputs (load side) to tell the domotic controller if the light is actually ON or OFF. No more guessing the state!

  • 5 low voltage inputs: module has 5 inputs that can be connected to other pushbuttons switches (for example, you can program a button to turn off all lights), meters with pulse output (to measure energy, gas, water), alarm sensors (magnetic contacts, PIRs: even triple-biased sensors are supported), …

  • Low Power & Reliability: It works via RS485 bus (shielded cable), consuming only ~10mW. No Wi-Fi congestion or battery changes.

The best part? If domotic controller or the bus fails, your wall buttons continue to work perfectly because the original stepper relays are still there. It’s the ultimate “Wife Acceptance Factor” setup.
Also, DomBus modules support the “DCMD” commands: it’s possible to setup commands that works inside or between DomBus modules (similarly to KNX®) even if the domotic controller is down

Integration with Home Assistant: It integrates easily via MQTT using the DomBusGateway add-on (AutoDiscovery supported) or via Modbus (not recommended for Domoticz, Home Assistant and other system working with MQTT). All entities appear automatically when you connect the module to the bus.
Of course you can connect many DomBus modules to the same bus!

You can find the full specs, wiring diagrams and video here: Creasol DomBus33 - Smart light controller, with 3 relay outputs, 3 AC inputs, 5 I/Os

Running electrical cables in a house may seem old-fashioned when wireless solutions are available, yet it has undeniable advantages in terms of reliability and power consumption: more than 500mW for WiFi, 10mW for DomBus: what happen when you have dozens of modules installed in your house?.
Moreover, RS485 cable (standard alarm cable, 4x0.22mm², can be used) is thin and easy to connect using any bus topology (linear, star, mixed), unlike LAN cable (which can only be connected in a star topology).

Has anyone else moved to a wired RS485 bus for their lights? We’d love to hear your thoughts on “Hybrid” vs “Full-Smart” replacements! Let us know by email, Telegram or Whatsapp!

slide_small

screenshot_ha

 

Paolo - Italy

Pagina 1 van 2

  • 1
  • 2
As products are designed by us, we can offer full support! Contact us by Telegram or Whatsapp to ask for information, make suggestions, request a customization or a new product. Any feedback is welcome!!
© 2026 Creasol - Via Santa Croce 15, 31053 Pieve di Soligo, Italy - VAT ID: IT03664770264 - WEEE: IT16060000009386 - Privacy policy - Terms - Environment
Creasol, italian electronic design company since 2001 Creasol, italian electronic design company since 2001
  • Home
  • Domotica
  • Universele ontvangers
  • Afstandsbedieningen
  • PDF-catalogusPDF-catalogus
  • Koop online
  • Steun
    • Domotica, Smart Home, IoT
    • Radiografische afstandsbedieningen en zenders
    • Universele ontvangers
    • Linux
  • Info
    • About us
    • Ecologische voetafdruk
    • Terms of Service
    • Privacy- en Cookiebeleid
    • Elektronisch advies
      • Multimedia
      • RF and microwave
      • Medical
      • Industrial
      • Automotive
      • Security
      • Outdoor
      • Equipment
      • Monitoring
      • Indoor
    • Sitemap
    • Search
  • Contacten
We use cookies to ensure that we give you the best experience on our website.
I accept