Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: User plugin for EnOcean USB300

  1. #1
    Join Date
    Nov 2002

    Default User plugin for EnOcean USB300

    Hi everyone,

    I'm trying to do a Girder 6 plugin for TCM3x0 based transceivers like the USB300.
    The basic functionality is working, but that could take a while to finish, so here it is if someone wants to experiment and help.

    The plugin allows to use these modules with the Device Manager:

    - Dimmers and relays (control and status by RPS or preferably Central Command telegrams).
    - Four-bytes sensors (with a default profile and some specifics, like simple temperature and Automated Meter Reading for electricity).
    - One-byte sensors.

    If it's not clear how to use it please let me know.

    So far the UI is the most difficult part. If you have any tips about the JS publisher, that would be really appreciated!
    Attached Files Attached Files
    Last edited by hoox; October 4th, 2016 at 03:24 PM.

  2. #2


    Hi hoox,

    I was beginning to think that I was the only one interested in EnOcean for Girder here.

    I tried your Enocean plugin on my Windows 10 machine and it works fine, so fare I have only tested basic stuff like turning on and off (EnOcean RCM250 Module) a lamp from within the Device Manager.

    This is grate but I would like to run Girder on a Raspberry Pi 3 so I need it to work on Linux. You are right, your module doesn’t work on Linux (I tried in order to see what errors it would throw) and it is looking for a module “wim” (as you mention in your readme). Were do I find information about this module, I can't seem to find any information about it (no luck with google).

    I have done some attempt of my own to control EnOcean devices (rudimentary at best), I have manage to calculate CRC8 and send messages but I have not manage to receive (do to ESP3 flexible packet length). I was hoping to use Girders built in transport but the parser is unfortunately not flexible enough.

    I have asked Ron if he could make it more flexible and generic see post, I am hoping that he will see this additional beneficial to other Girder users and find time to add it.

    If I may ask, do you have any plans to try to make your plugin to work on Linux/RPI3?
    If so would you benefit from an upgraded parser or would you go an other rout?

    I would love to see you plugin on Linux so if there is anything I can help you with let me know! But remember I am not a real programmer, merely an enthusiast and a novice at programing.



  3. #3
    Join Date
    Nov 2002


    Hi Joachim,

    the lack of interest is a bit surprising. It's very nice stuff, especially when combined with Girder.

    About Linux compatibility:
    The 'win' library is only documented in the Girder 5 Help but is available in Girder 6.
    This plugin only uses one of it's functions to know the interval between PTM telegrams (which is what differenciates a switching and dimming command with RPS).
    I do not know if Girder 6 has a Linux compatible method to generate timings in millisecond, so I'll try with a timer and a Lua counter and see if there is no significant loss on performance and precision.

    A dynamic parser would be a great addition. At the moment the plugin uses the PARSER_PASSTHROUGH type. I think that it should handle variable length telegrams... At least the sensors (including PTM switches) should trigger events.
    If it doesn't please set the log level to 2 or lower on the Component page and send me the Lua console output with the exact module model and what you're trying to do.

    Also, I'm not sure if you're expecting to receive something from the RCM250 or another module type...
    If I'm not mistaken, the RCM250 is a one way receiver (pre-Dolphin). Configuration and sync are much easier with the newer actuators. Be careful before buying, the documentation is often incredibly vague.

  4. #4



    Yes a Linux version would be highly appreciated so please try to do away with 'win' if you can.

    But first I would need to get your current version working properly, I can’t get beyond the basics.

    I have added the Enocean plugin (File > settings > Plugins), gone to the Device Manager, Add Component, selected EnOcean plugin (Plugin Picker window) selected com-port (com3).

    So fare so good, from Component Editor I can Send transceiver telegrams;

    I select ID (Base ID of USB300 or base id + one, both already learnt by RCM250).

    Next I select Rocker B and when I press button I or 0 the light is turned on and off.

    So your plugin works, what I can't get to work is add device and have them sending commands.

    I right click on the EnOcean component and select Add device from the window that pops up I select Relay and then Ok and this generates a Switch. I'll configure this switch by selecting a known transmitter (I select one of the previous working id's) then I select Rocker typ B and then parameter. I have tried both (S)OI and (S)IO and I press the Add learned transmitters button. Now the window below gets populated e.g XXXXXXXX:B(SIO) I finishing by hitting the Ok button.

    From what I understand I should now be able to test the added switch by pressing the toggle button, but nothing happens.

    Am I missing something? Do the relay need to be bidirectional (I know that RCM250 is not)?

    Regarding actuator/relay, I am looking to get a bidirectional version maybe with dimmer functionality, do you have any good experiences? If so what brand and model?



  5. #5
    Join Date
    Nov 2002


    Hi Yoggi,

    Hopefully the updated version (at first post) can run with Linux.

    You did everything right. RPS commands from the DM devices weren't working for relays. It should now, but only for switching button mode like you have, the others will come later.

    Regarding what modules to choose: bidirectional from any brand (they should all be compatible), easy to replace. It seems that most sensors are unidirectional but that's fine. If they clearly tell the EEPs they're using that's very good.

  6. #6


    Hi hoox,

    In Windows I can now add a relay and configure a switch to send on and off (with toggle button on Control Editor page), I can also use and configure the switch (on off toggle) in Girder so this is great!

    Regarding the UI, When I set up switch rocker there is a parameter drop down menu were I can select (S)OI (S)IO among others, if I understand correctly these are button press and release (this makes sense since my physical switch sends messages on press and release). If my interpretation is correctly maybe this could be clarified, OI and IO made little sense to me at first.

    Now to the big problem under Linux, the drop down menu ID on the Component Editor don't list anything so I can't select the EnOcean gatway.

    When I add the Enocean component I do get the correct ports in the drop down menu to select from (TtyUSB0 and ttyAMA0).

    I have tried the USB300 (ttyUSB0) on Raspbian and Ubuntu but with no luck.

    I have an EnOcean Pi on my Raspberry Pi so it would be nice to use it but getting the USB300 to work would go a long way!

    The EnOcean Pi uses the Raspberry built in serial port TtyAMA0 (EnOcean Pi - A Wireless Transceiver Module for the Raspberry Pi)

    Did you see my post? Maybe there is some code that you can reuse or get inspired from!

    Please let me know if there is anything I can help you with!



  7. #7
    Join Date
    Nov 2002


    Well, thanks Yoggi for testing!

    The confusing 'parameter' is needed so that Girder can track the module status for each button (necessary for unidirectional modules).
    It's just a compact form of the mode, the active buttons and their function (the first button is the OFF/- state, the last one is the ON/+ state).

    The actuators usualy have factory function programing for two buttons, one button, momentary operation, and a lot more.
    It's impossible for me to support them all, so I'll just do the simple and most commonly used modes: switch, toggle and momentary.
    The default mode is the switch (S), with O = Off, I = On, but it is not a standard at all, so you can choose what each button actually does.
    If the module has a status telegram, you can use only that, unless you want to update a bit sooner. Again, not all of that is working yet.

    The Linux issue might just be a com port name format problem in this plugin. Please do another attempt with the 0.3.2 version. It should print the port it's trying to access.

    If it still doesn't work, can you connect the USB300 with the Simple Transport Plugin?
    You should get events in the logger (e.g. when using a PTM) with these settings:
    Baud: 57600
    Incoming parser: Passthrough
    Create Events and Receive data as hex: checked

  8. #8


    Hi hoox,

    If I hard code self.port to 'ttyAMA0' (line 1125 in TCM.lua) the plugin connects but after it connects I get an other error/message on the Lua console. And the Gateway Id drop down (Component editor) list doesn’t get populated.

    New message/error:
    Thu Sep 8 02:38:42 2016 ttyAMA0 TIMEOUT OCCURED WITHOUT DATA.

    If I print the port parameter function connect receives I get 'dev/ttyAMA0' (looks like dev/ should be removed). Not sure were you construct the string but it sounds like an easy fix. I would look but I am out of time for now.

    Tomorrow I will try with the USB300 and not the EnOcean Pi (the results above are with the EnOcean PI).


    Last edited by Yoggi; September 7th, 2016 at 09:18 PM.

  9. #9
    Join Date
    Nov 2002


    Alright, you should get 'ttyAMA0' with the latest (0.3.3) as it should only take the string after the last backslash or slash.

  10. #10


    Hi hoox,

    Some progress!

    Windows returns com port path with backslash while Linux uses forward slash so I needed to change \\ to / in order to get a connection under Linux.

    local _, _, d, port = string.find(component.internalId, '\\\\(.+)\\(.+)')
    (line 346 backEnd.lua)

    Not sure what the best way to handle this in Windows and Linux is. If I understand correctly Lua can use / in file path on both windows and Linux, maybe substitute \ with / when these are received from windows.

    On Linux I can now add a switch, and the test ToggleButton works (Control Editor) to turn the RCM250 relay on and off.

    On Window I can drag a switch (Control Editor) to Girders Action Tree but in Linux (Girder on Ubuntu with USB300) I can't.

    I appreciate you taking time to make your plugin Linux friendly!

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts