You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a method to open an interactive console (like binding.irb) in the openhab production environment?
I found https://github.com/openhab/openhab-jruby/blob/main/docs/testing.md#irb but it looks like it is meant for the testing instance only? E.g. all the gems (needed to run it) and jruby must be installed already or provided by openhab since otherwise my rules wouldn't run or not?
I'd like to test stuff like MyItem.changed_since?(...) inside an interactive console and evaluate the output. (I know I could write rules that eg output it every second to the logs etc. but I feel an interactive console would be neater!).
Is this possible?
The text was updated successfully, but these errors were encountered:
I've long thought about somehow hosting an IRB session inside a running openHAB instance, but never implemented such a thing. What you linked to is the closest thing, and in some ways even better (and in the same ways even worse). It does require you to install JRuby separately from openHAB, but then it loads up your actual openHAB config into a detached, limited instance of openHAB, allowing you to interact with your items without accidentally annoying your spouse by having them actually forward to linked channels! I use this quite often when writing a new feature for the helper library to explore what's actually possible against openHAB's classes.
Perhaps https://github.com/pry/pry/wiki/Remote-sessions will just work? You'd need to add the pry-remote gem inside OpenHAB, and then have a separate Ruby installation in order to connect to it (which can be any Ruby version, as I understand). So still a bit more work than IRB hosted through say openhab-cli, but at least it would actually be running inside your prod openHAB instance.
Is there a method to open an interactive console (like
binding.irb
) in the openhab production environment?I found https://github.com/openhab/openhab-jruby/blob/main/docs/testing.md#irb but it looks like it is meant for the testing instance only? E.g. all the gems (needed to run it) and jruby must be installed already or provided by openhab since otherwise my rules wouldn't run or not?
I'd like to test stuff like
MyItem.changed_since?(...)
inside an interactive console and evaluate the output. (I know I could write rules that eg output it every second to the logs etc. but I feel an interactive console would be neater!).Is this possible?
The text was updated successfully, but these errors were encountered: