Help for send simple command to camera

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Help for send simple command to camera

by GiovanniG on Mon Nov 19, 2018 3:02 am

Hi all, sorry I'm beginner here,
my problem is an uncompatibility between rcordere and some cameras, when the recorder reastart it produces a particular string and cameras unexpectly change their Time zone to +12 instead of +1. The only way I have for fix it is to open the web page of camera and manually make the change. Unfortunately the problem is huge because I set my day/night time with clock and I'll have no IR during the night and B/W image during the day. Also this I can't solve for some reasons.

Making a macro with iMacros give this result:
URL GOTO=http://admin:password@addressofcamera.domain:8401/system.html
TAG POS=1 TYPE=SELECT FORM=NAME:fmSetTime ATTR=NAME:i_TimeZone CONTENT=%GMT+01:00
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:fmSetTime ATTR=ID:oApply

1) It works, sometimes, because the execution is so slow and the cpu goes so high that the load of page goes in timeout. If I open the same address manually it open istantly, no problems. Maybe I have some debugs activated, or something else to set?

2) I have other cameras to set, same "script" just the TCP port to change, how can I concatenate them?
3) Is it possible to pen firefox, execute the script and close firefox? Should I have enabled the "file save support" forit?
4) Can I use the iMacros for Firefox Command Line Support to open firefox and pass him by command line the "script"? Can somebody kindly type here an example? thank you!
5) Should I pay for have the result I expect?

Thank you
GiovanniG
 
Posts: 2
Joined: Mon Nov 19, 2018 2:37 am

Re: Help for send simple command to camera

by chivracq on Sun Nov 25, 2018 5:48 am

GiovanniG wrote:Hi all, sorry I'm beginner here,
my problem is an uncompatibility between rcordere and some cameras, when the recorder reastart it produces a particular string and cameras unexpectly change their Time zone to +12 instead of +1. The only way I have for fix it is to open the web page of camera and manually make the change. Unfortunately the problem is huge because I set my day/night time with clock and I'll have no IR during the night and B/W image during the day. Also this I can't solve for some reasons.

Making a macro with iMacros give this result:
Code: Select all
URL GOTO=http://admin:password@addressofcamera.domain:8401/system.html
TAG POS=1 TYPE=SELECT FORM=NAME:fmSetTime ATTR=NAME:i_TimeZone CONTENT=%GMT+01:00
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:fmSetTime ATTR=ID:oApply


1) It works, sometimes, because the execution is so slow and the cpu goes so high that the load of page goes in timeout. If I open the same address manually it open istantly, no problems. Maybe I have some debugs activated, or something else to set?

2) I have other cameras to set, same "script" just the TCP port to change, how can I concatenate them?
3) Is it possible to pen firefox, execute the script and close firefox? Should I have enabled the "file save support" forit?
4) Can I use the iMacros for Firefox Command Line Support to open firefox and pass him by command line the "script"? Can somebody kindly type here an example? thank you!
5) Should I pay for have the result I expect?

Thank you

I had seen your Thread when you had opened it and didn't react as you didn't mention your FCI (read my Sig...), but I see some "Firefox" mentioned somewhere...
FCIM...! :mrgreen:
=> Mention your FCI and I might still be able to share some "Thoughts" as your "Case" sounds a bit "interesting" actually... :wink:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7714
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Help for send simple command to camera

by GiovanniG on Thu Dec 06, 2018 7:06 am

THank you for reply, sorry to don't mention it, I run the latest possible versions, this is why I wrongly considered it not interesting
Win10 1803 64, Firefox 64 63.0.3
GiovanniG
 
Posts: 2
Joined: Mon Nov 19, 2018 2:37 am

Re: Help for send simple command to camera

by chivracq on Thu Dec 06, 2018 7:35 am

GiovanniG wrote:THank you for reply, sorry to don't mention it, I run the latest possible versions, this is why I wrongly considered it not interesting
Win10 1803 64, Firefox 64 63.0.3

OK, some Follow-up, more than 2 weeks later..., I'll have to "think" again, I don't remember what "Thoughts" I had about your Case, 2 weeks ago... :D

Yep, FCI not mentioned = I don't read and certainly not answer...

