dzVents 2.1.0 released in beta v3.8088 (and onwards)

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by dannybloe »

Hi folks,

Today Gizmocus merged an important pull request into Domoticz that should fix the high cpu load when dzVents is enabled on some (mostly slower) systems. Thanks to the hard and clever work of jvandenbroek and scottdj2! You guys are awesome and so helpful!! Thanks to them dzVents is now blazing fast and peeps who don't use it should not notice any speed differences even when it is enabled (not by default anymore!, don't forget to enable it in the settings!!).

On top of that I merged a couple of fixes and additions to the dzVents parts, enough to bump it to version 2.1.0 (using semver versioning). Even though dzVents is now an integral part of Domoticz I still like to give dzVents its own version numbering as I think this makes it easier to talk about it.

I also would like to thank people for all the positive feedback they gave me. All that makes it fun for me to work on it and keep working on it. I really hope that people enjoy writing scripts using dzVents and that even (at least some) Blockly users dare to cross the bridge to real coding (coz I truly believe that writing code is a lot easier than pushing along pieces of a hardly-readable puzzle.. but who am I? ;) ).

So, please keep posting feedback, questions, suggestions and even fixes and enhancements (coz it ain't ready yet and I'm sure there are plenty of hidden features (eh... bugs) in there). Also, dzVents relies heavily on device adapters that makes sure that interacting with your devices is indeed easy. However, as I don't have all the hardware myself, we rely on all of you with specific hardware to make sure all the necessary adapters are created. So, if you have a device and you don't see your specific attributes and methods in the docs, please let me know or write an adapter yourself (see the wiki on how to do that).

So, without further ado, here is the list of 2.1.0 changes:
  • dzVents is no longer enabled by default. So enable it in "settings > other" to use it.
  • Added support for switching RGB(W) devices (including Philips/Hue) to have toggleSwitch(), switchOn() and switchOff() and a proper level attribute.
  • Added support for Ampère 1 and 3-phase devices
  • Added support for leaf wetness devices
  • Added support for scale weight devices
  • Added support for soil moisture devices
  • Added support for sound level devices
  • Added support for visibility devices
  • Added support for waterflow devices
  • Added missing color attribute to alert sensor devices
  • Added updateEnergy() to electric usage devices
  • Fixed casing for WhTotal, WhActual methods on kWh devices (Watt's in a name?)
  • Added toCelsius() helper method to domoticz object as the various update temperature methods all need celsius.
  • Added lastLevel for dimmers so you can see the level of the dimmer just before it was switched off (and while is it still on).
  • Added integration tests for full round-trip Domoticz => dzVents => Domoticz => dzVents tests (100 tests). Total tests (unit+integration) now counts 395!
  • Fixed a bug setting 'uservariables'. Under the hood it still uses json api calls to update the uservariable in Domoticz otherwise you won't get uservariable event scripts triggered in dzVents.
  • Added dzVents version information in the Domoticz settings page for easy checking what dzVents version is being used in your Domoticz build. Even though it is integrated with Domoticz, it is handy for dzVents to have it's own heartbeat.
  • avg(), avgSince(), sum() and sumSince() now return 0 instead of nil for empty history sets. Makes more sense.
  • Fixed boiler example to fallback to the current temperature when there is no history data yet when it calculates the average temperature.
  • Use different api command for setting setPoints in the Thermostat setpoint device adapter.
Enjoy!
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by heggink »

Open source at its best. I'll give it a go shortly! Thx guys!
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
Phantom
Posts: 87
Joined: Saturday 31 December 2016 14:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11652
Location: The Netherlands
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by Phantom »

Thanks, great work :)
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by heggink »

Muuuch better performance! Still a little jumpy here and there but expected and very workable. Now gradually replace my motherofallluascripts with individual scripts again. Yay!
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by EddyG »

Thanks, excellent work. :D
I hope its gets integrated in production version of Domoticz soon. 8-)
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by dannybloe »

EddyG wrote:Thanks, excellent work. :D
I hope its gets integrated in production version of Domoticz soon. 8-)
First we have to be sure this is stable enough.
And remember to always have backups enabled when you are using these beta builds ;)
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
randytsuch
Posts: 90
Joined: Sunday 20 March 2016 18:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: LA, Ca USA
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by randytsuch »

