Geyserwise WIFI module integration (Request)

For those of you who dont want to flash firmware, here is a basic HASSIO template to get you started

rest:
  - resource: https://geyserwiseonline.com/AutomationService/api/unit/GetUnitStatus?apiKey=<API_KEY>&unitid=<UNIT_ID>
    sensor:
      - name: "Main Geyser Element"
        unique_id: main_geyser_element
        force_update: true
        value_template: "{{ value_json.Element }}"
        json_attributes:
          - Element
      - name: "Main Geyser Temperature"
        unique_id: main_geyser_temperature
        force_update: true
        value_template: "{{ value_json.Temperature }}"
        json_attributes:
          - Temperature
         
rest_command:
    main_geyser_switch_on:
        url: https://geyserwiseonline.com/AutomationService/api/unit/SetElement?apiKey=<API_KEY>&unitid=<unit_id>&Uniton=true
    main_geyser_switch_off:
        url: https://geyserwiseonline.com/AutomationService/api/unit/SetElement?apiKey=<API_KEY>&unitid=<unit_id>&Uniton=false
     
switch:
  - platform: template
    switches:
      main_geyser:
        unique_id: main_geyser_element_switch
        value_template: "{{ is_state('sensor.main_geyser_element', 'on') }}"
        turn_on:
          service: rest_command.main_geyser_switch_on
        turn_off:
          service: rest_command.main_geyser_switch_off

this is just the basics. It gets the element on/off state, can turn the element on/off and gets the latest water temp

1 Like

Do you know if Geyserwise would be add more of features like changing the time slots of the geyser via a firmware update?

thanks

Posting this here incase anyone else is looking for the solution.

I installed local tuya and was able to get all the data from the geyserwise system! FYI you can run cloud and local tuya simitaneously.

Screenshot_2

1 Like

Are you able to set the data for 4x block Temps, anti freeze and solar diff?

Just wanted to leave my progress here with Jackā€™s project. I changed to code a bit so I can use it with multiple geysers on the same network. Iā€™ve flashed the esp12 units and installed them. Going to plug them in this afternoon.

1 Like

Good job
Nice soldering. Let me know how it went

For some reason Iā€™m not getting any data over MQTT. I get the initial LWT=Online from the esp so I know Wifi and MQTT are working. But no data after that. Iā€™ve compared the code with yours and the only things I changed were MQTT topics and Hostname/AP Name. Everything else is exactly the same. Not sure how I would go about debugging it.

Try switching it on and off with commands (heat). This will change the checksum and fire off mqtt publish.

You can debug via mqtt publish. Just put in the data you need to push.

I have tried publishing ON with topic cmnd/bedroomgeyser/power as it is in the code but no response. I wonder if there is a way to see the terminal output. Iā€™m sure Iā€™m just missing something small.

I gathered from the code that something needs to change before an update is sent. Iā€™ve already tried changing settings and turning it on and off.

Iā€™ve gotten it down to it never gets a message with the right header. So it just loops looking for it. haveMessage is never True

Strange. Have you tried my bin as a test?

Rx, ground is connected well?

Iā€™m pretty sure my connections are solid. I downloaded your bin today and tried it but esptool says it doesnā€™t look like an image file. I also couldnā€™t get it to install with WifiManager. It gives me error 10. After reset it doesnā€™t run.

Iā€™ve also checked the serial comms while everything is plugged in. The ESP sends the following data to to unit:

Send QUERY
COMMAND:
Header:
21930
Version:
0
Command:
8
Data length:
0
TX_RAW:
Checksum:
7
U Command Length:
98

The unit responds with some garbage. Not sure what to make of it yet. I might try putting the original unit back and probing that.

I made some more progress. My initial thought regarding the buffer was incorrect.

Iā€™ve narrowed the problem down to this if statement:

else if (haveMessage && command_.command == TUYA_RESPONSE && command_.length == 90)

command_.length is never == 90.

And so it will never enter that block to publish data.

Any ideas @Jack_Kitley?

The command length should always be 90. its in the Tuya docs. Im not sure why your response length isnt 90.

Ive got loadshedding now but i used the same bin file on my git and it was fine on upload via wifi manager. Ill re-upload again at 2pm and let you know.

If you look at my previous post you will see the reported command length is 98. Not sure how. Trying to figure that out now.

Try and mqtt publish the response to a topic to debug.

Hi Jack,

Not sure what you want me to do with this. The default code from github compiles and I have flashed it to the esp12. There isnā€™t any change. It connects to wifi and mqtt but it has the same problem. I also still have the issue trying to flash the bin file.

Maybe I received a different version from Geyserwise? Not sure what else could be wrong.

Upload was fine.

Do you still have the original wifi module?