This page last changed on Nov 16, 2014 by schaaf75.

I have a new device from Eltako Funk system
The funk positionschalter FPE-1

I can read the on status with:
EEP F6-02-01 STATUS_ROCKER_A

but the release of the switch i can't read it.
codes send by the device are 0x10 (button open)
0x00 (button closed)

Am i using the wrong EEP code?
Or is the release (0x00) not implemented in the EEP F6-02-01 code?

Kind regards

This is correct. The original EnOcean F6-02-01 implementation suppress the release telegram.

Posted by aktur at Nov 17, 2014 08:48

Thanks for your reply, what is the easiest way to unsuppress this release telegram?
There are more modules in de Eltako 14 family with these constructure. Activating then send a telegram with 0x1x
and releasing the input oxoo is send.
I want to switch on and off the light in a closet.

Posted by schaaf75 at Nov 17, 2014 11:04

Is there someone who can help me to change this file or make a new EEP?
Or is there someone who has done this already?
Is there documentation where i can read how to change where to change code and run my own changed code? (a step by step).
I am using openremote running on a mac.

Kind regards
Arjen

Posted by schaaf75 at Nov 19, 2014 15:22

Are you able to edit Java code and make your own controller build? If yes, I can give you a tip.

Posted by aktur at Nov 19, 2014 16:49

Do you mean by edit java code the .class files? I can edit that (i am using JD-gui.app)
I have a controller running on my mac with rules. I will start up with the ./openremote.sh run command.

Thanks for so far.

Posted by schaaf75 at Nov 19, 2014 21:18

No, I mean the .java files, the source code. So you should be able to build it with ant. Please refer to How-to on this site.

Posted by aktur at Nov 19, 2014 22:20

Hi Michal,
Thanks for pushing me in the right direction, i did some homework...
See http://www.openremote.org/display/docs/Building+OpenRemote+2.0+Developer+Releases
And reading the first 3 chapters of :http://svnbook.red-bean.com/en/1.6/svn-book.pdf
I also installed the svn commands on my computer.

Now have to make a copy of the openremote repository but which one is the best to start with? (In relation with the enocean code)
Am i right that enocean code is only in the test phase?
Now i am using: OpenRemote-Controller-2.1.0_SNAPSHOT-2013-06-17 (made by Rainer Hitz, with the Command A5-38-08 implemented for the FUD14, i am using this every day successful)

Posted by schaaf75 at Nov 23, 2014 09:38

I think that using the Rainer's branch is OK. Find EepF60201.java file and change the updateSensor() to this:

  @Override public void updateSensor(Sensor sensor) throws ConfigurationException
  {
    if(sensor instanceof SwitchSensor)
    {
      sensor.update(getStateValue());
    }

    else
    {
      String status="N/A";
      if(rockerStatus.ordinalValue() == ROCKER_AI)
      {
        if(energyBowStatus.ordinalValue()==0){
          status = "ROCKER_AI_0";
        }else{
          status = "ROCKER_AI";
        }
      }

      else if(rockerStatus.ordinalValue() == ROCKER_AO)
      {
        if(energyBowStatus.ordinalValue()==0){
          status = "ROCKER_AO_0";
        }else{
          status = "ROCKER_AO";
        }
      }

      else if(rockerStatus.ordinalValue() == ROCKER_BI)
      {
        if(energyBowStatus.ordinalValue()==0){
          status = "ROCKER_BI_0";
        }else{
          status = "ROCKER_BI";
        }
      }

      else if(rockerStatus.ordinalValue() == ROCKER_BO)
      {
        if(energyBowStatus.ordinalValue()==0){
          status = "ROCKER_BO_0";
        }else{
          status = "ROCKER_BO";
        }
      }
      sensor.update(status);
    }
  }

This way you will get the same commands as they were for pressing (legacy code will work) and commands ending with _0 for releasing. This change allows me to detect multiply clicks and long clicks from the standard rocker.

Posted by aktur at Nov 23, 2014 13:48

Hi Mickal,
It took some time, but your solution is working on my computer.
I'am happy with it. By starting up the device i have some errors. It look likes that the error is created by switching on/off the first time a sensor with the FUD14 module.
This module sends a dimming value command (EEP A5-38-08) and an on/off command (EEP F06-02-01).
The error code generated by switching the first time:

