Windows command line control

LightwaveRF Communi… > Forum > LightwaveRF Hackers > Windows command… > Page 8

LightwaveRF Community: Welcome Forums LightwaveRF Hackers Windows command line control

This topic contains 122 replies, has 12 voices, and was last updated by  jamieburchell 4 months ago.

Viewing 15 posts - 106 through 120 (of 123 total)
  • Author
    Posts
  • #19627
     jemhayward says:

    jemhayward
    Participant

    Yes, that works as expected!

    #19631
     jamieburchell says:

    jamieburchell
    Participant

    Erm. If I was in that situation I’d probably pepper my lwrf.cmd file with the word pause on various lines to see if I can read anything or get any clues.

    Maybe put a pause before the exit 1 line…

    I’m really clutching at straws here lol

    #19632
     jemhayward says:

    jemhayward
    Participant

    I’m (almost) glad its not me being stupid…

    I’ll put pauses everywhere to see if I can detect what is happening – had’t thought of that – which is daft, as I do that all the time at work…

    #19633
     jemhayward says:

    jemhayward
    Participant

    Bingo!!! fixed it. Put the pause before Exit and it revealed the fact that it can’t find ncat, even though its in the path, and can be found from a command prompt from anywhere. Dropped the ncat.exe and a couple of DLLs into c:\systemautomation and things now work…

    many thanks for help and patience!

    #19634
     jamieburchell says:

    jamieburchell
    Participant

    Glad you fixed it :)

    That’s strange though. Out of interest what does:

    echo %path%

    Show you in your batch file?

    Also I think you can avoid my batch file closing yours (and not reaching your pause previously) by using “call” I.e.

    call lwrf params

    Hope that helps

    Your comment about explaining to the wife why you can’t use turn off the light made me smile. It’s so much cooler spending 2 days trying to run a batch file!

    Jamie

    #19635
     jamieburchell says:

    jamieburchell
    Participant

    Just a thought but perhaps adding the paths to your system path variable instead of user might work if the batch file isn’t being called by your user.

    #19636
     jemhayward says:

    jemhayward
    Participant

    Ah, I think that may be the ultimate issue. However, putting everything in the folder is working, and it keeps all the tools in the same place (I keep robocopy in there too, and a couple of other things) helps, as I then back up that folder and I know I’ve got everything I need to transfer it to another PC if things die (as they did once before!)

    #19887
     jamieburchell says:

    jamieburchell
    Participant

    @jemhayward Just a note to say I just spotted that I managed to mangle the lwrf.cmd file at some point as it had Linux line endings (LF) instead of Windows style (CRLF). This would have caused you issues when opening in Notepad. I’ve corrected this in 6.3!

    #19888
     Gerardwr says:

    Gerardwr
    Participant

    Hi Jamie,

    I am looking for some info on the response of the Wifilink when it receives the “xxx,!F*L” and “xxx,!F*r” command.

    I am currently working on a Wifilink simulator on a Raspberry in NodeJS. Your cmd is a valuable reference for the correct format of the requests from the App to Wifilink. Thanks for sharing it!

    I have scanned the internet for many hours now but found absolutely no reference to the response that the App receives when it issues the “xxx,!F*L” command for linking the App to the TRV.

    I found some info on the response of the “xxx,!F*r” here:
    https://code.google.com/p/lightwaverf-openapi/wiki/Heatingdevices

    But no info on the response for “!F*L”.

    Do you have any info on this response, or do you own a TRV on Wifilink you can easily issue the command to?

    Kind regards,
    Gerard.

    #19889
     jamieburchell says:

    jamieburchell
    Participant

    Hi Gerardwr

    I owned a TRV just long enough to analyse the network packets going back and forth and adding to my script but returned it pretty soon after I realised just how noisy it was.

    I can’t remember exactly, but I would think the response is the same as the other acknowledgements i.e:

    123,OK

    Where 123 is the number used in the issuing command. My script always checks for this response and I don’t remember getting the no reply message from it when I was testing this out.

    I’m not sure about the other command I couldn’t find a reference to that one. What does it do?

    Cheers
    Jamie

    #19890
     jemhayward says:

    jemhayward
    Participant

    @jemhayward Just a note to say I just spotted that I managed to mangle the lwrf.cmd file at some point as it had Linux line endings (LF) instead of Windows style (CRLF). This would have caused you issues when opening in Notepad. I’ve corrected this in 6.3!

    Ah, good, many thanks… glad it wasn’t me! I’ve done that many times myself.

    #19893
     Gerardwr says:

    Gerardwr
    Participant

    Hi Jamie,

    Thanks for your reply.

    So you returned your TRV too, huh?

    I do not own a TRV nor a Wifilink, I coded a Wiflink-simulator and wanted to add a TRV-simulator but am stuck on this issue.

    In the past days I contacted several persons who HAD a TRV but returned it because they were unhappy with it :-(

    Returning “xxx,OK” to the App is not sufficient for the App to link to the heating device. Tried it, but the App reports “Linking Failed”. Other commands like R1D1F0, etc run happily with the xxx,OK response to the App.

    So the F*L command is used by the App for a “Link request”. When this fails no other “heating”commands are sent by the App.

    The F*r command seems to be used by the App “for getting the temperature of the TRV (it’s on the website that I linked in my message). I could not verify that this command is actually sent by the App because the Linking Failed.

    Any other suggestions maybe?

    Or other readers on the forum that still have a TRV and have the opportunity to test the F*L command and share the response?

    Greetings,
    Gerard.

    #20747
     TheAndyMac says:

    TheAndyMac
    Participant

    Could this approach be taken and converted into a series of scriptlets in PowerShell with the built in features in Windows (without ncat), this could then be used to provide both command line functionality and to build much more complex apps with PowerShell. Unfortunately, I’m not experienced enough a programmer to do this myself (and short of time at the best of times).

    #20749
     jamieburchell says:

    jamieburchell
    Participant

    Hi

    Apart from some knowledge around DOS/Windows Command and some VB I’ve not delved in to the world of Windows programming so to be honest I don’t know the answer to that. If PowerShell can expose functionality for sending UDP packets over the network then I assume it’s possible.

    Jamie

    #21458
     jamieburchell says:

    jamieburchell
    Participant

    Just a quick note for anyone still using this; I’ve updated this with support for setting thermostat temperature and modes as well as some other previously unimplemented features such as “full lock” on switches.

    Cheers
    https://github.com/jamieburchell/lwrf.cmd

Viewing 15 posts - 106 through 120 (of 123 total)

You must be logged in to reply to this topic.