lsochanowski / GoHeishaMon

port of https://github.com/Egyras/HeishaMon to golang to run directly on CZ-TAW1
56 stars 12 forks source link

CZ-TAW1B compatible #30

Open dimaregabriele opened 1 year ago

dimaregabriele commented 1 year ago

I have the latest model, the CZ-TAW1B, does anyone know if it's compatible?

MiG-41 commented 1 year ago

Do you have a pictures ? Best from PCB from booth sides... Put some pendrive and press 3 buttons at the same time for 10s with changing led colors ?

dimaregabriele commented 1 year ago

A pendrive empty ?

dimaregabriele commented 1 year ago

@MiG-41 2 1

MiG-41 commented 1 year ago

Looks identical to my board , so should be fine. There is even PL2303 chip , but expected new PL23A3 like here: https://github.com/lsochanowski/GoHeishaMon/issues/26

Shoud be fine.

dimaregabriele commented 1 year ago

OK I try. What guide can I follow step by step? @MiG-41

MiG-41 commented 1 year ago

Try with this: https://github.com/lsochanowski/GoHeishaMon/issues/26#issuecomment-1374770882

dimaregabriele commented 1 year ago

@MiG-41 do i just have to upload the two files on the usb stick? then it plugs into the CZ-TAW1b and I press the 3 buttons at the same time ?

MiG-41 commented 1 year ago

Yes and no :) You have to create also third file with configuration.

dimaregabriele commented 1 year ago

how should i rename the file? okay config.example ? what format should it have? @MiG-41

Readonly=true Device="/dev/ttyUSB0" Loghex=true ReadInterval=1 Aquarea2mqttCompatible=false Aquarea2mqttPumpID="" Mqtt_topic_base="panasonic_heat_pump/main" Mqtt_set_base="panasonic_heat_pump/commands" ForceRefreshTime=300 MqttServer="192.168.1.37" MqttPort="1883" MqttLogin="aa" MqttPass="aa" SleepAfterCommand=1 MqttClientID="GoHeishaMon-pub" MqttKeepalive=60 EnableCommand=true HAAutoDiscover=true

MiG-41 commented 1 year ago

File should have name GoHeishaMonConfig.new All you have in Readme on first page of that git: https://github.com/lsochanowski/GoHeishaMon Section Install...

dimaregabriele commented 1 year ago

I connected via web to the ip address of the device and entered openwrt. now what should I do to view the data on home assistant? @MiG-41

MiG-41 commented 1 year ago

Nothing... First you should see topics in MQTT ( ou can use i.e. MQTT Explorer to check it). In HA you have to make your own integration ,or use template like this: https://github.com/Egyras/HeishaMon/tree/master/Integrations/Home%20Assistant

dimaregabriele commented 1 year ago

i put the heishamon.yaml file, but i see all the sensors as "unknown" status. How can I verify that MQTT is working? In the configuration file I put MqttServer="192.168.1.37", where 192.168.1.37 is the ip address of my homeassistant. it's correct? @MiG-41

MiG-41 commented 1 year ago

How can I verify that MQTT is working?

Answer already was -->

ou can use i.e. MQTT Explorer to check it

dimaregabriele commented 1 year ago

this is what i see on mqtt explorer. @MiG-41

Cattura
dimaregabriele commented 1 year ago

@MiG-41 could you help me please?

MiG-41 commented 1 year ago

Looks like GoHeishaMon is not conected to MQTT ( otherwise you should see topic "panasonic_heat_pump" next to "$SYS"). please check , if there is correct name for config file , and if the config file it self is ok.

dimaregabriele commented 1 year ago

they are correct? @MiG-41

Cattura2 Cattura
dimaregabriele commented 1 year ago

ok i reloaded the program and it worked. For a few hours instead it hasn't communicated anymore and this one comes out on MQTT. what does it mean? @MiG-41

Cattura
MiG-41 commented 1 year ago

It looks like GoHeishaMon process stopped... It is not only you , who complain about... Unfortunatly @lsochanowski have no more Aquarea HP , and developing of this project is hard...

dimaregabriele commented 1 year ago

if I enter the device via browser (openwrt) and reboot the system then it starts again. what can it be ? actually I had problems even with the original software. @MiG-41

Rainman43CZ commented 1 year ago

Hello, I just received new module CZ-TAW1B. So what is the conclusion, is it possible use it with GoHeishaMon? If yes which release (1.0.166 / 1.0.190 / 1.0.191) should I use?

There is mention about project CZ-TAW1 can be used with Aquarea Cloud and MQTT host using only modified CZ-TAW1 in README. Could someone point me in the direction of where to find more information about this project?

Thank You

pando85 commented 11 months ago

I just tested it today and it worked without any problem.

