USB RFXtrx on openLuup/RPi?

Ok, so the plugin is installed, and it looks ok in the GUI, but how to link it to the USB device like in “Serial communication” on the Vera?

OK, so i’ve done the steps described in the “Serial Connection” thread.

For Step 4, i put this in L_RFX…lua at line 8324 under the “local function startup(lul device)” function.

I still can’t see any communication with it, but the LuaUPnP.log shows no error. Is there any other log files i can tail to see if its up and running to see that the RFX plugin works?

I’ll try to connect from another computer to verify that ser2net is running, but my RFX manager throws an exeption when i press “Connect” for some reason…

Ok, so the last try didnt work. Now I try to use the LAN connection in the RFX code.

I see in the openluup startup log that L_RFXtrx.lua requires a package called “bit”, and it can’t locate it. Can anyone tell me what debian package to install?

Line 3 in L_RFXtrx.lua:

Local bitw = require("bit")

This should do it (from the RPi command prompt, or, indeed, the AltUI OS Command line):

pi@raspberrypi:~ $ sudo apt-get install lua-bitop

That did the trick, its up and running. :smiley:

Thanks for all help and patience!

Picking thisone up again, as i’m setting up AltUI on an old HP Chromebox (Debian OS):

The RFXTRX is connected and working fine except for one snag, when I go to the Control Panel:

Any Ideas? Its only the Protocols page that is gone, the other tabs works fine?

Sorry, no idea. This is JavaScript related, and I don’t do that.

Mabye @amg0 or @tinman can give me some clues?

Ok, so i got the panel showing by adding a “toString().” in front of the substr().

Still shows “false” on firmware type and version. Could this be because of java version differences? I checked, and the one installed is “default_jdk”…

Yes, I believe it has to do with the browser - but perhaps your RPI doesn’t have enough resources to run a browser that supports a more current JS standard.

Don’t think theres a HW issue, its a Chromebox which has better specs than a pi… Its more about the packages i installed probably? Its running Debian 10.5, and I installed OpenJDK version 11.0.8.
I just followed this guide… Anny suggestions to a better version?

May be I’m missing something here but have look at the difference between Java and the JavaScript languages.

The error message:

firmwareType.toString().substr(0, 3) is not a function

occurs because firmwareType is not a string. It would perhaps help, by finding out what it actually contains, by logging it to the console immediately after firmwareType is declared and assigned its value:


The .toString() is not necessary but does at least ensure the code does not crash with the error message. As you have found out.

get_device_state is part of the Vera Javascript API. It returns a string OR undefined. This code works accessing a Vera Plus and running Firefox or MS Edge on Windows. It also works running the Chromium browser on my RPI. I don’t think it’s a problem with the code.

No, the code is probably correct as long as the right packages are installed. As I have no clue about java/script packages, and is fairly stupid in the Linux world, all tips would help. :wink:
The firmware variables are the only ones not working with the plugin though, what’s special about them?

AFAIK there’s nothing special about them - they’re just strings.

Have you looked at the RFXtrx device variables? The firmware type, firmware version, hardware version and protocol settings variables are set on the startup of the RFXtrx plugin. If they are not set then get_device_state() is probably returning undefined. If the variables are not being set then perhaps the serial communication is not working. On startup the plugin sends a mode command to the RFXtrx which responds with all of the settings. If this command is not sent or the response is not received nothing will work.

Thats whats so weird, i can’t find any function other than FW read that doesnt work… i’m recieving and sending, changing protocols, all is well…

Not too big of a deal though, it works… Only thing i miss is the icons… How do i change icons?

Which icons would those be?

If they’re for child devices created by the plugin (or anything else, for that matter) they need to be in the /cmh-ludl/icons folder.

I see the icons in the folder, but they’re not used for some reason.
I left the RFX plugin in “auto create” over night, and today found that sensors come in with 100’s of instances of the same sensors.

It seems that theres more issues than just the FW variables… Can this be related to me installing openluup in /home rather than /etc?

How do I move it to /etc? Is there a way to uninstall openluup completely and reinstall? Havent done much more than testing, so its no problem…

Edit: Made the move to /etc/, still the same issues.

Yes, you can actually install openLuup anywhere.