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

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

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

Postby dannybloe » Sunday 16 July 2017 20:12

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: 241
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi
Domoticz version: V3.7067
Location: NL
Contact:

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

Postby heggink » Sunday 16 July 2017 20:25

Open source at its best. I'll give it a go shortly! Thx guys!
Pi3, latest beta
RFXCOM, z-wave (AEOTEC, switches, temhum, pir, contacts),
Plugwise2py, P1 'smart'meter & solar panel
Alexa, Wifi Cams motion detection
ESP: relays, PIR & Temp/TempHum
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest

User avatar
Phantom
Posts: 42
Joined: Saturday 31 December 2016 15:47
Target OS: Raspberry Pi
Domoticz version: 3.8034
Location: The Netherlands
Contact:

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

Postby Phantom » Sunday 16 July 2017 21:46

Thanks, great work :)

User avatar
heggink
Posts: 241
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi
Domoticz version: V3.7067
Location: NL
Contact:

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

Postby heggink » Sunday 16 July 2017 22:09

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!
Pi3, latest beta
RFXCOM, z-wave (AEOTEC, switches, temhum, pir, contacts),
Plugwise2py, P1 'smart'meter & solar panel
Alexa, Wifi Cams motion detection
ESP: relays, PIR & Temp/TempHum
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest

User avatar
EddyG
Posts: 66
Joined: Monday 02 November 2015 6:54
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Netherlands
Contact:

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

Postby EddyG » Monday 17 July 2017 6:45

Thanks, excellent work. :D
I hope its gets integrated in production version of Domoticz soon. 8-)
Regards,
Eddy

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

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

Postby dannybloe » Monday 17 July 2017 7:48

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: 64
Joined: Sunday 20 March 2016 19:56
Target OS: Raspberry Pi
Domoticz version: Beta
Location: LA, Ca USA
Contact:

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

Postby randytsuch » Monday 17 July 2017 16:53

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: 22
Joined: Monday 21 December 2015 17:35
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby dlefol » Monday 17 July 2017 22:15

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: 722
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi
Domoticz version:
Location: Ermelo
Contact:

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

Postby dannybloe » Monday 17 July 2017 22:37

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: 22
Joined: Monday 21 December 2015 17:35
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby dlefol » Tuesday 18 July 2017 9:56

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: 722
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi
Domoticz version:
Location: Ermelo
Contact:

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

Postby dannybloe » Tuesday 18 July 2017 10:38

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.

DewGew
Posts: 29
Joined: Thursday 21 April 2016 12:01
Target OS: Raspberry Pi
Domoticz version: V3.8102
Location: Sweden
Contact:

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

Postby DewGew » Monday 24 July 2017 11:52

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?

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

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

Postby dannybloe » Monday 24 July 2017 12:02

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: 35
Joined: Friday 23 December 2016 10:41
Target OS: Linux
Domoticz version:
Contact:

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

Postby DarkAllMan » Tuesday 25 July 2017 11:12

Sorry, wrong forum!
Last edited by DarkAllMan on Tuesday 25 July 2017 11:29, edited 1 time in total.

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

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

Postby dannybloe » Tuesday 25 July 2017 11:14

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: 8
Joined: Sunday 17 April 2016 10:04
Target OS: Raspberry Pi
Domoticz version: v3.5065
Contact:

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

Postby marton » Tuesday 25 July 2017 16:25

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: 722
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi
Domoticz version:
Location: Ermelo
Contact:

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

Postby dannybloe » Tuesday 25 July 2017 16:33

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: 8
Joined: Sunday 17 April 2016 10:04
Target OS: Raspberry Pi
Domoticz version: v3.5065
Contact:

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

Postby marton » Tuesday 25 July 2017 16:51

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: 722
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi
Domoticz version:
Location: Ermelo
Contact:

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

Postby dannybloe » Tuesday 25 July 2017 17:28

Thanks :)
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.

ednl
Posts: 20
Joined: Thursday 25 May 2017 13:29
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Postby ednl » Tuesday 25 July 2017 18:47

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..


Return to “dzVents Lua Framework”

Who is online

Users browsing this forum: No registered users and 2 guests