fruggy83 / openocean

27 stars 11 forks source link

implement EEP D2-01-0B for nodon smart plug ASP-2-01 (and ASP-2-1-11) #62

Closed remisharrock closed 5 years ago

remisharrock commented 5 years ago

Hi, I bought a nodon ASP-2-01 smart plug (that can mesure total consumption, live consumption and do switch on/off), the EEP is D2-01-0B : https://nodon.fr/en/nodon/enocean-metering-smart-plug/

How can I help developping this EEP ? I'm using the official enocean binding for openhab: 2.4.0 │ org.openhab.binding.enocean

I successfully discovered the smartplug and have these channels: image

when I switch off (from openhab), the states goes to off and then back to on again (even if the switch is off), here is the trace:

18:27:08.236 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'priseChambreAmis' received command OFF
18:27:08.252 [INFO ] [arthome.event.ItemStatePredictedEvent] - priseChambreAmis predicted to become OFF
18:27:08.265 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - Enqueue new send request with ESP3 type RADIO_ERP1 without callback
18:27:08.267 [INFO ] [smarthome.event.ItemStateChangedEvent] - priseChambreAmis changed from ON to OFF
18:27:08.276 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - Sending data, type RADIO_ERP1, payload D2011E00FF905702000105109EE1FF00
18:27:08.310 [TRACE] [ternal.transceiver.EnOceanTransceiver] - Received Sync Byte
18:27:08.322 [TRACE] [ternal.transceiver.EnOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2
18:27:08.331 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RESPONSE with code RET_OK payload 00 received
18:27:08.337 [TRACE] [ternal.transceiver.EnOceanTransceiver] - Response without listener
18:27:09.140 [TRACE] [ternal.transceiver.EnOceanTransceiver] - Received Sync Byte
18:27:09.150 [TRACE] [ternal.transceiver.EnOceanTransceiver] - >> Received header, data length 9 optional length 7 packet type 1
18:27:09.163 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG VLD for 05109EE1 payload D204608005109EE10000FFFFFFFF3600 received
18:27:09.173 [DEBUG] [ernal.handler.EnOceanBaseThingHandler] - ESP Packet payload D204608005109EE100 for 05109EE1 received
18:27:09.193 [INFO ] [smarthome.event.ItemStateChangedEvent] - priseChambreAmis changed from OFF to ON

I then have to swich fast to off and on again to put it on again:

18:30:27.462 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'priseChambreAmis' received command OFF
18:30:27.474 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - Enqueue new send request with ESP3 type RADIO_ERP1 without callback
18:30:27.485 [INFO ] [arthome.event.ItemStatePredictedEvent] - priseChambreAmis predicted to become OFF
18:30:27.493 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - Sending data, type RADIO_ERP1, payload D2011E00FF905702000105109EE1FF00
18:30:27.515 [INFO ] [smarthome.event.ItemStateChangedEvent] - priseChambreAmis changed from ON to OFF
18:30:27.527 [TRACE] [ternal.transceiver.EnOceanTransceiver] - Received Sync Byte
18:30:27.536 [TRACE] [ternal.transceiver.EnOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2
18:30:27.541 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RESPONSE with code RET_OK payload 00 received
18:30:27.546 [TRACE] [ternal.transceiver.EnOceanTransceiver] - Response without listener
18:30:27.627 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'priseChambreAmis' received command ON
18:30:27.632 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - Enqueue new send request with ESP3 type RADIO_ERP1 without callback
18:30:27.646 [INFO ] [arthome.event.ItemStatePredictedEvent] - priseChambreAmis predicted to become ON
18:30:27.652 [INFO ] [smarthome.event.ItemStateChangedEvent] - priseChambreAmis changed from OFF to ON
18:30:27.781 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - Sending data, type RADIO_ERP1, payload D2011E01FF905702000105109EE1FF00
18:30:27.797 [TRACE] [ternal.transceiver.EnOceanTransceiver] - Received Sync Byte
18:30:27.802 [TRACE] [ternal.transceiver.EnOceanTransceiver] - >> Received header, data length 1 optional length 0 packet type 2
18:30:27.806 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RESPONSE with code RET_OK payload 00 received
18:30:27.811 [TRACE] [ternal.transceiver.EnOceanTransceiver] - Response without listener
18:30:27.861 [TRACE] [ternal.transceiver.EnOceanTransceiver] - Received Sync Byte
18:30:27.866 [TRACE] [ternal.transceiver.EnOceanTransceiver] - >> Received header, data length 9 optional length 7 packet type 1
18:30:27.872 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG VLD for 05109EE1 payload D204608005109EE10000FFFFFFFF3600 received
18:30:27.877 [DEBUG] [ernal.handler.EnOceanBaseThingHandler] - ESP Packet payload D204608005109EE100 for 05109EE1 received
18:30:28.357 [TRACE] [ternal.transceiver.EnOceanTransceiver] - Received Sync Byte
18:30:28.368 [TRACE] [ternal.transceiver.EnOceanTransceiver] - >> Received header, data length 9 optional length 7 packet type 1
18:30:28.381 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG VLD for 05109EE1 payload D20460E405109EE10000FFFFFFFF3700 received
18:30:28.388 [DEBUG] [ernal.handler.EnOceanBaseThingHandler] - ESP Packet payload D20460E405109EE100 for 05109EE1 received

when I manually switch off from the swith itself, it doesn't update the state:

18:32:14.988 [TRACE] [ternal.transceiver.EnOceanTransceiver] - Received Sync Byte
18:32:14.997 [TRACE] [ternal.transceiver.EnOceanTransceiver] - >> Received header, data length 9 optional length 7 packet type 1
18:32:15.008 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG VLD for 05109EE1 payload D204608005109EE10000FFFFFFFF3700 received
18:32:15.015 [DEBUG] [ernal.handler.EnOceanBaseThingHandler] - ESP Packet payload D204608005109EE100 for 05109EE1 received

the same when I manually switch on again from the switch itself, it doesn't update:

18:33:18.032 [TRACE] [ternal.transceiver.EnOceanTransceiver] - Received Sync Byte
18:33:18.041 [TRACE] [ternal.transceiver.EnOceanTransceiver] - >> Received header, data length 9 optional length 7 packet type 1
18:33:18.051 [DEBUG] [ternal.transceiver.EnOceanTransceiver] - RADIO_ERP1 with RORG VLD for 05109EE1 payload D20460E405109EE10000FFFFFFFF3900 received
18:33:18.059 [DEBUG] [ernal.handler.EnOceanBaseThingHandler] - ESP Packet payload D20460E405109EE100 for 05109EE1 received

So my questions are: do you have this EEP implemented ? How can I help ? Is it difficult to implement one? I'm proficient in Java ...

Thank you !

remisharrock commented 5 years ago

I just found this pdf with a lot of information on the implementation, so I guess I can try something if I know how to start: https://www.enocean.com/fileadmin/redaktion/enocean_alliance/pdf/EnOcean_Equipment_Profiles_EEP_V2.6.3_public.pdf

dominikkv commented 5 years ago

Hi @remisharrock, the EEP D2-01-0B is already implemented :-D Just use discovery while sending a teach in message from the device, add a Energy Measurement Switch manually or a measurementSwitch with the DSL file:

Thing measurementSwitch 11223344 "Verbrauch Kühlschrank" @ "Küche" [ enoceanId="11223344", senderIdOffset=2, sendingEEPId="D2_01_0B", receivingEEPId="D2_01_0B", broadcastMessages=false, suppressRepeating=false, pollingInterval=100 ]

Cheers Dominik

remisharrock commented 5 years ago

Nice! I will try that when I get back in April and let you know !

fruggy83 commented 5 years ago

Hi @remisharrock,

as @dominikkv already said, this EEP is implemented. However there was bug in version 2.4 of this binding. So just use the current version and everything should be fine.

Best regards Daniel

fruggy83 commented 5 years ago

@remisharrock I will close this issue now. Please reopen this issue if you still have problems.