Power Sensor cannot get old pulse count from GW/OH2



  • Hi,

    I have openHAB 2.2, Mysensors Ethernet GW 2.1.1 and a number of temperature sensors etc. I have issues to get my Power Sensor to work.

    It get stuck at reading the previous pulse count from GW/OH.

    The GW and the Power sensor is configured as:

    Bridge mysensors:bridge-eth:gateway [ ipAddress="192.168.1.11", tcpPort=5003, sendDelay=200 ] {
    	power 			sensor-air-pump-power 		[ nodeId=5, childId=0 ]	
    }
    

    The items looks like:

    Number CellarAirHeaterSensorWatt   "Airheater Watt" <energy> { channel="mysensors:power:gateway:sensor-air-pump-power:watt", mqtt=">[rabbitmq:/myhouse/airpump/sensor/power:state:*:Power,sensor=${itemName},location=airpump watt=${state} ]" }
    Number CellarAirHeaterSensorKwh    "Airheater Kwh" <energy>  { channel="mysensors:power:gateway:sensor-air-pump-power:kwh", mqtt=">[rabbitmq:/myhouse/airpump/sensor/power:state:*:Power,sensor=${itemName},location=airpump kwh=${state} ]" }
    Number CellarAirHeaterSensorVar    "Airheater Var" <energy>  { channel="mysensors:power:gateway:sensor-air-pump-power:var" }
    Number CellarAirHeaterSensorVar1   "Airheater Var1" <energy> { channel="mysensors:power:gateway:sensor-air-pump-power:var1" }
    Number CellarAirHeaterSensorVA     "Airheater VA" <energy>   { channel="mysensors:power:gateway:sensor-air-pump-power:va" }
    

    I have tested with different items to get it working.
    In the OH logs I see:

    2018-01-09 19:57:44.144 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 5 found in gateway
    
    2018-01-09 19:57:44.147 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 0 found in node 5
    
    2018-01-09 19:57:44.151 [WARN ] [rs.internal.gateway.MySensorsGateway] - Request received, but variable state is not yet defined
    
    2018-01-09 19:57:49.364 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 4;2;2;0;24;
    

    I cannot see the variable state being defined.

    What am I missing here?

    / Joacim



  • I am using OpenHab through MQTT and it is so that the controller has no builtin functionality to respond to the startup message from the sensor. I had to make an own startup message to be picked up at the conroller and then use a rule to send the old pulsecount back at at startup.

    There should be several discussions at the forum about this so the info is here somewhere.


  • Mod

    I read other messages about OH not responding to variable state requests, it looks like a "feature" 😅


Log in to reply
 

Suggested Topics

  • 22
  • 1
  • 10
  • 7
  • 19
  • 2

45
Online

11.4k
Users

11.1k
Topics

112.6k
Posts