more G-Labs products

Author Topic: TESTING RELEASE  (Read 196245 times)

April 18, 2014, 12:55:40 PM
Reply #75

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi guys,

attached to this message a patch that will update dimmer and shutter widgets.
Let me know your thoughts about these.
Also go to Automation->Scenes and edit the Scheduled ON/OFF program by changing line 4-6 of the Trigger Code as follow:

Code: [Select]
Program.AddFeature("Light,Dimmer,Switch,Shutter", "HomeGenie.ScheduleControl", "Control device on a given schedule");
Program.AddFeatureTextInput("Light,Dimmer,Switch,Shutter", "HomeGenie.ScheduleOn", "Turn On (enter scheduler expression)");
Program.AddFeatureTextInput("Light,Dimmer,Switch,Shutter", "HomeGenie.ScheduleOff", "Turn Off (enter scheduler expression)");

Cheers,
g.
« Last Edit: April 18, 2014, 11:52:00 PM by Gene »

April 18, 2014, 03:24:35 PM
Reply #76

badfinger

  • **
  • Information
  • Jr. Member
  • Posts: 32
Hi Gene,
done. Great....congratulations.......my shutter works now perfect.

regards

Alex

April 18, 2014, 09:48:57 PM
Reply #77

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544
Hi,
The status "open"/"close" is good now.

The "Scheduled ON/OFF" appear but not the two value :
  • Turn On (enter scheduler expression)
  • Turn Off (enter scheduler expression)
But i can see the "Control device on a given schedule".

Bye

PS : The windows phone app don't permit to do action : open/close
« Last Edit: April 18, 2014, 09:57:38 PM by nolio »

April 18, 2014, 11:53:03 PM
Reply #78

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
LoL.. nolio just forgot two lines of code. See the above message again, I added them.

Cheers,
g.

April 19, 2014, 07:32:22 AM
Reply #79

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544
Hi Gene,
Oki good ! Thanks.
Bye

April 19, 2014, 10:36:18 AM
Reply #80

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
Hi Gene,

the UI looks really good, but the shutter dim function still does not work as expected on X10.

I am using the marmitek SW 12 module, the manual you can find here:

http://www.marmitek.com/de/produkt-details/home-automation-security/haus-automatisierung/micromodules/sw12.php

Within the manual they say:
The unit will respond to X-10 power line commands sent in ?Standard? and ?Extended? format.
The unit responds to ?Standard? X-10 messages ?Address On? , ?Address Off? , BRIGHT and DIM .
?ON? fully opens the blind and ?OFF? fully closes it.

BRIGHT and DIM can be used to set the blind to any position. The action is identical to that which occurs when the UP and DOWN keys are pressed. Bright is equivalent to UP and DIM is
equivalent to DOWN.


The unit will also respond to ?Extended? code1 X-10 messages of Type = 0. Using these commands enables the unit to remotely set the blind to any desired position using a suitable controller and fully automate the blinds in the house, apartment or office. Extended code messages can be sent to the SW12 using a CM15PRO Computer Interface for example.

Within manual control they write:
You can control the blind in 2 different ways:
- Press and hold down the key until the blind reaches the desired position.

I am not sure, does that mean you have to send the DIM Command for a certain period (like pressing and holding the down key) ?

Within the SW10 manual they say:

The switch will respond to the following commands: ON: fully open, OFF: fully closed,
DIM : 4 % up, BRIGHT: 4 % down.

Which I would understand the way, that each DIM command opens the blinds by 4% and BRIGHT closes them by 4%.

If I use your current widget, I can close the blinds to approx. 20% of window hight only.

About extended commands I found this how it should work:
http://developer.telldus.com/attachment/ticket/124/X10%20xtdcode.pdf

TYPE = 0 Shutters and Sunshades
DATA COMMAND
TYPE FUNCT.
128 64 32 16 8 4 2 1 8 4 2 1 8 4 2 1
x x x D D D D D 0 0 0 0 0 0 0 1 Open Shutter to amount in
Data Field. Enable Sun
Protection.
(0 = closed, 25=fully open)

How is your implementation? Do you issue several commands, e.g. widget set to 50% means 50/4=12 BRIGHT commands in a row?

Thanks

Regards
Jens
« Last Edit: April 19, 2014, 10:44:50 AM by Jens »

April 19, 2014, 02:20:47 PM
Reply #81

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi Jens,

I believe we actually found a bug in dim/bright commands sent by HG =)
This is not noticeable when using lights, but as you reported it's being a problem with shutters.

