@Russ Thanks for getting me started.
Also meant to post commands must be URL encoded even though it isn't a URL.
Verbal command would be something like "Alexa, turn Loft Lights 40 [percent]

Best posts made by karnold69
-
RE: Dimming X10 modules
-
RE: Intermittent results
@Russ
Been busy testing and trying things. Thanks for the logging script. Here is a bat file script:
if "%1"=="on" curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~%"K12% on%"
if "%1"=="off" curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~%"K12% off%"
echo "Study light script ran with param %1" >> c:\scripts\x10_log.txtLike all of my scripts, they're a cut and paste from your forum with the name, house code and unit codes changed. I had the same results (intermittent) running it from a command prompt. But the script log showed me your end is working 100%. Problem is on my end. Started after a Win 10 update.
Also tested the phase coupler I installed in the breaker box. It's working fine.
On a whim, I reformatted the SSD in the COOFUN mini computer as GUID instead of MBR and restored with Acronis. Now I'm getting about 95% reliability. May do it again with an older backup and keep a closer eye on updates. I disable all the related services and tasks with a utility called execTI (execute trusted installer). Also added registry entries for NoAutoUpdate.
If I can't get back to 99.9% reliability I'm going to switch to my other computer I have registered with TRIGGERcmd. It's running Windows 7 64-bit. It's in use as a Plex server so I wanted to keep the X10 stuff on a dedicated computer.
BTW, talked to the X10 company about the new hub they're working on. They were turned down by Amazon to interface it with Alexa! And yet you were able to get approved! Nice!
Thanks again for your help.
Ken
Latest posts made by karnold69
-
RE: Dimming X10 modules
@Russ Thanks for getting me started.
Also meant to post commands must be URL encoded even though it isn't a URL.
Verbal command would be something like "Alexa, turn Loft Lights 40 [percent] -
RE: Dimming X10 modules
@Russ Sorry, gave you bad intel. The DIM command requires a percentage parameter. To complicate things more, when the PLM receives DIM 60, it changes it to DIM 63.
e.g. from log
Transmit J Dim 60(Loft Lights)
Receive J Dim 63(Loft Lights)
X10 Commander sends both, dimming it twice. The Active Home software shows it dimmed to 13%. It's not good at math!
Also, a light has to be on to accept DIM/BRIGHT commands.
I documented everything in the bat file so others can use it. I'm using an X10 CM15a USB PLM with X10 Commander and Active Home Pro software.
After extensive trial an error, here's the resulting batch file that works:
batch
@echo off
if "%1"=="on" curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~%"J7% bright% 100%"
if "%1"=="on" exit \b
if "%1"=="off" curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~%"J7% off%"
if "%1"=="off" exit \bset "level=%1"
:: Ensure the input is a valid percentage (10, 20, ..., 90)
if "%level%"=="10" goto valid
if "%level%"=="20" goto valid
if "%level%"=="30" goto valid
if "%level%"=="40" goto valid
if "%level%"=="50" goto valid
if "%level%"=="60" goto valid
if "%level%"=="70" goto valid
if "%level%"=="80" goto valid
if "%level%"=="90" goto validecho "Invalid dim level. Please enter 10, 20, 30, ..., 90." %date% %time% >> c:\scripts\x10_log.txt
exit /b:valid
:: change input value to legitimate values. (10% is valid as 10%)
if "%level%"=="20" set level="21"
if "%level%"=="30" set level="31"
if "%level%"=="40" set level="42"
if "%level%"=="50" set level="52"
if "%level%"=="60" set level="63"
if "%level%"=="70" set level="73"
if "%level%"=="80" set level="84"
if "%level%"=="90" set level="94"
:: light must be on to accept DIM/BRIGHT commands
curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~%"J7% on%"
:: set a delay so my phase coupler/repeater in my breaker box has time to repeat command before receiving another
ping -n 4 localhost >nul
:: bring light to full brightness. If light was previously dimmed, it will dim it more.
curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~%"J7% bright% 100%"
ping -n 4 localhost >nul
curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~%"J7% dim% %level%%"::echo "Dimmed to %level%" %date% %time% >> c:\scripts\x10_log.txt
-
RE: Dimming X10 modules
@Russ
That doesn't work with X10. It needs to receive an "on" command followed by X number of "dim" commands as in the example I posted.. I did try Alexa, ceiling lights 60 percent and logging showed it passed a 60 parameter. When I used the "dim" parameter it logs as "parameter undefined." Although it works clicking the "dim" button on your site. -
Dimming X10 modules
I finally got back to trying this. Found that you send an "on" command, following by "dim" commands. Each "dim" command dims the lights by 10%.
e.g.
if "%1"=="dim" curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~%"K4% on%"
if "%1"=="dim" curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~%"K4% dim%"
if "%1"=="dim" curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~%"K4% dim%"
if "%1"=="dim" curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~%"K4% dim%"
to dim to 70%.
This works clicking the dim button on your site:
"Ceiling light script ran with param dim" Thu 02/06/2025 13:08:43.20
I had Alexa discover devices to pick up the new parameter, but when I give the command "turn ceiling lights dim" I get this in logging:
"Ceiling light script ran with param undefined" Thu 02/06/2025 13:09:23.64
Apparently your TRIGGERcmd Home Automation skill doesn't pass anything but on/off. Be great if this was changed,
Thanks,
Ken -
RE: Intermittent results
@Russ I restored to an older backup and uninstalled update KB5022282. It's working MUCH better. Although even though I deleted everything in the update folder Windows/SoftwareDistribution/Download, Windows installed 2 other updates when I rebooted to remove the update. Also, when I give a command from on echo dot and it doesn't work, then give the same command to another echo it works. Probably just from giving the command again as they all go to the same computer/CM15a. Things are working better (but not perfect) today.
If you know a way to prevent windows updates I'd appreciate the info. If not appropriate on this forum, I can be reached at ken@homewithwine.com. -
RE: Intermittent results
@Russ
Been busy testing and trying things. Thanks for the logging script. Here is a bat file script:
if "%1"=="on" curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~%"K12% on%"
if "%1"=="off" curl http://127.0.0.1:8086/?x10command=DEVICE~sendplc~%"K12% off%"
echo "Study light script ran with param %1" >> c:\scripts\x10_log.txtLike all of my scripts, they're a cut and paste from your forum with the name, house code and unit codes changed. I had the same results (intermittent) running it from a command prompt. But the script log showed me your end is working 100%. Problem is on my end. Started after a Win 10 update.
Also tested the phase coupler I installed in the breaker box. It's working fine.
On a whim, I reformatted the SSD in the COOFUN mini computer as GUID instead of MBR and restored with Acronis. Now I'm getting about 95% reliability. May do it again with an older backup and keep a closer eye on updates. I disable all the related services and tasks with a utility called execTI (execute trusted installer). Also added registry entries for NoAutoUpdate.
If I can't get back to 99.9% reliability I'm going to switch to my other computer I have registered with TRIGGERcmd. It's running Windows 7 64-bit. It's in use as a Plex server so I wanted to keep the X10 stuff on a dedicated computer.
BTW, talked to the X10 company about the new hub they're working on. They were turned down by Amazon to interface it with Alexa! And yet you were able to get approved! Nice!
Thanks again for your help.
Ken
-
RE: Intermittent results
@Russ This morning I gave the "patio lights off" command multiple times, and it never worked (although they did turn on.) Here's the list:
Command ran Thu Mar 16 2023 07:22:25 GMT-0500 (Central Daylight Time)
Trigger sent from Alexa Smart Home params = off Thu Mar 16 2023 07:22:25 GMT-0500 (Central Daylight Time)
Command ran Thu Mar 16 2023 07:19:54 GMT-0500 (Central Daylight Time)
Trigger sent from Alexa Smart Home params = off Thu Mar 16 2023 07:19:54 GMT-0500 (Central Daylight Time)
Command ran Thu Mar 16 2023 07:19:49 GMT-0500 (Central Daylight Time)
Trigger sent from Alexa Smart Home params = off Thu Mar 16 2023 07:19:48 GMT-0500 (Central Daylight Time)
Command ran Thu Mar 16 2023 07:19:43 GMT-0500 (Central Daylight Time)
Trigger sent from Alexa Smart Home params = off Thu Mar 16 2023 07:19:43 GMT-0500 (Central Daylight Time)
Command ran Thu Mar 16 2023 07:19:15 GMT-0500 (Central Daylight Time)
Trigger sent from Alexa Smart Home params = off Thu Mar 16 2023 07:19:15 GMT-0500 (Central Daylight Time)I'm using the TRIGGERcmd Smart Home skill and the TRIGGER command skill. This has been working fine for 10 months, very reliable.
I'm wondering if a Windows 10 update is causing the problem. I go to great lengths to prevent updates, but one slipped through that caused X10 Commander to disappear from the sys tray when I minimized it. I backed the update out and it was fine although Windows indicated "not all of the update was removed."
I'm running your software on a dedicated COOFUN mini computer. Wish I could run Windows 7 on it, might solve the problem.
-
Intermittent results
In about the last week my X10 commands have worked intermittently. Nothing changed here, running the software on a dedicated mini computer for about 10 months. Any other such reports? Has your customer base grown needing more servers on your end? Thanks.
Ken -
RE: X10 devices with Alexa TRIGGERcmd Smart Home skill
@russ Do you know of a .bat file parameter to turn a light on dim?