GithubHelp home page GithubHelp logo

Comments (15)

ebaauw avatar ebaauw commented on August 15, 2024 2

I wouldn't try and go below -273.15, though.

from fakegato-history.

NorthernMan54 avatar NorthernMan54 commented on August 15, 2024 1

Just put your sensor in the freezer!

F4F24FC3-1D22-4944-9234-57D95BA2B70A

from fakegato-history.

simont77 avatar simont77 commented on August 15, 2024

CurrentTemperature is by default limited to 0-100°C in Homekit. Maybe this is the reason of the strange behavior. You could try to change the MaxValue property of the Temperature characteristics in your Accessory. It is also possible that Eve simply misunderstand values outside the usual range.

from fakegato-history.

tobekas avatar tobekas commented on August 15, 2024

The entry for temperature in Eve‘s history protocol is 2 byte with 2 decimals, so it technically can hold values in the range of -327,68...327,67. Your value is too high, so there will be an overflow.
This might be different for the actual temperature value (default Homekit value), since this data type is FLOAT als min/max value properties can be adjusted. But for history values you have this restriction.

from fakegato-history.

Kienz avatar Kienz commented on August 15, 2024

I got values from +381.7 to -385.7 🧐

from fakegato-history.

jhubig avatar jhubig commented on August 15, 2024

Hello,

I have changed the characteristic of CurrentTemperature in \usr\local\lib\node_modules\homebridge\node_modules\hap-nodejs\dist\lib\gen\HomeKit.js file.

image

Now I can see negative values displayed in HomeKit (e.g. in iOS Eve App). But in the fakegato history file I can still see null for the temperature values which leads to measurement entries in Eve App shown with 0.0. Something else I need to change? Thanks for your help.

{"temp":null,"humidity":93.9,"ppm":0,"time":1605996070}

image

from fakegato-history.

NorthernMan54 avatar NorthernMan54 commented on August 15, 2024

What does your addentry look like? The null value suggests that temperature is not being passed.

from fakegato-history.

jhubig avatar jhubig commented on August 15, 2024

I'm using the homebridge-cmd4 plugin which adds the data to fakegato history. Here the part where the values are added:

firstParm       = this.fakegatoConfig['temp']       || '0';
               secondParm      = this.fakegatoConfig['humidity']   || '0';
               thirdParm       = this.fakegatoConfig['ppm']        || '0';
               ucFirstParm     = ucFirst(firstParm)       || '0';
               ucSecondParm    = ucFirst(secondParm)      || '0';
               ucThirdParm     = ucFirst(thirdParm)       || '0';

               firstParmIndex = CMD4_ACC_TYPE_ENUM.properties.indexOfEnum(i => i.type === ucFirstParm);
               secondParmIndex = CMD4_ACC_TYPE_ENUM.properties.indexOfEnum(i => i.type === ucSecondParm);
               thirdParmIndex = CMD4_ACC_TYPE_ENUM.properties.indexOfEnum(i => i.type === ucThirdParm);


               firstParmValue = (this.testStoredValueForIndex(firstParmIndex) < 0) ?
                  firstParmValue : this.getStoredValueForIndex(firstParmIndex);
               secondParmValue = (this.testStoredValueForIndex(secondParmIndex) < 0) ?
                  secondParmValue : this.getStoredValueForIndex(secondParmIndex);
               thirdParmValue = (this.testStoredValueForIndex(thirdParmIndex) < 0) ?
                  thirdParmValue : this.getStoredValueForIndex(thirdParmIndex);


               this.log.debug("Logging temp:%s humidity:%s ppm:%s", firstParmValue, secondParmValue, thirdParmValue);
               // Eve Room (TempSensor, HumiditySensor and AirQuality Services)
               this.loggingService.addEntry({time: moment().unix(),
                  temp:firstParmValue,
                  humidity:secondParmValue,
                  ppm:thirdParmValue});
               break;
            }

But logging is generally working. Just not the negative values. We have to be fast. I don't know how long we have these weather conditions 😃

image

from fakegato-history.

simont77 avatar simont77 commented on August 15, 2024

You should not tweak hap, to change the minimum temp use something like this in your plugin

this.YourService.getCharacteristic(Characteristic.CurrentTemperature).props.minValue = -50;

I add no issue in this way

from fakegato-history.

jhubig avatar jhubig commented on August 15, 2024

You should not tweak hap, to change the minimum temp use something like this in your plugin

OK. Understood.

I have also adapted it in the plugin (homebridge-cmd4\lib\CMD4_ACC_TYPE_ENUM.js). Something I missed?

38:  { type: "CurrentTemperature",
                characteristic: Characteristic.CurrentTemperature,
                props: {format: Characteristic.Formats.FLOAT,
                        unit: Characteristic.Units.CELSIUS,
                        maxValue: 100,
                        minValue: -100,
                        minStep: 0.1,
                        perms: [Characteristic.Perms.READ,
                                Characteristic.Perms.NOTIFY
                               ]
                       },
                validValues: {}
              },

from fakegato-history.

simont77 avatar simont77 commented on August 15, 2024

As NorthernMan54 said, it seems that the negative values are not passed at all to fakegato. Do you have any means to debug step-by-step?

from fakegato-history.

jhubig avatar jhubig commented on August 15, 2024

As NorthernMan54 said, it seems that the negative values are not passed at all to fakegato. Do you have any means to debug step-by-step?

I'm currently trying it. Asked also the developer of the homebridge-cmd4 plugin for support. I'll keep you updated. Thanks for your help up to now.

@NorthernMan54: I tried to put the air conditioning system in the freezer. Unfortunately it was too big. 😀

from fakegato-history.

jhubig avatar jhubig commented on August 15, 2024

As NorthernMan54 said, it seems that the negative values are not passed at all to fakegato. Do you have any means to debug step-by-step?

I'm currently trying it. Asked also the developer of the homebridge-cmd4 plugin for support. I'll keep you updated. Thanks for your help up to now.

@NorthernMan54: I tried to put the air conditioning system in the freezer. Unfortunately it was too big. 😀

Another stupid question (sorry for that). But how can I find the debug messages from fakegato in the homebridge log. Checked for the fakegato keyword but couldn't find something. Thanks.

image

This is my /etc/default/homebridge:

# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/homebridge -I

# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
DEBUG=* homebridge -D

from fakegato-history.

NorthernMan54 avatar NorthernMan54 commented on August 15, 2024

Fakegato uses the -D option for debug logging and not DEBUG=*

from fakegato-history.

jhubig avatar jhubig commented on August 15, 2024

FYI: So as you mentioned already before, it might be the case that the plugin is already sending undefined to fakegato. I will check the plugin-code:

[11/29/2020, 5:50:26 PM] [Cmd4] getValue CurrentTemperature function for:Aussenluft returned:-0.9
[11/29/2020, 5:50:26 PM] [Cmd4] Logging temp:undefined humidity:85 ppm:0
[11/29/2020, 5:50:26 PM] [Cmd4] **Fakegato-timer: addData  Aussenluft { time: 1606668626, temp: undefined, humidity: 85, ppm: 0 }  immediate:  false

from fakegato-history.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.