PHPackages                             moay/opensensemap-api-php-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. moay/opensensemap-api-php-client

ActiveLibrary[API Development](/categories/api)

moay/opensensemap-api-php-client
================================

A client for retrieving sensor data from a senseBox from the opensensemap api

1.0.1(6y ago)333MITPHPPHP &gt;=7.1

Since Aug 1Pushed 6y ago1 watchersCompare

[ Source](https://github.com/moay/opensensemap-api-php-client)[ Packagist](https://packagist.org/packages/moay/opensensemap-api-php-client)[ RSS](/packages/moay-opensensemap-api-php-client/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

[![travis-ci-status](https://camo.githubusercontent.com/b2611257029d125789143598fb8b6823559c424bbe19628158a2224c5a0d3391/68747470733a2f2f7472617669732d63692e6f72672f6d6f61792f6f70656e73656e73656d61702d6170692d7068702d636c69656e742e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/b2611257029d125789143598fb8b6823559c424bbe19628158a2224c5a0d3391/68747470733a2f2f7472617669732d63692e6f72672f6d6f61792f6f70656e73656e73656d61702d6170692d7068702d636c69656e742e7376673f6272616e63683d6d6173746572)

opensensemap-api-php-client
===========================

[](#opensensemap-api-php-client)

[![](https://user-images.githubusercontent.com/3605512/62291810-2495bb80-b465-11e9-932e-2271f7e0167b.png?v=4&s=20)](https://user-images.githubusercontent.com/3605512/62291810-2495bb80-b465-11e9-932e-2271f7e0167b.png?v=4&s=20)

A lightweight client for retrieving sensor data from a senseBox from the opensensemap api.

**This is not an official project from the senseBox team.**

Setup
-----

[](#setup)

Install via composer:

```
composer require moay/opensensemap-api-php-client

```

Usage
-----

[](#usage)

Take a look at the implementation example in the directory `example`.

```
$client = OpensensemapApiClientFactory::create();

// Change senseBox id
$senseBoxData = $client->getSenseBoxData('someSenseBoxId');

foreach ($senseBoxData as $sensorValue) {
    // $sensorValue->getValueType()
    // $sensorValue->getValue()
    // $sensorValue->getUnit()
    // $sensorValue->getSensorType()
    // $sensorValue->getMeasurementTime()->format('Y-m-d H:i:s')
}
```

You don't have to iterate over all values, just use this handy function:

```
$temperature = $senseBoxData->getValueByType(SensorValue::TYPE_TEMPERATURE);
```

Outputting values can be done directly by casting the values to strings:

```
echo 'Temperature: '.$temperature; // Output: Temperature: 12 °C
echo $temperature; // Output: 12 °C
$temperatureString = (string) $temperature // $temperatureString = '12 °C'
```

Features
--------

[](#features)

The client gives you the latest data for a specific senseBox from the OpenSenseMap Api.

As there was no need for further features, none have been implemented. This could easily be done, though. Feel free to submit a PR.

License
-------

[](#license)

The client is published under the [MIT license](LICENSE).

[senseBox](https://sensebox.de) and all related contents, visuals and brands are published under CC licenses or other public domain licenses. Make sure to check out the project.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2481d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3605512?v=4)[Manuel Voss](/maintainers/moay)[@moay](https://github.com/moay)

---

Top Contributors

[![moay](https://avatars.githubusercontent.com/u/3605512?v=4)](https://github.com/moay "moay (16 commits)")

---

Tags

opensensemapopensensemap-apisensebox

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/moay-opensensemap-api-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/moay-opensensemap-api-php-client/health.svg)](https://phpackages.com/packages/moay-opensensemap-api-php-client)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
