geappliances / home-assistant-adapter

9 stars 1 forks source link

Writing to erds has no effect #3

Closed mguaylam closed 19 hours ago

mguaylam commented 4 days ago

I'm trying to implement controls in Home Assistant by writing on either of those erds : 0x213b (More Dry Option Request) or 0x2137 (Timed Dry Option Request) for the GE Ultrafast Combo but I don't get the expected ff reply and nothing happens on the appliance even if I respect the prerequisites.

I'm not sure how to debug this either. Can the circuitry handle a USB supply while being powered by the appliance?

Thank you for your help.

ryanplusplus commented 4 days ago

Hey @mguaylam, are you able to write to other ERDs? Can you share your yaml configuration for writing to these ERDs?

On our side I think a good next step is to add a feedback topic for each ERD that tells you whether the write completed successfully and, if it failed, why.

mguaylam commented 4 days ago

Here's the YAML :

mqtt:
  switch:
    - name: "Séchage supplémentaire"
      state_topic: "geappliances/ultrafast-combo/erd/0x213a/value"
      command_topic: "geappliances/ultrafast-combo/erd/0x213b/value"
      payload_on: "01"
      payload_off: "00"
      state_on: "01"
      state_off: "00"
      unique_id: "4cdcbdf6-1e15-408b-9675-409745d265ca"
      icon: mdi:tumble-dryer
      device:
        identifiers: "a92a4cf2-efe9-4561-a24e-0432bc7bcfa5"
        name: "Ultrafast Combo"
        manufacturer: "GE Appliances"
        model: "PFQ97HSPVDS"

I also tried 0x2048 (Damp Alert Option Request) and writing directly on the broker to make sure HA is not the issue.

mguaylam commented 4 days ago

Sorry, I hit close the issue with the keyboard. I would need your help to reopen it.

ryanplusplus commented 4 days ago

@mguaylam can you try this branch? https://github.com/geappliances/home-assistant-adapter/pull/4

This will report the result of the write to geappliances/<device name>/erd/<erd>/write_result. You should see results like success, invalid size, etc. if you connect to your MQTT broker using MQTT explorer or a similar tool. This will tell us whether the write request is getting to your dryer successfully. If it is getting there but it's not taking effect, then I'll need to do some research to make sure those ERDs work the way you expect them to.

mguaylam commented 3 days ago

While looking at https://github.com/geappliances/home-assistant-bridge you just made me realise that I needed to publish in the write topic.

      state_topic: "geappliances/ultrafast-combo/erd/0x213a/value"
      command_topic: "geappliances/ultrafast-combo/erd/0x213b/write"

Now it works. ✅

I will try your branch tomorrow as I would like to have some diagnostic. 🙂

Was also wondering what are the consequences to write to the erd while outside of the required conditions? For example, writing in 0x213b while the appliance is in idle. Will the appliance just ignore it?

ryanplusplus commented 3 days ago

While looking at https://github.com/geappliances/home-assistant-bridge you just made me realise that I needed to publish in the write topic.

  state_topic: "geappliances/ultrafast-combo/erd/0x213a/value"
  command_topic: "geappliances/ultrafast-combo/erd/0x213b/write"

Now it works. ✅

Oh thanks for the info, I totally missed that!

I will try your branch tomorrow as I would like to have some diagnostic. 🙂

Thanks, it's working locally for me and if you are happy with the write result code on your setup I'll get it onto mainline.

cbeeler commented 3 days ago

Was also wondering what are the consequences to write to the erd while outside of the required conditions? For example, writing in 0x213b while the appliance is in idle. Will the appliance just ignore it?

The appliance should ignore it. If you write to 0x213B (the request ERD) and 0x213A (the status ERD) does not update, the request was not accepted. We have some internal documentation on how we know which options are settable for which cycles. I'm not sure if it was discussed for open source, so I can't talk about system works until I get some clarification.

What model do you have and what are you trying to do? This way I can ask those who have worked on this unit for help with the ERD interface.

mguaylam commented 1 day ago

@ryanplusplus it works! Really appreciate the time you took for this.

@cbeeler my model is : PFQ97HSPVDS. Nothing specific. Was more afraid of breaking the appliance.

ryanplusplus commented 1 day ago

Thanks @mguaylam. This functionality is now on main.