Enable/Disable sharing

#1

How is it possible to enable/disable the data sharing from the command line ? I tried to change the config.json in /opt/settings/config and rebooted the raspishake but it continue to send data

#2

hello,

this has never been considered since, if you can log in, can you also not run the front-end configuration manager and turn off data forwarding the intended way? in a browser:

  1. proceed to the URL http://rs.local, or http://*ip-address*
  2. go to the settings page
  3. un-check the ‘forward data’ check-box
  4. save and restart

data forwarding will be turned off.

cheers,
richard

#3

The devices are in the field and we have only SSH connection, so we cannot open a browser. I imagine however that the URL page will change some settings and store in the configuration of the device. Is it possible to know where this information is stored so that I can do the same from a terminal window ? As I said I tried to make it by changing the json file file in /opt/settings/config without any effect.

#4

i see. i will need to get back to you on this, there are a few moving parts that connect together that all need to be coordinated. instead of instructions explaining how to do this by hand, i’ll provide a program that will be able to turn this on and off from the command line.

please give me a day or two to get back to you.

regards,
richard

#5

hello again,

i have completed the program i promised. please find attached the program named rsh-data-forward, to be copied to the directory /usr/local/bin

> #copy from source computer to /tmp directory on shake
> sudo mv /tmp/rsh-data-forward /usr/local/bin

be certain to make sure it has the proper permissions:
> sudo chmod 755 /usr/local/bin/rsh-data-forward

execute on a command line without arguments for usage and current status:
> rsh-data-forward

and let me know if you have any questions or if you encounter any issues.

cheers,
richard

p.s. this will also be included in the general update for v0.16

#6

Dear Ivor,

thanks for the programme. It is exactly what I needed.

However I have enabled both devices (AM.RA17E and AM.RE1D6) but one does not appear online (1D6), the other seems online but does not show any data; now about 40 min passed since I activated.

And from the dat aconsumption I see that they are transmitting something (I have another post showing the huge amount of data consumption, up to 20 GB/month per each device) but they do not transmit (8 GB/month) as much as when I activate the Forward from the browser (38 GB/month for 2 devices on).

I also checked the status via the browser and it says for both devices that indeed the Forward is enabled but also that both are not online

Data Producer : ON
Data Consumer : ON
Data Forwarding : ON
Server Connection : Not Connected

I also stopped transmitting via command line and activated through the browser and immediately I saw the data online for RA17E (you can check). Therefore my conclusion is that the command line does not yet activate all the features necessary for a ‘real’ forward of the data.

#7

hello,

thanks for the report. after looking deeper i found the bug causing the problem you see, and also understand why it passed my (incomplete) testing anyway.

a new version of the program is attached (previous version has been removed). please trash the previous version on your units, replacing it with this new one.

on another note, you indicated that with data forwarding turned off, upload rates were reduced to 8GB. except that when data forwarding is OFF, no data is sent off the instrument across the network, unless UDP has been configured to send data to another computer. in your other post relating to transfer rates, we calculate data upload rates anywhere between 8 - 14GB / month for a 4D instrument. you had said you were seeing 38GB for two, or 19GB for one, so when we subtract 8GB from the 19, we end up with 11GB, which is exactly in the middle of the advertised range.

something else must be responsible for the 8GB data transfer you are seeing. have a look at your UDP configuration, or see if you are pulling data off the instrument yourself, for example, in some other way.

cheers, let me know if you have any other questions or encounter any other issues.

richard

rsh-data-forward (12.0 KB)

#8

Thanks Richard,

now it worked; I was able to swicth on and off from the command line. It is very useful as we manage the devices remotely and the web interface is complicated to have.

About the consumption I will now verify again and will post other data. After that I will eventually download the logfile and upload it

Alessandro

2 Likes
#9

I rechecked again the consumption, hour by hour and I confirm that it increases from 2.2 GB/month equivalent to 20-21 GB-month, which means about 18 GB-month instead of 8 GB as expected.
CaptureLOG

I also upload here the logfile for your analysis. I have currently stopped the device data forward.
RSH.RA17E.2019-08-28T14_13_12.logs.tar (3.0 MB)

#10

a few follow-up questions, if you don’t mind:

  1. how is the graph generated? using what program? reading data flow
  2. what timezone is represented on the x-axis?
  3. i see that UDP is configured to be sending data to 2 other computers not the Shake Pi. where are these computers located in reference to the shake? and is this data being counted in your graph?
  4. is this unit currently connected to the internet using a direct ethernet connection, or a cellular data connection?

thanks in advance,

richard

#11
  1. I wrote a python programme that analyses the ifconfig output in the router (Teltonika) and identifies Rx+Tx values. These values are then summed and differentiated with the values in the previous hour and plotted with EXCEL. .
    See image below

  2. Time is CET time

  3. One of the two computers do not exists, the other is connected in the same router. However I have eliminated the UDP data exchange between 14:00 and 16:00 and you can see that it had no influence on the transmitted amount of GB/Month equivalent.

  4. the unit is connected to internet via a Teltonika Router and a cellular data connection whose limit is 5 GB.

If you want to have access to the device we can organize a way

.

#12

hello alessandro,

thanks for the info, no need to arrange access to the particular box, since…

looking deeper into this, i discovered that an assumption built into the data payload calculations turned out to be not true, namely, that there was no white space being sent over within the data packet itself.

this was not supposed to happen, of course. regardless, this is all on me; sometimes a bug elusively makes it through, though this is also no excuse.

the plan is to issue a hot-fix for the data-producer docker image as quickly as possible, most likely tomorrow (thursday). this will bring the data payloads into line with the calculations we have provided. however, this will not get you anywhere near your 5GB / month limit, so your general problem remains.

again, thanks for the data, it proved invaluable to finally solving this.

cheers, and my apologies for the inconvenience caused,

richard

#13

Hi Richard

I am very glad to have contributed to allow you to identify the problem !!:grin:

About the limit of 5 GB it is clear that we need to increas the traffic range and also reduce our useless consumption of 2.2 GB/month but at least we know that this is the maximum that we can reach. Also, probably both of them will be used to store the data locally but we will forward only 1 device instead of 2.

I wait for the new hot release. I understood that those releases are done automatically or we have to do something ?

Alessandro

PS: one simple request. Would it be possible, in the rsh-data-forward program that you nicely developed, to print in output the ID of the device ? This would help to be sure which device is being analysed.

2 Likes
#14

here you go, version with station name included as part of the output is attached.

richard

rsh-data-forward (12.1 KB)

#15

Great ! Faster than real time. This is what my device replies now.

myshake@raspberryshake:~ $ rsh-data-forward
Turn data-forwarding ON or OFF
usage: rsh-data-forward [ ON | OFF ]

RE1D6: Data Forwarding is currently OFF

And what about the hot release ? Are the updates automatic or the user needs to make some action to perform the update that you will publish ?

Thanks again
Alessandro