Keyboard Shortcuts
Likes
- Jmriusers
- Messages
Search
Re: Controlling Alexa (Amazon) via JMRI
This is what ChatGPT suggested, I do not know if this is accurate or if it will work. It is supposedly Python, not Jython, so not sure if it would run within JMRI.
?
import java.net.HttpURLConnection
import java.net.URL def trigger_url(url):
? ? try: ? ? ? ? connection = java.net.URL(url).openConnection() ? ? ? ? connection.setRequestMethod("GET") ? ? ? ? connection.setDoOutput(False) ? ? ? ? connection.connect() ? ? ? ? response_code = connection.getResponseCode() ? ? ? ? connection.disconnect() ? ? ? ? return response_code ? ? except Exception as e: ? ? ? ? print("Error triggering URL:", e) ? ? ? ? return None # URL to be triggered in the background
url = "https://api-v2.voicemonkey.io/trigger(url) --
Heath @ Human[c]ity |
Controlling Alexa (Amazon) via JMRI
I would like to create some timed routines in JMRI that sends commands to Alexa to run various routines. For example, at start of session, I can start the fastclock, and then at appropriate times, it will trigger Alexa.
?
My plan to do this is using "Voice Monkey" as the translator. VM allows you to send a command via a web link, which then will trigger Alexa.
?
So what I need to do is get JMRI to run a weblink in the background (not open a web browser). I had asked this question a few years ago and apparently this was coming, but not available yet.
?
Is there a way within JMRI that at a certain time on the Fast Clock, I can send a trigger using a weblink () but that will not open a browser, it will just happen in the background?
?
Thanks
--
Heath @ Human[c]ity |
Re: Current state of DMX support on Apple Silicon Macs?
#mac-m1
#powerline
I’ve done some experimenting with this on an M1 Mac. Note that I don’t have a DMX512 box or anything like that, so I’m just testing whether a connection will _try_ to open.
1) When running an Intel Java install via Rosetta-2, both the Powerline DMX512 and Anyma DMX512 connection types seem to start up fine. 2) When running an Apple Silicon Java install natively, the Powerline DMX512 connection type seems to start up fine. 3) When running an Apple Silicon Java install natively, the Anyma DMX512 connection type fails to start because the LibUsb included with JMRI for Apple Silicon is not loading properly. So that’s good news / bad news / meh news a) The good news is that you can use an Apple Silicon Mac with Rosetta 2 and (probably) have a working native connection b) More good news is that can (probably) use an Apple Silicon Mac natively with a Powerline connection, though I don’t know what the difference between those two connection types is. c) The bad news is that Rosetta 2 won’t be supported by Apple forever. Some future OS upgrade will remove it, at which point you won’t be able to use a native Anyma connection if you upgrade to that OS version. d) The meh news is that we might eventually be able to fix this. We are distributing a .jar file that _should_ contain the necessary code, but for some reason it’s not working. That libusb4java file is maintained by a different software project and they might eventually provide a version that works on Apple Silicon. Or somebody might take that open-source () and create one themselves. I can look into that some, but I don’t have DMX512 hardware or type-specific knowledge so I’m in no position to really test anything, Sorry there doesn’t seem to be a more explicit answer. Bob — Bob Jacobsen rgj1927@... |
Re: Tracking Car Movement
#operationspro
If you have logging turned on, you can look to operations\logger\rollingStock and find the car you're looking for. it will list, in csv format, all of the moves of the car since you started logging. |
Re: Current state of DMX support on Apple Silicon Macs?
#mac-m1
#powerline
On Sat, Mar 15, 2025 at 05:39 PM, danielb987 wrote:
Thank you, Daniel. I had yet to find the documentation for lighting controls from LogixNG, and the cited example of triggering light objects based on the fast clock was?very helpful.
?
I hadn't noticed that the standard light controllers that you can associate with lights also include a mode. For the lights that simply turn on/off at a given intensity and at a given fast clock time, this should work quite nicely with no scripting necessary. Very cool.
?
For variable intensity lights that need to brighten or dim over time, the could be finicky to adjust, especially for the RGBWW strip lights where each color component is a separate light to control. I'll have to experiment with it.
?
?I think my strategy will be to use the available light controllers for simply light control and a LogixNG script for the lighting transitions that demand more flexibility than the light configuration and available controllers provide. |
Re: Current state of DMX support on Apple Silicon Macs?
#mac-m1
#powerline
开云体育The issue I had found with DMX was that not all DMX dongles are equal. But worse, I was working from Windows systems. Due to lower level libraries the only way I could get it working was:
? If the other method had worked, and I think it would from Mac or Linux, would be just sending that buffer once every time something changed. The device would then have been repeating it to the DMX devices. ? Net result is I have no idea if it works or not on Mac or Linux. Granted right now I’m tired and might be able to think of more things tomorrow. ? -Ken Cameron, Member JMRI Dev Team
? ? |
Re: Current state of DMX support on Apple Silicon Macs?
#mac-m1
#powerline
开云体育Paul, I don't know the answer to your question. But I think there has
been progress in this matter. > The ultimate goal is to have the layout lighting run in two
modes: Look at the LogixNG action "Light intensity". On the documentation page for "Light intensity", there is an example on how you can setup LogixNG to have the intensity of the light in the room follow the fast clock. Daniel
On 2025-03-15 21:44, Paul Anderson
wrote:
|
Re: Adding Signal Heads @ Dbl Slip using "Set Signal Heads at a Slip" Tool
#ssl
#layouteditor
Paul, I have reviewed your upload. Block 1 includes track segments attached to the connection points on the slip. ?The subsequent anchor points create block boundaries. SSL requires signal heads at anchor point block boundaries. ?You do not have the required signal heads at the block boundary anchor points which results in the error messages. The simple fix is to change the block assignments for the track segments to match the neighbor track segments. ?This eliminates the block boundaries. Note: ?Signals are used to protect entry into points of conflict. ?These are normally turnouts and level crossings (diamonds). ?There is rarely any requirement to protect the exit from a turnout or level crossing. ?You don't want to enter if you cannot exit. Dave Sand ----- Original message ----- From: Dave Sand <ds@...> Subject: Re: [jmriusers] Adding Signal Heads @ Dbl Slip using "Set Signal Heads at a Slip" Tool #ssl #layouteditor Date: Friday, March 14, 2025 4:04 PM Paul, My understanding is that the message occurs when it is not possible to find a "next" signal head to be protected. If you upload the layout data xml file to the group's ProblemsBeingWorkedOn file folder, it might be possible to identify the issue. Dave Sand ----- Original message ----- From: "Paul Young via groups.io" <windscape360=[email protected]> Subject: [jmriusers] Adding Signal Heads @ Dbl Slip using "Set Signal Heads at a Slip" Tool #ssl #layouteditor Date: Thursday, March 13, 2025 6:51 PM Good evening Moderators and group: ? My setup: Win10, Digitrax PR3 Digitrax DCS210, DCS50 (throttle/ booster only), DT400, DT500 SE8C x2, BDL16 x2, SE74 x2, DS64 x4, UR90 x2, UP5 Signals are Digitrax SHABC and SH2AB Panel Pro 5.2+R760b98537f, java 11.0.19 ? The layout is essentially a reversing loop to reversing loop arrangement, with SSL installed over most of the layout and working correctly. I have a Layout Editor panel which correctly displays occupancy, powered turnout positions and signal aspects and correctly match what is displayed on the physical layout. ? There is 1 powered double slip that I am now trying to add SSL to using the "Set Signal Heads at a Slip" Tool. I used an earlier post by Dave Sand as a guide ... #233359. However, I get the following error: "Cannot set up logic because next signal (in or at the end of block "Block_1" is apparently not yet defined" There are 4 block boundaries defined (the slip is part of Block_1 as well), and signal heads at all of these boundaries. If I try to "Set Signal Heads at a Block Boundary", I get an error message that the signal heads in question are already in use on the layout diagram. ? I placed most of the signal heads on the layout diagram and created the SSL without using the "Set Signal Heads at a Block Boundary" or other tools ... could this be part of my difficulty? Perhaps it's time to move to SML? I would be grateful for any suggestions as to how to proceed from here. Thank you all, Paul Young |
Re: Increase length of Car Type
#operationspro
On Fri, Mar 14, 2025 at 05:06 PM, Michael Geldert wrote:
I shut down JMRI, then amended the operations.XML file, saved the file then restarted JMRI but it didn’t take. When you reopen the file, is the new field length still modified?? Make a small change in the Setting window and press save.? The operations.xml file should contain the date and time of the last save.? That should confirm that you modified the right file.
?
Dan |
Re: Increase length of Car Type
#operationspro
On Sat, Mar 15, 2025 at 09:57 AM, Michael Geldert wrote:
For car type I can enter ‘boxcar-materials’ but when I try to enter car type ‘boxcar materials’ it limits me to 12 characters.? "boxcar-materials" will print as "boxcar".? And "boxcar materials" will print as "boxcar materials".
?
Dan |
Re: Car Last field
#operationspro
On Sat, Mar 15, 2025 at 12:20 PM, Jon Schmidt wrote:
Why take the trouble to log but not update the Last field? The "Last Field" is the last time the car was moved by the program.? It has to be part of train, and then delivered? to a track.? The program also doesn't increment the "Move" count when you manually change a car's location.
?
When tracking rolling stock, some operators "forget" they manually moved a car, so the log has to record all car movements, including manual.
?
Dan |
Current state of DMX support on Apple Silicon Macs?
#mac-m1
#powerline
Greetings All,
?
After an extended late-night dive into the group archive, I can't seem to find a final word on whether the JMRI DMX-via-USB support (whether Anyma or Powerline) works when using Java for ARM on Apple Silicon Macs (M1-M4 processors). There are a couple of 2022 threads that mention that it was broken, but the only possible response I found in the code was a commit for release 5.3.3 that appeared to be a minor change for some component of DMX support. It didn't look like a smoking gun, but looks can be deceiving.
?
I'm asking because my 2020 Intel iMac will likely need to get replaced with a M4 (or later) unit sometime between now and when my layout is getting built. I can certainly buy a USB-to-DMX dongle, a decoder, some lights, and play around with it, but that won't be a true acid test since I'm still back in Intel land.
?
The ultimate goal is to have the layout lighting run in two modes:
My assumption (at the moment) is that this functionality would likely require either a LogixNG or Python/Jython script that listens to the "maintenance mode" memory value and the fast clock value.
?
Thanks in advance.
?
Paul
? |
Locked
File /ProblemsBeingWorkedOn/240499_Paul_Young/ONEFORTYONE.xml uploaded
#file-notice
Group Notification
The following items have been added to the Files area of the [email protected] group. By: Paul Young <windscape360@...> Description: |
Re: DIY DCC decoder setting window
#scripting
#definitions
On 3/15/2025 2:48 PM, Gareth Lee via groups.io wrote:
Could anyone point me to where the code for the Turnout Control window is (so I can copy / mod) or suggest how I would control turnouts and show their current state like this window does (as in, what functions do I need to use in the script).The "source code" for the "Turnout control" is found at jmri.jmrit.simpleturnoutctrl.SimpleTurnoutCtrlFrame.java . This is Java code, not "Jython", so it would not be "directly" usable as a "script". I am assuming that you know how to find that part of Java's source code. If that is not the case, let us know, and someone can provide an appropriate link the appropriate file. |