Author Topic: Keen Smart Vent  (Read 9849 times)

Online rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1690
  • Karma: +93/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Keen Smart Vent
« Reply #45 on: August 05, 2018, 10:30:42 pm »
These instructions are no longer working and I don't know since when. I am on 1.7.26 and found a mountain of problems with the very buggy vera plus.
The main issue is if you try to follow these instructions, at the first refresh of the browser the device disappears. It is now disappearing because it is invalid since it is missing the device_json attribute. If you try to run the edits, before you get to them a luup reload will occur and wipe out the device completely (not just invisible anymore) and will go into infinite luup reload with a reload every 20s preventing you from saving any of the parameters before they get reset again. MCV, your autoconfigure scripts are creating invalid devices!! The device also never shows up as a door sensor or a thermostat any more. It shows up as generic zigbee device which again is invalid.

I have been troubleshooting the problem and found the solution, you will need to have ALTUI installed because ALTUI displays invalid and hidden devices which UI7 ignores.

New instructions:

1. Add the generic device to the vera.
2. Once Vera sees the device and does its first reload (watch the vera plus LEDs, they will be all lit up) remove the batteries from the vent. Why? because the vent sends data to the vera and causes it to reload because the vera does not know what to do with it. The vera code definitely abuses luup reloads I found most to be unjustified. Taking the battery out will enable us to configure the device manually before syncing them.
3. Go into the device under settings and set the device to not autoconfigure (auto configure to no instead of use default behavior). You will see under advanced/attributes of the device that the device_json field is missing. At this step, it is very likely that the device disappeared, especially if you reloaded the browser page. This is when I switch to ALTUI.
4. note the device number you just created and go into app/lua test code on the vera or ALTUI.

Code: [Select]
local devnum = **your device number**
luup.attr_set ("device_json","D_WindowCovering1.json",devnum)
luup.attr_set ("device_file","D_WindowCovering1.xml", devnum)
luup.attr_set ("device_type","urn:schemas-micasaverde-com:device:WindowCovering:1", devnum)
luup.attr_set ("category_num","8", devnum)
luup.attr_set ("subcategory_num","1", devnum)

I personally created my own device_json to show vent icons instead of window covering but for the sake of just fixing the problem, this is what is needed for now.