Thanks for all the work Danny.
I was away last week, but am back now (vacation over :( ), so will update and try soon.

Randy
dlefol
Posts: 35
Joined: Monday 21 December 2015 16:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by dlefol »

Hello,

Thanks for this new version. It seems to work fine here so far.
The only small problems I've notices so far is a device type which does not seem to be handled:
dzVents: Error: Method switchOn is not available for device "Light_A" (deviceType=Lighting 1, deviceSubType=ARC). If you believe this is not correct, please report.
The same device was working fine with dzVent V1.0 so I guess it got lost in the migration (or I did a mistake when migrating my scripts but it seems fine except for that error log).
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by dannybloe »

Could be yeah. There is now a more modular mechanism of dealing with different device types. Could you switch on debug mode logging for a little and post the piece in the file /path/to/domoticz/scripts/dzVents/domoticzData.lua that deals with this device?
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
dlefol
Posts: 35
Joined: Monday 21 December 2015 16:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by dlefol »

Hello,

Not sure I understoog properly what you wanted, but here is what I have in the domoticzDala.lua file concerning this device:

Code: Select all

   [87] = {
                ["timedOut"] = false;
                ["baseType"] = "device";
                ["deviceType"] = "Lighting 1";
                ["batteryLevel"] = 255;
                ["rawData"] = {
                };
                ["lastLevel"] = 0;
                ["name"] = "Light_A";
                ["data"] = {
                        ["maxDimLevel"] = 0;
                        ["_state"] = "Off";
                        ["_nValue"] = 0;
                        ["icon"] = "lightbulb";
                        ["hardwareID"] = 2;
                        ["hardwareType"] = "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver";
                        ["hardwareName"] = "RFXCOM";
                        ["hardwareTypeValue"] = 1;
                };
                ["switchType"] = "On/Off";
                ["subType"] = "ARC";
                ["description"] = "";
                ["deviceID"] = "70";
                ["id"] = 360;
                ["lastUpdate"] = "2017-07-18 09:39:50";
                ["changed"] = false;
                ["switchTypeValue"] = 0;
                ["signalLevel"] = 12;
        };
Let me know if you need anything else :)
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by dannybloe »

Ah, yeah, that was what I meant.
I have been digging a bit in the Domoticz code and I have now a better idea on how I can enhance the device adapters for dzVents to make it support more hardware.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
User avatar
DewGew
Posts: 579
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10618
Location: Sweden
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by DewGew »

I got this when I try to change my dummy switch "Hemma":
2017-07-24 11:42:20.345 Error: dzVents: Error: Method switchOn is not available for device "Hemma" (deviceType=Lighting 1, deviceSubType=X10). If you believe this is not correct, please report.
Is it a bug or do I need to change anything?
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by dannybloe »

In the upcoming update this will be fixed. In the mean time you could re-create your switch using dummy hardware. Then it will be recognized as a switch.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
DarkAllMan
Posts: 52
Joined: Friday 23 December 2016 9:41
Target OS: Linux
Domoticz version:
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by DarkAllMan »

Sorry, wrong forum!
Last edited by DarkAllMan on Tuesday 25 July 2017 11:29, edited 1 time in total.
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by dannybloe »

DarkAllMan wrote:I have a problem that

Code: Select all

ping_success=os.execute('ping -c1 -w1 ' .. ip)
is no longer working when I run Domoticz as a service.
Running manually (./domoticz) it does execute the ping.
The service is configured like this:

Code: Select all

[Unit]
       Description=domoticz_service
       After=network.target
[Service]
       User=username
       Group=username
       ExecStart=/home/username/domoticz/domoticz -www 8080
       WorkingDirectory=/home/username/domoticz
       CapabilityBoundingSet=CAP_NET_BIND_SERVICE
       Restart=on-failure
       RestartSec=1m
       KillMode=process
       #StandardOutput=null
[Install]
       WantedBy=multi-user.target
Is that in any way related to dzVents? If not then please start another thread (perhaps in Bugs). Otherwise please explain what the relation is.

Cheers,
Danny.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
marton
Posts: 10
Joined: Sunday 17 April 2016 10:04
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8235
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by marton »

Hi,

Thanks for the new version and the integration. It's been great and already started to migrate all my other lua scripts to dzVents as well.
However I noticed when I update a variable, domoticz.variables('Test').set('1') it doesn't keep the type of the variable, but rather changes it to integer. If I set up a variable as string with the content '0' and then update it with dzVents it changes it to integer and updates the value. Am I doing something wrong?
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by dannybloe »

No I don't think so. This should have been fixed in 2.1.0. Can you see what version of dzVents is active in your domoticz build? (settings > other > dzVents, should show 2.1.0).
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
marton
Posts: 10
Joined: Sunday 17 April 2016 10:04
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8235
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by marton »

dannybloe wrote:No I don't think so. This should have been fixed in 2.1.0. Can you see what version of dzVents is active in your domoticz build? (settings > other > dzVents, should show 2.1.0).
My bad, I was running v3.8087m which didn't have 2.1.0 dzVents. Just updated to the latest beta and now everything works! Thanks again for dzVents, it is amazing!
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by dannybloe »

Thanks :)
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
ednl
Posts: 15
Joined: Thursday 25 May 2017 13:29
Target OS: NAS (Synology & others)
Domoticz version: 3.8875
Contact:

Re: dzVents 2.1.0 released in beta v3.8088 (and onwards)

Post by ednl »

I'm trying to switchOn a Hue-group with dzVents 2.1.0.. :

2017-07-25 18:21:00.455 Error: dzVents: Error: Method switchOn is not available for device "Group Eetkamer" (deviceType=Lighting Limitless/Applamp, deviceSubType=RGBW). If you believe this is not correct, please report.
I'm on Domoticz Version: 3.8134

Thanks..
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests