Sensor21: Earn bitcoin by collecting environmental data

The Cloud and the Grid

Bitcoin micropayments are a powerful way for machines to pay other machines to perform useful tasks. But there are two very different paradigms for exactly how this process can work: cloud computing and grid computing.

Grid computing allows you to sense and act upon the real world

For computers on the grid to have something worth selling, they need to have a distinctive value proposition. Typically they will not have better price/performance ratios for compute, storage, or memory than their counterparts in the cloud. But grid computers do benefit from being in the real world, owned by real people, rather than being locked away in datacenters.

  • Software sensor. Rent out a distributed set of real IP addresses to monitor website uptime and latency. We previously published this example as ping21.
  • Hardware sensor. Rent out a geographically distributed set of measurement devices to record sensor data on the environment. An example is sensor21, which we cover below.
  • Software actuator. Rent a distributed set of real IP addresses to benchmark your website’s performance. You’d require email validation to confirm domain ownership to prevent DDOS.
  • Hardware actuator. Rent drones owned by different operators to mass in a specified location. This is a fun one for movie shoots, drone races, or simply cryptocurrency-powered supervillainry. You’d pay a ground station running something like dronekit-python.
  • A digital currency capable of fine-grained micropayments (like this)
  • A discovery point or marketplace for computers on the grid to find, buy, and sell from each other (like this)
  • Client software on each grid node that allows them to buy and sell services for bitcoin (like this)

Earn bitcoin for collecting environmental data

Sensor21 is a simple hardware/software package that illustrates how to measure, store, and resell sensor data in return for bitcoin micropayments. You can buy sensor21 measurements with the free 21 software, and sell it if you have set up a hardware sensor.

Buying sensor21 data

If you’ve installed 21 and have a little bit of bitcoin, you can do this to buy distributed sensor measurements at the command line:

$ 21 buy sensor21 --data '{"n": 5, "sensor": "barometricpressure", "city": "San Francisco"}'{
"city": "San Francisco",
"sensor_type": "barometricpressure"
"readings": [
{
"reading": 101424.2,
"timestamp": "2016-05-25T23:15:45.845Z",
"sensor_id": "6297a731854a2ec0b1ee4e7057d97e75ba751031d952492e24616789"
},
# ... [four more readings]...
]
}
You spent: 100 satoshis.
$ 21 buy sensor21/info{
"info":[
{
"city":"Los Gatos",
"sensors":{
"BAROMETRICPRESSURE":{
"num_active_endpoints":1,
"price_to_buy_active_endpoints":20
},
"TEMPERATURE":{
"num_active_endpoints":1,
"price_to_buy_active_endpoints":20
}
}
},
{
"city":"San Francisco",
"sensors":{
"BAROMETRICPRESSURE":{
"num_active_endpoints":5,
"price_to_buy_active_endpoints":100
},
"TEMPERATURE":{
"num_active_endpoints":5,
"price_to_buy_active_endpoints":100
}
}
},
# [ ...more cities... ]
}

Selling sensor21 data

While buying sensor21 data requires only the 21 software and some bitcoin, selling sensor21 data is a little more involved as you actually need a physical sensor that is attached to a computer running 21. Full instructions for setting up a sensor on a Bitcoin Computer or DIY Bitcoin Computer are here.

$ git clone https://github.com/21dotco/sensor21.git
$ cd sensor21
$ source setup.sh
$ python3 sensor21-server.py -d
$ 21 publish submit manifest.yaml -p 'name="Joe Smith" email="joe@example.com" price="50" host="AUTO" port="5002"'

Next steps

The sensor21 example is an intentionally simple demonstration involving just longitudinal collection of temperature and pressure, but we can generalize it to less perceptible measurements like air quality, water quality, pollution, radiation, and the like. Perhaps more interestingly, we can also generalize it to buy and sell other kinds of sensor data automatically acquired by a large network of phones or other IoT devices. As a hardware sensor application of grid computing, it complements the software sensor we demonstrated in our earlier post on ping21.

--

--

Get paid to read email from outside your network with an Earn.com profile.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Earn.com

Earn.com

24K Followers

Get paid to read email from outside your network with an Earn.com profile.