5. Now the device should show that it is waiting for the device to wake up to configure. Do a luup reload first (you can go to App/Serial Port Configuration and hit save, you can also go under settings/zwave/advanced/reload engine). Then go back to the device and verify that the attributes have been created and set. It is likely that the name you previously set got wipped so you will have to rename it and it should now show again on UI7 if it had disappeared before.
6. Now insert the batteries back into the device. The UI will show "configuring" and the vera will do another luup reload when complete. The vent should now be functioning.
openLuup (78 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Online rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1690
  • Karma: +93/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Keen Smart Vent
« Reply #46 on: January 21, 2019, 09:13:06 pm »
I just somehow managed to make the device report its battery level to the vera. It seems like the initial inclusion was buggy (after all not officially supported) and some fixes were accidentally made in the latest firmware version on the zigbee battery reporting endpoint.
For those who do not want to exclude and reinclude their devices, here is the luup code to make the battery report correctly

Code: [Select]
local devnum = **your keen device id**
luup.variable_set("urn:micasaverde-com:serviceId:ZigbeeDevice1", "SupportedOutClusters", "0019", devnum)
luup.variable_set("urn:micasaverde-com:serviceId:ZigbeeDevice1", "PowerSourceLevel", "100", devnum)
luup.variable_set("urn:micasaverde-com:serviceId:ZigbeeDevice1", "ReportAttrib", "0001:4c00=1;0006:0000=0;0008:0000=1;0402:0000=0", devnum)
luup.variable_set("urn:micasaverde-com:serviceId:ZigbeeDevice1", "VoltageRate", 25, devnum)
luup.variable_set("urn:micasaverde-com:serviceId:HaDevice1", "BatteryLevel", "", devnum)
luup.variable_set("urn:micasaverde-com:serviceId:HaDevice1", "BatteryDate", "", devnum)
openLuup (78 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline jadragescu

  • Sr. Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
Re: Keen Smart Vent
« Reply #47 on: January 28, 2019, 04:26:31 pm »
This is a great find rafale77.  Thank you for sharing.

My Keen vents always get disconnected with Vera "Can't find Device" as they either have battery drain quick in these vents, or I lose Zigbee connection, or "battery compartment" on these vents are not the best.  Not sure if you have this same issue.  Any help/experiences/tips/tricks with these vents, would be much appreciated!!!!

When you say firmware was updated, is that on the Vera controller side, or do we have to update the firmware on these vents itself.  If so on the vents, is there a howto perhaps you can enlighten us with? 

Thanks again!


Online rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1690
  • Karma: +93/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Keen Smart Vent
« Reply #48 on: January 28, 2019, 04:54:41 pm »
The disconnections in my experience were due to a poor zigbee mesh. The range and reliability of zigbee is easily compromised if you do not pick the right channel for your environment. It functions on the overly crowded 2.4GHz band. I ultimately made it 100% reliable by... adding relays in the form of zigbee outlet plugs.
openLuup (78 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline jadragescu

  • Sr. Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
Re: Keen Smart Vent
« Reply #49 on: January 29, 2019, 01:35:50 pm »
@rafale77: Can you send me the link of the Zigbee relays you got to make it 100% reliable?  I have a lot of these vents, but I presume Zigbee doesn't act like a repeater as the Zwave Mesh does.  Any suggestions on the channel to use for Zigbee to not interfere as much with 2.4Ghz crowded signal.  I read up on channel 26 is best, but Vera doesn't support this channel.  I believe I have it on channel 16.  I have a mesh router for Wifi, so I can't control the channels as I used to with an Apple router.  Any other recommendations/tips/tricks would be greatly appreciated!!!

Lastly, regarding battery, I followed your lua code to put it in dev - test code.  It worked!  The only thing I notice is every device is reporting 100% battery.  Does that update?  I presume the Zigbee device updates the Power level of battery, then updates the Vera variable/etc????

Thank you again!!!

Online rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1690
  • Karma: +93/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Keen Smart Vent
« Reply #50 on: January 29, 2019, 04:49:05 pm »
I am using some centralite square plugs which originally were also not supported by vera, but since they are simple plugs, they included without trouble. I used these because they were on fire sale at some point last year.
Like zwave though, zigbee does mesh but not for battery operated devices and both the vera and the keen have smallish antennae. Even a single plug made a huge difference for me. The value of the battery does change. Mine which are at least a year old are starting to show some different values. That value is what the keen vent is reporting. Not something the vera is processing. Note that my code sets that value as empty... so the 100 came from the vent.
« Last Edit: January 29, 2019, 07:24:48 pm by rafale77 »
openLuup (78 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline jadragescu

  • Sr. Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
Re: Keen Smart Vent
« Reply #51 on: January 29, 2019, 07:06:50 pm »
@rafale77:  Thank you once again!  I have purchased a few of these.  I am hoping they are as successful as in your setup.  I will keep this forum posted.

Appreciate your help!!!

Online rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1690
  • Karma: +93/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Keen Smart Vent
« Reply #52 on: January 29, 2019, 07:30:04 pm »
Sorry I was replying with my phone so I forgot to answer one of the questions. This link shows the overlap of the different channels:

https://www.metageek.com/training/resources/zigbee-wifi-coexistence.html

I geeked myself out and actually got myself a spectrum analyzer to identify 2.4GHz network problems. My sonos system for example occupies a lot of bandwidth when it is playing. The microwave in the kitchen can cause complete havoc. Channel 26 for zigbee is rather unusual. I have Hue in my setup as well which is also on Zigbee but on a proprietary protocol... It is just a very crowded band. I personally have mine on 25. You would have to see what channel your mesh wifi occupies...
openLuup (78 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Online rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1690
  • Karma: +93/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Keen Smart Vent
« Reply #53 on: February 04, 2019, 09:38:56 pm »
Having decided to get rid of the ecobee, to go all local processsing, got me thinking about how to create the perfect HVAC automation and make better use of these vents.
I am already automating these vents by shutting them off upon opening of windows and varying their opening by housemode and thermostat mode (whether heating or cooling).
I am thinking about moving them further by using the various temperature sensors in the house as inputs to tune these vents... I've just started to build the logic on paper. Could make things interesting...
openLuup (78 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline jadragescu

  • Sr. Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
Re: Keen Smart Vent
« Reply #54 on: February 05, 2019, 02:18:38 am »
@rafale77:  I have already wrote some Lua to automate these vents to open and close, depending on the temperature in each room.  Let me know if you are interested in my ideas/code that I have implemented already for these temperature sensors/thermostats/etc.

Cheers!

Online rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1690
  • Karma: +93/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Keen Smart Vent
« Reply #55 on: February 06, 2019, 03:01:29 am »
Thank you. I was thinking about doing this with scenes which would have gotten fairly complex but am now looking at using Rigpapa's AVT plugin with some enhancements to make it more scalable and shareable...
openLuup (78 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline jadragescu

  • Sr. Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
Re: Keen Smart Vent
« Reply #56 on: February 06, 2019, 09:27:12 pm »
@rafale77:  I was looking at AVT plugin as well, but didn't like how you couldn't actually pick a heating source, you needed an on/off device, so I just did scenes and made my own virtual thermostats to utilize "Auto", "Heat", and "Cool"

I agree about making it shareable on a larger scale, but didn't have the time for a plugin creation yet and perhaps the expertise quite yet.  Should be straight forward though, once I get the Lua code solidified.  Any support or assistance would be appreciated.  Let me know if you ever want me to share some of the lua as you tinker with this!!!

Cheers!

Online rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1690
  • Karma: +93/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Keen Smart Vent
« Reply #57 on: February 06, 2019, 11:26:01 pm »
I would have no problem modifying the plugin to make it work with a thermostat rather than an on/off load. I don't think this would be very difficult to do... I may not be very fast at doing these but I am pretty comfortable writing these codes these days. Will work with rigpapa on it though when we both get back. Stay tuned...
openLuup (78 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.