Giter Site home page Giter Site logo

goheishamon's Introduction

Custom firmware for the Panasonic CZ-TAW1

This is an alternative firmware for the Panasonic CZ-TAW1, an IoT adapter for the H-series heat pumps. It consists of:

  • a gateway written in Go that translates serial comms with the heat pump on the CN-CNT link to MQTT
  • a port of OpenWRT (22.03.3 currently) for the CZ-TAW1

About

The gateway

The gateway (called GoHeishaMon or heishamon) is responsible for parsing the data received from the Heat Pump and posting it to MQTT topics. It is a reimplementation of the https://github.com/Egyras/HeishaMon project in Go.

Gateway features

  • posting Heat Pump data to MQTT
  • changing settings on the Heat Pump
  • supports Home Assistant's MQTT discovery
  • emulation of the Optional PCB

GoHeishaMon can be used without the CZ-TAW1 module on a platform supported by Go. It requires a serial port connection to the Heat Pump. The new version is running as a daemon. As a consequence, the logs are no longer written to stdout, they end up in system log (and MQTT topic).

Note

  • the binary is /usr/bin/heishamon by default
  • the configuration is stored in /etc/heishamon/ and is preserved on upgrades
  • the service name is heishamon

OpenWRT 22.03.3 image for the CZ-TAW1

Firmware features

  • stock OpenWRT, with up-to-date kernel (5.10.161)
  • GoHeishaMon is preinstalled and running as a system service (named heishamon)
  • sysupgrade and upgrades from LuCI are working
  • The CZ-TAW1's WiFi can be used as an Access Point
  • ca. 5.5 MiB free on JFFS
  • WPA3, LuCI over HTTPS etc.

This is pretty much stock OpenWRT, by default configured as an Acess Point/range extender, i.e. on first boot the Ethernet interface is configured as an DHCP client, and the AP is disabled. Both are in the LAN firewall zone, though one can of course reconfigure it and use the device as a router. There is no default password. The default host name is "aquarea".

Note This firmware is not using the factory MTD layout, i.e. the two "sides" of the original firmware are gone. In exchange you have a lot more space on the JFFS partiion. Of the stock partitions, u-boot, u-boot env and art are preserved. There is no easy way to migrate from stock and there is no easy way back. Back up everything.

Installation

Beware: This is a dangerous process that may brick your device! You do it on your own responsibility.

Prerequisites

  • Serial port connection to the device
  • Backup of the MTD layout, all MTD partitions and U-Boot environment
  • TFTP server

Overview of the process:

  • Backup MTD layout (cat /proc/mtd)
  • Backup U-Boot env (fw_printenv)
  • Backup all partitions (dd if=/dev/mtdx of=/tmp/mtdx_backup, then scp somewhere)
  • Reboot to U-Boot
  • Change boot address and options
    • skip this if you intend to only boot it from RAM without altering the MTD
    • setenv bootargs console=ttyS0,115200
    • setenv bootcmd bootm 0x9f050000
    • saveenv
  • Download the initramfs image to RAM using TFTP (set the IP addresses in serverip/ipaddr variables)
    • tftp 0x81000000 openwrt-ath79-generic-panasonic_cz-taw1-initramfs-kernel.bin
  • Boot the image
    • bootm 0x81000000
  • If you want this permanet, ssh to OpenWRT and:
    • download openwrt-ath79-generic-panasonic_cz-taw1-squashfs-sysupgrade.bin to /tmp
    • sysupgrade /tmp/openwrt-ath79-generic-panasonic_cz-taw1-squashfs-sysupgrade.bin
    • ... or just do it from LuCI

In order to configure GoHeishaMon:

  • service heishamon stop
  • Edit the config file (/etc/heishamon/config.yaml)
  • service heishamon start

Logs - either logread or Status/System Log in LuCI

goheishamon's People

Contributors

rondoval avatar lsochanowski avatar mig-41 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.