ERROR ESP processor listener executor: Thread 'ESP processor listener executor' terminated with exception : null
java.lang.NullPointerException
at org.openremote.controller.protocol.enocean.profile.EepF60201.updateSensor(EepF60201.java:493)
at org.openremote.controller.protocol.enocean.EnOceanCommand.update(EnOceanCommand.java:201)
at org.openremote.controller.protocol.enocean.TransceiveCommand.radioTelegramReceived(TransceiveCommand.java:128)
at org.openremote.controller.protocol.enocean.EnOceanGateway.radioTelegramReceived(EnOceanGateway.java:160)
at org.openremote.controller.protocol.enocean.Esp3Connection.radioTelegramReceived(Esp3Connection.java:131)
at org.openremote.controller.protocol.enocean.packet.Esp3Processor$1.run(Esp3Processor.java:156)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)

Any idea?
Thanks

Posted by schaaf75 at Dec 03, 2014 08:16

This is because updateRocekrStatus() is called only when energy bow is pressed, i.e. first you call pressed and then released state. This is normal behaviour for rockers. Probably your sensor can send the release command first, hence this error. You can either ignore this error or amend the source code to reflect your sensor behaviour correctly.

Posted by aktur at Dec 03, 2014 10:29

After monitoring my system I think the error above is generated by the following sensor(s):

  • I have a Eltako smoke sensor (FRW) this sensor is sending every 15 minutes a controle command (release rocker A).
  • I have also a Eltako (FBH65S)light motion sensor this sensor is sending every 20 minutes controle command.

My rules are not triggerd on these commands.
My questions are: what/ where do I have to change code to trigger the rules every time a controle message is send, but status is not changed.
I will controle if the sensors are still working if not I can change battery's etc.

Posted by schaaf75 at Jan 13, 2015 12:14

Please send your rule, so I can amend it for the desired behaviour.

I will controle if the sensors are still working if not I can change battery's etc.

Battery in EnOcean device should last for more than 10 years. Can be a long waiting

Posted by aktur at Jan 13, 2015 12:34

Well i am very patient -), it is not only for the battery but also to check if the communication with the sensors are ok.
I hope the smoke alarm will never send an alarm message. But i am happy if the smoke alarm is sending every 15 min. a message everything OK.

The rule code i am using is:
// LogStamp is a function to write text with a date time stamp on my terminal screen

rule "Bewegingssensor hal" //motion detector
when
$motion : Event( source == "Sensor_MOTION_LB3" )
$light : Event( source == "Sensor_LIGHT_LB3" )

then
System.out.println( LogStamp("Status bewegingssensor HAL ( ")+ $motion.getValue()+ " " + $light.getValue() + " )" );
//check timer etc
end

rule "Rookmelder hal" //smoke detector
when
$smoke : Event( source == "Sensor_frw1" )

then
System.out.println( LogStamp("Status rookmelder HAL ( ")+ $smoke.getValue() + " )" );
//check timer etc
end

------
Motion sensor is triggerd if light value or motion state is changed.
Motion sensor is NOT triggerd if values are equal every 20 minutes.

Smoke detector is triggerd if there is an alarm, if the alarm stoped and when the batery is empty (simulated that with an variable power supply)
So only triggerd by status changes, NOT triggerd if values are equal every 20 minutes.

Posted by schaaf75 at Jan 14, 2015 15:41

This will trigger on every enocean telegrams from sensors:

rule "Bewegingssensor hal" //motion detector
when
$motion : Event( source == "Sensor_MOTION_LB3" ) 
$light : Event( source == "Sensor_LIGHT_LB3" )

then
System.out.println( LogStamp("Status bewegingssensor HAL ( ")+ $motion.getValue()+ " " + $light.getValue() + " )" ); 
//check timer etc
  retract($motion);
  retract($light);
end

rule "Rookmelder hal" //smoke detector
when
$smoke : Event( source == "Sensor_frw1" )

then
System.out.println( LogStamp("Status rookmelder HAL ( ")+ $smoke.getValue() + " )" ); 
//check timer etc
  retract($smoke);
end
Posted by aktur at Jan 14, 2015 16:44

I added the retract statement into my rules but no differents.
On changes everythink ok.
No trigger if messages are equal.

Posted by schaaf75 at Jan 15, 2015 14:51

