New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fakegato-history

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fakegato-history - npm Package Compare versions

Comparing version 0.3.6 to 0.3.7

20

fakegato-history.js

@@ -366,3 +366,3 @@ /*jshint esversion: 6,node: true,-W041: false */

if (this.refTime == 0) {
this.refTime = entry.time - EPOCH_OFFSET;
this.refTime = entry.time - EPOCH_OFFSET + 1;
this.history[this.lastEntry] = {

@@ -409,11 +409,13 @@ time: entry.time,

var val = Format(
'15%s 0000 0000 81%s0000 0000 00 0000',
numToHex(swap32(this.currentEntry), 8),
numToHex(swap32(this.refTime), 8));
var val = Format(
'15%s 0000 0000 80 0000 0000 0000 0000 00 0000 15%s 0100 0000 81%s0000 0000 00 0000',
numToHex(swap32(this.currentEntry), 8),
numToHex(swap32(this.currentEntry + 1), 8),
numToHex(swap32(this.refTime), 8));
this.log.debug("Data %s: %s", this.accessoryName, val);
callback(null, hexToBase64(val));
this.setTime = false;
this.currentEntry++;
this.log.debug("Data %s: %s", this.accessoryName, val);
callback(null, hexToBase64(val));
this.setTime = false;
this.currentEntry = this.currentEntry + 2;
}

@@ -420,0 +422,0 @@ else {

{
"name": "fakegato-history",
"version": "0.3.6",
"version": "0.3.7",
"description": "Module emulating Elgato Eve history for homebridge plugins",

@@ -5,0 +5,0 @@ "main": "fakegato-history.js",

@@ -7,3 +7,3 @@ # fakegato-history

Your plugin should expose the corresponding custom Elgato services and characteristics in order for the history to be seen in Eve.app. For a weather example see https://github.com/simont77/homebridge-weather-station-extended, for an energy example see https://github.com/simont77/homebridge-myhome/blob/master/index.js (MHPowerMeter class). For other types see the gist above.
Note that if your Eve.app is controlling more than one accessory for each type, the serial number should be unique, otherwise Eve.app will merge the histories. Including hostname is recommended as well, for running multiple copies of the same plugin on different machines ( ie production and development ). ie
Note that if your Eve.app is controlling more than one accessory for each type, the serial number should be unique, otherwise Eve.app will merge the histories. Including hostname is recommended as well, for running multiple copies of the same plugin on different machines (i.e. production and development), i.e.:

@@ -69,3 +69,3 @@ .setCharacteristic(Characteristic.SerialNumber, hostname + "-" + this.deviceID)

currentTemp and setTemp in Celsius, valvePosition in %. Fakegato does not use the internal timer for Energy, entries are added to the history as received from the plugin (Thermo accessory is under development). For setTemp to show, you have to add all the 3 extra thermo characteristics (see gist), and enable set temperature visualization under accessory options in Eve.app.
currentTemp and setTemp in Celsius, valvePosition in %. Fakegato does not use the internal timer for Thermo, entries are added to the history as received from the plugin (Thermo accessory is under development). For setTemp to show, you have to add all the 3 extra thermo characteristics (see gist), and enable set temperature visualization under accessory options in Eve.app.

@@ -86,3 +86,3 @@ For Energy and Door accessories it is also worth to add the custom characteristic E863F112 for resetting, respectively, the Total Consumption accumulated value or the Aperture Counter (not the history). See the gist above. The value of this characteristic is changed whenever the reset button is tapped on Eve, so it can be used to reset the locally stored value. The value seems to be the number of seconds from 1.1.2001. I left this characteristics out of fakegato-history because it is not part of the common history service.

### Known bugs
~~- Currenly not fully compatible with dynamic Platforms using Homebridge API v2 format.~~
- ~~Currenly not fully compatible with dynamic Platforms using Homebridge API v2 format.~~
- Currently valve position history in thermo is not working

@@ -89,0 +89,0 @@ - In "weather" and "room" if you do not send at least an entry every 10 minutes you will get zeros in the history.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc