Skip to content

Commit

Permalink
Add support for UPM/Esic, battery alarm optional, add images, update …
Browse files Browse the repository at this point in the history
…README.
  • Loading branch information
nlrb committed Apr 22, 2017
1 parent cf38db3 commit f416d82
Show file tree
Hide file tree
Showing 20 changed files with 90 additions and 30 deletions.
53 changes: 47 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@

### Homey app to read information from wireless weather sensors in Athom Homey.
### Wireless Weather Sensors
Homey app to read information from wireless weather sensors on 433/868 MHz.

Currently the following protocols are supported on 433 MHz.

* Alecto v1 & v3 (WS-1050/WS-1100/WS-1200)
* Cresta: used in numerous brands 433 MHz sensors, like TFA
* Cresta: used in numerous brands 433 MHz sensors, like Cresta & TFA
* La Crosse: only TX3 decoding fully implemented, WS7000 partially (untested)
* Oregon Scientific: version 2 and 3 of the protocol are supported
* UPM/Esic: only tested with WT440H

These types of devices are supported:

Expand All @@ -17,13 +19,52 @@ These types of devices are supported:
* UV sensors
* Barometers

### Installation
Install the app and go to the app Settings page in Homey. As soon as a sensor signal is picked up, it will show in the list of 'Available sensors'.

