USB RFXtrx on openLuup/RPi?

Is the USB RFXtrx plugin likely to work with openLuup on a RPi? Any advice before I take a deeper look? I’m referring to this plugin: http://forum.micasaverde.com/index.php/topic,9563.msg63795.html#msg63795

I see this thread on openLuup serial connections - if I am very lucky, that’s all it might need? http://forum.micasaverde.com/index.php/topic,39088.msg292406.html#msg292406

Or is there a better way to communicate on 433MHz with openLuup?

thanks!

Any updates on this? I could use it too…

Is there a way to install this plugin?

I’m guessing that you can install it by finding the latest files and putting them on your openLuup system (possibly from here: beta3 in tags – RFXtrx Gateway ?). Then create a device as usual in openLuup.

Getting it to work is the harder part of it. If it works, let me know.

My main interest in this was for temperature sensors, but I’m currently leaning towards the Xiaomi sensors instead. If they don’t work out, I may come back to this.

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:

console.log(firmwareType)

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.