This is the summary of the instructions that I followed:

cz-taw1b

Panasonic CZ-TAW1B WiFi adapter for Panasonic AQUAREA.

WiFi configuration

WiFi should be configured in original firmware.

Setting up WiFi Without WPS on CZ-TAW1

In the paper instructions that come with the CZ-TAW1, there's no mention of setting up WiFi without WPS. However, in the PDF instructions found on the CD-ROM included with the device and various online manuals, you'll find a procedure for configuring WiFi settings without using WPS.

  1. Using the HTML Utility: The CD-ROM contains a small HTML utility that simplifies the process of configuring WiFi settings. This utility allows you to enter your WiFi SSID and password, which it then saves in a settings.txt file for you.

  2. USB Drive Preparation: To proceed, insert a USB drive into your computer. We recommend using an 8GB FAT32-formatted USB drive (although your mileage may vary with other configurations).

  3. Create settings.txt: In the utility, you'll specify your WiFi settings. The settings.txt file should have the following content (without the quotes, and there should be a newline after each key):

    SSID=YourSSIDHere
    KEY=APasswordBetterThanThis
  4. Transfer settings.txt: Save the settings.txt file to the root directory of your USB drive.

  5. WiFi Configuration: With the settings.txt file on the USB drive, insert it into the CZ-TAW1.

  6. Configure WiFi: To configure the WiFi settings, press and hold the WPS button on the CZ-TAW1 for 10 seconds. The device will read the settings.txt file and set up the WiFi accordingly.

  7. Final Steps: Once the WiFi configuration is complete, you can remove the USB drive and install the transmitter wherever you prefer.

These steps allow you to set up your WiFi on the CZ-TAW1 without the need for WPS.

Install instructions

New hardware should use 1.0.191 to avoid problems with PL23a3 drivers. Original link

To install the software, follow these steps:

  1. Format a USB drive to FAT32 and copy the following files to it:

    • openwrt-ar71xx-generic-cus531-16M-kernel.bin
    • openwrt-ar71xx-generic-cus531-16M-rootfs-squashfs.bin
  2. Additionally, configure and copy the file named GoHeishaMonConfig.new.

  3. Insert the USB drive with these files into your CZ-TAW1 device.

  4. Press all three buttons simultaneously and hold them for more than 10 seconds. Wait until the middle LED on the CZ-TAW1 begins changing colors, cycling through green, blue, and red. You may also notice the LED on the USB drive blinking if it has one.

  5. The update process will start, and it will take approximately 3 minutes. During this time, the CZ-TAW1 will reboot. After a while, you will see the middle LED light up in white.

  6. Do not remove the drive from the module until the white LED turns off again. This indicates that the GoHeishaMon has copied the config file from the drive and rebooted the CZ-TAW1. Remove the drive before the white LED turns on again, as leaving the drive with the config file present will result in it being copied again and triggering another reboot.

Commands

sudo mount /dev/sdb1 /mnt
sudo cp 1.0.191/openwrt-ar71xx-generic-cus531-16M-* /mnt
sudo cp GoHeishaMonConfig.new /mnt
sudo umount /mnt

Configuration

SSH Connection

ssh was not working and dropbear doesn't started automatically. The solution was to start it through MQTT messages. Topic for sending messages: panasonic_heat_pump/commands/OSCommand Topic for reading output: panasonic_heat_pump/commands/OSCommand/out

Just send a /usr/sbin/dropbear. Example:

mosquitto_pub -t "panasonic_heat_pump/commands/OSCommand" -m "/usr/sbin/dropbear" -h <MQTT BROKER IP>

For connecting to ssh weaker algorithms are needed:

ssh -oHostkeyAlgorithms=+ssh-rsa -oKexAlgorithms=+diffie-hellman-group1-sha1 root@${PANASONIC_IP}

Changing hostname

/etc/config/system

uci set system.@system[0].hostname='cz-taw1b'
uci commit system
/etc/init.d/system reload

Fix dropbear

root@cz-taw1b:~# cat /etc/config/dropbear
config dropbear
    option PasswordAuth 'on'
    option RootPasswordAuth 'on'
    option Port            '22'
#    option BannerFile    '/etc/banner'

Set ~/.ssh/config:

Host cz-taw1b.iot.grigri
    User root
    PubkeyAcceptedKeyTypes +ssh-rsa
    HostkeyAlgorithms +ssh-rsa
    KexAlgorithms +diffie-hellman-group1-sha1

Add rsa key to /etc/dropbear/authorized_keys or use LuCi web UI.

Configure NTP

Change NTP servers to your preferred ones.

dimaregabriele commented 11 months ago

what command should be sent to start mqtt (from mqtt loupe app)? @pando85