Notes:
![](http://homey.ramonbaas.nl/weather/settings_sensors.png)

* This app is not supported.
* Signal reception/Machester pattern recognition in Homey is flaky. Hence a lot of signal transmissions are not received by Homey.
* There is no plan to submit this app in the Athom App Store.
Once you see the sensor in the list, you can add it in Homey by pairing it. Select the type of sensor that you want to add (e.g. 'Temperature/Humidity') and a list of available sensors should appear.

![](http://homey.ramonbaas.nl/weather/add_device.png)

Below are some examples of different weather sensor devices in Homey.

![](http://homey.ramonbaas.nl/weather/device_T.png)
![](http://homey.ramonbaas.nl/weather/device_TH.png)
![](http://homey.ramonbaas.nl/weather/device_TH2.png)
![](http://homey.ramonbaas.nl/weather/device_R.png)
![](http://homey.ramonbaas.nl/weather/device_W.png)

A battery alarm will only be shown when the sensor and the protocol support this.

Each sensor also has a static setting page. This will show some (read-only) information about the sensor and e.g. the last date/time data was received from the sensor.

![](http://homey.ramonbaas.nl/weather/device_settings.png)


### Settings

On the application settings page a number of selections can be made.

#### Protocols
The first setting determines which protocols need to be enabled. By default they are all enabled, but when some are not needed they can be disabled by the user. Hover over the information button next to the protocol to get some more information on it.

![](http://homey.ramonbaas.nl/weather/settings_protocols.png)

#### Activity

Under the activity settings one can select when a sensor is marked as 'Inactive' in Homey. When no signal is received for the given amount of time, it will be displayed as inactive. As soon as data is received again, the sensor will be marked active and the timer will be reset.

If you want, you can get a notification in the Homey notification sensor when a sensor becomes inactive, active, both or neither.

![](http://homey.ramonbaas.nl/weather/settings_activity.png)

#### Debug
Some debug tools are available for use in special cases. Don't use them unless instructed.

### Version info
* 1.0.0 First Athom App Store release

----------

Expand Down
21 changes: 13 additions & 8 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "com.weather-sensors",
"version": "0.1.1",
"version": "1.0.0",
"compatibility": ">=1.2.0",
"category": ["climate"],
"name": {
Expand All @@ -16,7 +16,8 @@
},
"contributors": {
"developers": [{
"name": "Jilles Miedema"
"name": "Jilles Miedema",
"email": "[email protected]"
}]
},
"images": {
Expand Down Expand Up @@ -558,15 +559,19 @@
"maximalLength": 71
},
"UPM": {
"sof": [500, 500, 500, 500, 1000],
"sof": [
1000, 1000,
1000, 1000,
2000, 2000
],
"words": [
[1000, 500],
[500, 500],
[2000, 1000],
[1000, 1000],
[500, 1000]
[2000, 2000],
[1000, 2000]
],
"sensitivity": 0.6,
"minimalLength": 15,
"sensitivity": 0.3,
"minimalLength": 16,
"maximalLength": 32
}
},
Expand Down
Binary file modified assets/images/large.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added drivers/rain/assets/images/large.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added drivers/rain/assets/images/small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 16 additions & 8 deletions drivers/sensor.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@ const capability = {
direction: 'measure_wind_angle',
currentspeed: 'measure_gust_strength',
averagespeed: 'measure_wind_strength',
uvindex: 'measure_ultraviolet',
lowbattery: 'alarm_battery'
}

const genericType = {
R: { en: 'Rain gauge', nl: 'Regenmeter' },
T: { en: 'Temperature', nl: 'Temperatuur' },
TH: { en: 'Temperature/humidity', nl: 'Temperatuur/vochtigheid' },
THB: { en: 'Weather station', nl: 'Weerstation' },
UV: { en: 'Ultra Violet' },
W: { en: 'Anemometer', nl: 'Windmeter' }
R: { txt: { en: 'Rain gauge', nl: 'Regenmeter' }, cap: ['measure_rain', 'meter_rain'] },
T: { txt: { en: 'Temperature', nl: 'Temperatuur' }, cap: ['measure_temperature'] },
TH: { txt: { en: 'Temperature/humidity', nl: 'Temperatuur/vochtigheid' }, cap: ['measure_temperature', 'measure_humidity'] },
THB: { txt: { en: 'Weather station', nl: 'Weerstation' }, cap: ['measure_temperature', 'measure_humidity', 'measure_pressure'] },
UV: { txt: { en: 'Ultra Violet' }, cap: ['measure_ultraviolet'] },
W: { txt: { en: 'Anemometer', nl: 'Windmeter' }, cap: ['measure_wind_angle', 'measure_wind_strength', 'measure_gust_strength'] }
}

// Update the sensor data
Expand Down Expand Up @@ -113,7 +114,7 @@ function update(signal) {
// Update the sensor log
let display = {
protocol: signal.getName(),
type: genericType[newvalue.type][locale] || genericType[newvalue.type].en,
type: genericType[newvalue.type].txt[locale] || genericType[newvalue.type].txt.en,
name: newvalue.name,
channel: (newvalue.channel ? newvalue.channel.toString() : '-'),
id: newvalue.id,
Expand All @@ -135,15 +136,22 @@ function getSensors(type) {
for (let i of Sensors.keys()) {
let val = Sensors.get(i);
if (type != null && val.raw.type == type) {
let capabilities = genericType[type].cap.slice(); // copy default array
// Only show battery alarm if the sensor supports it
if (val.raw.data.lowbattery !== undefined) {
capabilities.push('alarm_battery');
}
utils.debug(capabilities, val.raw.data);
list.push({
name: val.raw.name || (type + ' ' + val.raw.id),
data: { id: i, type: type },
capabilities: capabilities,
settings: {
protocol: val.display.protocol,
type: val.raw.name || val.display.type,
channel: val.display.channel || 0,
id: val.raw.id,
update: val.raw.lastupdate.toLocaleString(locale)
update: val.display.update
}
});
}
Expand Down
Binary file added drivers/temp/assets/images/large.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added drivers/temp/assets/images/small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added drivers/temphum/assets/images/large.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added drivers/temphum/assets/images/small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added drivers/temphumbar/assets/images/large.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added drivers/temphumbar/assets/images/small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added drivers/uv/assets/images/large.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added drivers/uv/assets/images/small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added drivers/wind/assets/images/large.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added drivers/wind/assets/images/small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"app": {
"header": "Activity",
"inactive": {
"pre": "Mark a sensor as inctive when no data has been received for",
"pre": "Mark a sensor as inactive when no data has been received for",
"post": ".",
"option": {
"1min": "1 minute",
Expand All @@ -27,7 +27,7 @@
}
},
"notify": {
"pre": "When should an acivity notification be sent?",
"pre": "When should an activity notification be sent?",
"post": ".",
"option": {
"none": "Never",
Expand Down
3 changes: 2 additions & 1 deletion node_modules/alecto/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions node_modules/upm/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f416d82

Please sign in to comment.