The shell execution protocol has a bug, which causes that after update of the command from the designer the controller needs a cold reboot. This is very old bug, but still there obviously.
Kind regards,
Michal Rutka
> me
> Hello Olivier,
>
> Sorry it has taken me a few days to reply, I've been busy working on a client's project.
>
> I'm really hoping that you can get up and running with this simple CanvasJS based solution really quickly.
>
> I'll assume you are running a Linux based OS for your controller.... If you are running a Windows based system then you will have to modify the csvmaker.sh file to turn it into a compatible BATCH (.bat) file. I'm sure it can be done, but I don't know how. Maybe someone else can advise?
>
>
> There are a few steps to follow to get this working.
>
> You need a catch-all command in OpenRemote that a rule can send all the harvested data to, which in turn will pass the data to the Linux script file for conversion into appended csv files.
> (For some reason I needed to map that command to a dummy custom sensor before it worked)
>
> Sensors that produce numeric values, that have been named with the suffix .graph
>
> Custom sensors can be used to map text entries to numeric values.
> For example, I have Velbus devices that produce text outputs like "pressed" & "released"
> I create custom sensors that map these to values.
> 10 = pressed
> 0 = released
>
> A rule to catch all sensors with .graph at the end and push the data to the OpenRemote command.
>
>
> First of all, I suggest that you download and unzip the this file into your webapps folder and test that you can access the graphs that it will create,
>
> your finished webapps folder should have :-
>
> controller
> webconsole
> jscanvas
>
>
>
> Using a web browser, navigate to " http://{controller address}:8688/jscanvas "
>
> You should see a simple 2 frame web page with a selection of graphs, produced from the CSV data. Similar to the PDF file attached,.
>
>
> Once you have confirmed you can access the graphs, double check that the two script files within your jscanvas folder have their executable bits set.
>
> chmod +x csvmaker.sh
>
>
> chmod +x zipcsv.sh
>
>
>
> you can test the csvmaker.sh script works correctly by using this command line instruction
>
>
> ./csvmaker.sh --value=12345 --file=test
>
> You should now have a file in the csv folder called test.csv with a single line in it that has the time and date you actioned the script, a comma and the value 12345
>
> Now copy the jscanvas_v1.drl file into your rules folder, so that when your controller restarts it will add the rule to the knowledge base.
> ../../webapps/controller/rules
>
>
>
> The next part is to get OpenRemote to pass data.
>
> Please create a command in designer that looks like this :-
>
>
>
>
>
> Command name :-
>
> csvmaker
>
> Protocol :-
>
> Shell execution protocol
>
> path :-
>
> #### Note that the path must be the exact path from root to the csvmaker.sh script file.
>
> #### WITHOUT a preceding "."
>
> #### Your path may differ from what is shown here
>
>
>
> /opt/OpenRemote-Controller/webapps/jscanvas/csvmaker.sh
>
>
>
> command :-
>
> --value=${param}
>
>
>
>
> Polling Interval ;- BLANK
>
>
> Regular Expression :- BLANK
>
>
>
> Sensor name :- (I found I have to create a custom sensor for this to work, which I called "Dummy")
>
> Dummy
>
>
> Just because I did, please create a custom sensor names Dummy and link it to the csvmaker command that you created.
>
> --
> You received this message because you are subscribed to the Google Groups "OpenRemote" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
openremotecommu...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/openremotecommunity.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/openremotecommunity/5abe1c0f-19d2-4995-bcf1-60549992b521%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.