And "latest" is always a bit vague, but OK, you mention the exact Versions, good..., except that the iMacros Version is still missing... :roll:
FF_x64 v63.0.3 => That will be v10.0.2: 'Free' or 'PE'...?
(And try to answer a bit quicker than after 2 weeks again, or I'll probably lose interest in your Thread...)

EDIT:
Oh...!, but OK, I see a "Should I pay...?", so that means v10.0.2 'Free'...
But pfff, mention your complete FCI directly with all Versions next time, not my "Role" to have to play "little Detective" to find out...

FCI:
Code: Select all
iMacros for FF v10.0.2 'Free', FF v63.0.3_x64, Win10 v1803_x64.


OK, I'll post my "Thoughts" in a separate Post now that we finally have your FCI...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7714
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Help for send simple command to camera

by chivracq on Thu Dec 06, 2018 8:46 am

Quoting the Qt's again:
1) It works, sometimes, because the execution is so slow and the cpu goes so high that the load of page goes in timeout. If I open the same address manually it open istantly, no problems. Maybe I have some debugs activated, or something else to set?

2) I have other cameras to set, same "script" just the TCP port to change, how can I concatenate them?
3) Is it possible to pen firefox, execute the script and close firefox? Should I have enabled the "file save support" forit?
4) Can I use the iMacros for Firefox Command Line Support to open firefox and pass him by command line the "script"? Can somebody kindly type here an example? thank you!
5) Should I pay for have the result I expect?

1- I'm afraid you might be hitting some "faulty" Implementation in the 'URL GOTO' Command because of the ':' Chars contained in the URL for the 'admin:' and 'domain:' parts:
Code: Select all
URL GOTO=http://admin:password@addressofcamera.domain:8401/system.html


The 'URL GOTO' Command contains a Mechanism that goes checking and looking for a few "special" Chars like ':' and '-'...
It expects to find a ':' as part of "http://" or "https://" or "file:///" and it doesn't find it, it will assume that you specified the URL in your Script as "www.google.com" or "google.com" and iMacros will automatically prepend that URL with "http://".
Your URL does contain the "http://" Prefix, but I'm not sure if iMacros stops checking at the first ':' it encounters or if maybe it keeps looking and gets a bit "confused" by the 2 other ':' Chars contained in your URL, and tries to modify your URL into stg like:
Code: Select all
URL GOTO=http://adminhttp://password@addressofcamera.domainhttp://8401/system.html
... which the Browser will not understand and/or it will never find the "Page" which will result in a Timeout.

And that Behaviour and Checking even got modified in v10.0.2 compared to the previous Versions, the 'URL GOTO' is now doing a few other extra Checks on the URL Syntax.

You would need to observe when FF is loading the 'URL GOTO' if you see the URL being modified on the fly...
But if that's the Case, only "Solution" will be to report it as a Bug and hope it will be solved in some future Release...
But hum..., that "faulty Implementation" of 'URL GOTO' that I mentioned was already reported maybe 2 years ago and was never addressed by Dev afaik, the only Solution then was to decompile and modify the Core Code of the Add-on by the User at that time, you have some Thread on the Forum about "view-source:https://"...

2- "concatenate", hum..., not really, you'll need a separate 'URL GOTO' Command for each Camera, but you can specify all URL's/Parameters in a '.CSV' File that you can use as a DataSource if you have the 'PE' Version, or that you could hard-code as Vars at the beginning of your Script (if you have the 'PE' Version) or as (concatenated) String/Array in only one Var if you have the 'Free' Version to split back using 'EVAL()' to use for each separate 'URL GOTO'.

3- & 4-: Command Line is not supported anymore/yet in v10.0.2 for FF, but there is a (fairly cumbersome) Workaround explained in the Wiki (+ a few relevant Threads on the Forum) where you can embed your Script in some local 'HTML' Page and you can start FF opening that specific Page from the Command Line / '.BAT' File / Task Scheduler.

If that's an Option for you, all that Functionality is supported using FF v55.0.3 + iMacros for FF v8.9.7, if you wan/can install a parallel FF FCI with FF55, maybe using FF Portable. (And there is a mini-Chance that the 'URL GOTO' Command might behave a bit differently also... Would need to test...)
Or instead of FF55, install Pale Moon for which the v8.9.7 + v8.8.7 + v8.8.2 Versions work... (on PM27/26).

5- Well the 'PE' (paid) Version will allow you to use Local File Access, needed if you want to use a '.CSV' File as DataSource, but the Behaviour for the 'URL GOTO' Command will be the same.

That's all I can say for the moment, as a "Generic Feedback"... I would need to be able to have a look myself and do some Testing myself with the Page(s) to see how the Page and iMacros behave to do any further "Digging"/"Thinking"... :wink:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7714
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros for Firefox

Who is online

Users browsing this forum: No registered users and 14 guests

-->