iobroker.mystrom-wifi-switch
Advanced tools
Comparing version 0.10.1 to 1.0.3
{ | ||
"common": { | ||
"name": "mystrom-wifi-switch", | ||
"version": "0.10.0", | ||
"version": "1.0.3", | ||
"authors":[ | ||
"name rgw@elexis.ch" | ||
], | ||
"news": { | ||
"news":{ | ||
"1.0.0":{ | ||
"en": "Added Datapoints for Temperature (Thanks to @hhindriks" | ||
}, | ||
"0.10.0":{ | ||
@@ -10,0 +13,0 @@ "en": "added admin/index_m.html" |
@@ -31,29 +31,28 @@ /** | ||
/* | ||
WIFI SWITCH – REST API | ||
WIFI SWITCH – REST API | ||
The myStrom WiFi Switch offers a REST API (REST = representational State Transfer). | ||
The interface allows you to access/control the switch directly from your local network independently from myStrom - | ||
you don’t need a myStrom account or the myStrom app. | ||
With those rules you can integrate the switch in almost any environment. | ||
The myStrom WiFi Switch offers a REST API (REST = representational State Transfer). | ||
The interface allows you to access/control the switch directly from your local network independently from myStrom - you don’t need a myStrom account or the myStrom app. | ||
With those rules you can integrate the switch in almost any environment. | ||
Important Note | ||
The interface is transparent and has no authentication. If someone has access to your local network, | ||
they will be able to control your switch. | ||
Please apply strong security mechanisms to protect your network. | ||
Important Note | ||
The interface is transparent and has no authentication. If someone has access to your local network, they will be able to control your switch. | ||
Please apply strong security mechanisms to protect your network. | ||
Set State | ||
ON – http://[IP]/relay?state=1 | ||
OFF – http://[IP]/relay?state=0 | ||
TOGGLE – http://[IP]/toggle | ||
Set State | ||
ON – http://[IP]/relay?state=1 | ||
OFF – http://[IP]/relay?state=0 | ||
TOGGLE – http://[IP]/toggle | ||
Get Values | ||
http://[IP]/report | ||
Get Values | ||
http://[IP]/report | ||
Response | ||
{ | ||
"power": 0, | ||
"relay": false | ||
} | ||
Response | ||
{ | ||
"power": 0, | ||
"relay": false, | ||
"temperature": 3.2319431304931641 | ||
} | ||
[IP] – IP Address of your Switch e.g. 192.168.1.99 | ||
[IP] – IP Address of your Switch e.g. 192.168.1.99 | ||
*/ | ||
@@ -87,6 +86,5 @@ | ||
adapter.log.info('cleaned everything up...'); | ||
callback(); | ||
} catch (e) { | ||
callback(); | ||
} | ||
callback(); | ||
}); | ||
@@ -116,2 +114,4 @@ | ||
var url = adapter.config.url; | ||
var doTemperature = adapter.config.doTemperature | ||
//Get report | ||
request("http://" + url + "/report", function (error, response, body) { | ||
@@ -130,2 +130,9 @@ if (error) { | ||
adapter.setState("total_energy", { val: total, ack: true }); | ||
//Get temperature | ||
if (result.hasOwnProperty('temperature')) { | ||
adapter.setState("temperature", { val: result.temperature, ack: true }) | ||
} else { | ||
adapter.setState("temperature", { val: 0.0, ack: true }) | ||
} | ||
} | ||
@@ -135,3 +142,2 @@ }); | ||
// is called when databases are connected and adapter received configuration. | ||
@@ -180,2 +186,3 @@ // start here! | ||
}); | ||
/** | ||
@@ -211,2 +218,18 @@ * energy of the current day (Wh) | ||
/** | ||
* Temperature | ||
*/ | ||
adapter.setObject('temperature', { | ||
type: 'state', | ||
common: { | ||
name: 'temperature', | ||
type: 'number', | ||
read: true, | ||
write: false, | ||
role: 'value' | ||
}, | ||
native: {} | ||
}); | ||
// in this adapter all states changes inside the adapters namespace are subscribed | ||
@@ -213,0 +236,0 @@ adapter.subscribeStates('*'); |
{ | ||
"name": "iobroker.mystrom-wifi-switch", | ||
"version": "0.10.1", | ||
"version": "1.0.3", | ||
"description": "ioBroker mystrom wifi switch Adapter", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -38,2 +38,11 @@ ![Logo](admin/mystrom-wifi-switch.png) | ||
#### 1.0.0 | ||
* Added Datapoints for Temperature (Thanks to @hhindriks) | ||
#### 0.10.0 | ||
* added admin/index_m.html (compatibility with Admin3) | ||
#### 0.8.3 | ||
@@ -40,0 +49,0 @@ |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
266409
293
0
92