When you go bright up to 100% does the shutter open to its max level? So, is the problem only with dimming to the minimum level?

I'll try to fix XTenLib and send you a fixed version for testing. I don't have any way of getting a precise feedback with lights, so you are the only who can help debugging this using shutter.

I'll send the new XtenLib for testing later on today in this thread.

Cheers,
g.

April 19, 2014, 07:22:25 PM
Reply #82

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
Hi Gene,

sometimes the shutter does not even move and I have o push open to start again.

What I found in regards to the extended code to be used with mochad is this one:

Shutters
Shutters can be controlled via extended commands.
You can open a shutter in steps from 0-25 (0 -> close 25 -> fully open).
Open shutter half way:
pl J2 extended_code_1 0 2 12

25 steps  with the 4% posted earlier which I found in the marmitek description would end up to a hundred.
Maybe you divide the widget value by four and send it via the extended command shown above?

If I have time over the weekend i will try with mochad.

Thanks
Regards
Jens

April 19, 2014, 07:55:19 PM
Reply #83

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi Jens,

XTenLib do not implement extended codes. I'll see if I can do something about it.

Cheers,
g.

April 19, 2014, 08:40:07 PM
Reply #84

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi Jens,

seems like CM15Pro only supports Extended Code 1 Type 3 (Control Modules) as stated here:

http://www.marmitek.com/de/download/manuals/cm15pro/115/0

Sunshades and Shutters belong to Extended Code 1 Type 0.

http://www.linuxha.com/athome/common/x10.xtc797.txt

Let me know about your tests with mochad, pheraps there is an undocumented way to implement Type 0 with CM15Pro.

Cheers,
g.

April 19, 2014, 08:48:48 PM
Reply #85

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Ok never mind, CM15Pro supports:

Extended Code 1 Type 0 (Sunshades and Shutters)
Extended Code 1 Type 3 (Control Modules)

only for receiving it just support Type 3.

So I'll see what I can do, whenever I'll have some time to work on this. If you can get some output debug from mochad that could also help.

Cheers,
g.

April 19, 2014, 09:03:59 PM
Reply #86

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
If you implement extended codes, please keep in mind that if 2 or more are sent in less than some defined time, it will cause some chime modules to turn into sirens that can only be turned off by unplugging/power cycling. I Don't have any extended code compatible devices, but if HG did send multiple extended codes, my chime could be hard to use.

April 19, 2014, 11:21:16 PM
Reply #87

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Well if I implement this, I'll let the user choose what kind of commands to perform on a module from a module setup page (like the setup page that is enabled for z-wave modules).
The problem is that I can only test this for lights (LM12).

g.

April 20, 2014, 07:16:57 PM
Reply #88

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
Hi Gene,

I tested today the SW12 using mochad and it works perfect.

commands tested in this sequence

pi@raspberrypi ~ $ echo "pl p16 extended_code_1 0 1 25" | nc localhost 1099
04/20 18:57:35 Tx PL HouseUnit: P16 Func: Ext code 1, data, control Data: 19 Command: 01
pi@raspberrypi ~ $ echo "pl p16 extended_code_1 0 1 15" | nc localhost 1099
04/20 19:01:10 Tx PL HouseUnit: P16 Func: Ext code 1, data, control Data: 0F Command: 01
pi@raspberrypi ~ $ echo "pl p16 extended_code_1 0 1 0" | nc localhost 1099
04/20 19:01:46 Tx PL HouseUnit: P16 Func: Ext code 1, data, control Data: 00 Command: 01
pi@raspberrypi ~ $ echo "pl p16 extended_code_1 0 1 25" | nc localhost 1099
04/20 19:03:22 Tx PL HouseUnit: P16 Func: Ext code 1, data, control Data: 19 Command: 01

25 is fully opened and 0 is fully closed as posted earlier, so knob_value/4=value to be send.

Please find attached the command and the output of mochad according to the command.

Would be great to enhance HG shutter functionality by this.

Many thanks
Regards
Jens

April 21, 2014, 12:27:35 AM
Reply #89

RichieC

  • ***
  • Information
  • Full Member
  • Posts: 67
I have just updated to r366 and it appears that my X10 dimmers don't work correctly anymore...

In the Control screen their names just appear as "loading..." and the smart lights scenes that i have controlling them from Z-Wave motion sensors don't work anymore.
If i change the module type of the X10 dimmers to normal light swiches they work fine!

Seems like something is broken with X10 Dimmers?

Rich