Please make sure that you reboot the controller after updating the design. There is a nasty bug in it causing many strange problems when you don't do this. Also, make sure that the retract() commands are indeed executed and you don't exit rule with an exception before reaching it.
The code is 100% good, I'm using this construct all the time.

Posted by aktur at Jan 15, 2015 16:18

It was the nasty bug. It is working. But......
If the controller start running it will receive (from the smoke sensor, a button off signal)
In my debugger screen the error (see this post, 3 dec 2014) is generated and the rule is not triggerd. This is happening every 20 minutes.
Where how can i change code? To solve this problem (bug?) In the EepF60201.java file?

If i put the test button on the smoke sensor (button press signal) the rule is triggerd an alarm, from that moment every 20 minutes the rule is triggerd, no errors anymore.
So there is a small startup problem.

Posted by schaaf75 at Jan 20, 2015 13:14

Well, I don't have a sensor which behaves like this so I cannot test it. Anyway putting try{}finally{} should solve this problem. Try the following code and see if it works as expected.

  @Override public void updateSensor(Sensor sensor) throws ConfigurationException
  {
    if(sensor instanceof SwitchSensor)
    {
      sensor.update(getStateValue());
    }

    else
    {
      String status="N/A";
      try{
        if(rockerStatus.ordinalValue() == ROCKER_AI)
        {
          if(energyBowStatus.ordinalValue()==0){
            status = "ROCKER_AI_0";
          }else{
            status = "ROCKER_AI";
          }
        }

        else if(rockerStatus.ordinalValue() == ROCKER_AO)
        {
          if(energyBowStatus.ordinalValue()==0){
            status = "ROCKER_AO_0";
          }else{
            status = "ROCKER_AO";
          }
        }

        else if(rockerStatus.ordinalValue() == ROCKER_BI)
        {
          if(energyBowStatus.ordinalValue()==0){
            status = "ROCKER_BI_0";
          }else{
            status = "ROCKER_BI";
          }
        }

        else if(rockerStatus.ordinalValue() == ROCKER_BO)
        {
          if(energyBowStatus.ordinalValue()==0){
            status = "ROCKER_BO_0";
          }else{
            status = "ROCKER_BO";
          }
        }
      }finally{
        sensor.update(status);
      }
    }
  }
Posted by aktur at Jan 20, 2015 15:56

I tried the code but same result.
The first error is generated in the following statement if(rockerStatus.ordinalValue() == ROCKER_AI)
Is it possible that the value rockerStatus.ordinalValue() is NULL? That is what the error said.
Is it passible to force or set a value in rockerStatus.ordinalValue() if this one is NULL
Something like
if(rockerStatus.ordinalValue() == NULL)

Unknown macro: { rockerStatus.ordinalValue()= ?? }

I can monitor the sensor code by Dolphine monitor if this can help solving this problem.
Let me know what kind of information (tests) can help.

Posted by schaaf75 at Jan 22, 2015 08:21

I don't understand how try{}finally{} block misses an exception. You can of course add the catch statement, but it would not change the functional behaviour. sensor.update() should be executed in any situation and the rule should be triggered.

Of course it is possible that rockerStatus.oridinalValue() is undefined as the off command does not send any information of the rocker which is released. It is the same for all of them.

Posted by aktur at Jan 22, 2015 10:20

I think i made a misstake now i have the following situation.
After adding the try finally block the logger is writing the value NA on the screen, every 20 minutes after starting up the controller.
The error (see post 3 dec 2014)is also generated.
I expect the value off (0x00). All the problems are gone if i generate for one time an alarm.
The smoke sensor is sending every 20 minutes an ID with data 0x00 (I did yesterday some monitoring with Dolphine basic view).
How is it possible that the sensor is ignore data with the value 0x00 after starting up (initialisation)

Can somebody help me to solve this problem.
I can change java code and compile, run changed code.
But I am new in Java and i don't understand all the source code in depth. Please push me in the right direction.
I can and will test all the Eltako modules and sensors I have.

thanks for so far.

Posted by schaaf75 at Jan 27, 2015 07:17

I don't really understand your problem. Value NA is as valid as 0x00, both say nothing - i.e. it is impossible to know which rocker was switched off as all of them have the same value.
Anyway, the rule is triggered so you know that the sensor is alive. What is exactly the problem you want to solve?

Posted by aktur at Jan 27, 2015 09:49
Document generated by Confluence on Jun 05, 2016 09:35