Alternative Open Source Firmware for HM_LC_Sw1PBU_FM
Asksin Library ported to Homematic HM-LC-Sw1PBU-FM as Custom Open Source Firmware speaking BidCos.
Ported Askin Library from FHEM Forum to Atmel ATmega 644A (https://github.com/trilu2000/AskSinLib). Runs with Arduino.
- CC1100 on 868,3 MHz speaking BidCos
- Atmel ATmega 644A (http://www.atmel.com/Images/Atmel-8272-8-bit-AVR-microcontroller-ATmega164A\_PA-324A\_PA-644A\_PA-1284\_P\_datasheet.pdf)
- Controller runs at 3,3V at 8MHz. According to the datasheet up to 5.5V is safe.
- Current Sensor: MP13 + MP29 (PA0/ADC0 at ATmega) Shunt amplified by TLC272 OpAmp (http://www.ti.com/lit/ds/symlink/tlc272.pdf)
avrdude: Device signature = 0x1e9609 avrdude: safemode: lfuse reads as FF avrdude: safemode: hfuse reads as DA avrdude: safemode: efuse reads as FD
More images can be found in the hardware/images/ subfolder.
- DO NOT CONNECT THE BOARD to 230V. This will be dangerous, since there is no voltage regulator! All ports including uart and SPI may have 230V potential to ground.
- YOU DO THIS ON YOUR OWN RISK
- This will probably void your warrenty. The device most probably will loose its CE certification.
- There is no way back to the original firmware since we do not have any copy of it
- Connect your ISP Programmer to the top board of the HM-LC-Sw1PBU-FM to the following testpoints:
- MP2 - 3,3V
- MP3 - Reset
- MP4 - MOSI
- MP5 - MISO
- MP6 - CLK
- MP15 - GND
- Connect your UART to the following test points (optional for debugging):
- MP9 - RX
- MP10 - TX
- MP16 - GND
- Power the controller using your programmer. Both 3,3V (like Raspberry Pi without any mods) and 5V Programmers (like most USB programmers) work perfectly
- The relay and current sense will not work while testing with 3,3 or 5V. Everything else will
- Install jabduino (https://github.com/jabdoa2/jabduino) into your Arduino hardware folder (important: there should be no minus in the foldername)
- Linux: /usr/share/arduino/hardware
- Windows: folder "hardware" in your Arduino directory
- Checkout to sketchbook/Asksin_HM_LC_Sw1PBU_FM (important: there should be no minus in the foldername)
- Open Arduino
- Open Sketch "Asksin_HM_LC_Sw1PBU_FM"
- Select Tools->Board->"Jabduino ATmega644A"
- Change HMID in Register.h to the original HMID of your device
There are two ways to upload the firmware:
- Version 1: Upload with programmer (works with or without arduino bootloader)
- Version 2: Flash OTA Bootloader and flash firmware over the air
- OTA Bootloader can be found here: https://github.com/jabdoa2/Asksin_OTA_Bootloader
- You can use any Homematic OTA Flasher (hmland flash-ota, eq3 Homematic Windows USB Updater, CCU2 or FHEM)
Version 1 is good for testing while developing with attached UART. However, before installing the device into the wall, I would recommend to switch to version 2 to be able to update firmware while mounted in the wall.
Features ([x] working [p] partial/not finished [ ] not working):
- Pairing of central via Register.h
- Pairing of central via Configbutton (long press)
- Reset device (double long press)
- getConfig Device
- regSet Device in FHEM
- Two remote channels for both buttons (channel 1 and 2)
- Peering of button via Register.h
- Peering of button via peerChan in FHEM
- getConfig button in FHEM
- regSet button in FHEM
- Controlling peered devices via button press (original homematic devices do work perfectly)
- Actor channel for internal relay (channel 3)
- Peering of actor via Register.h
- Peering of actor via peerChan in FHEM
- getConfig actor in FHEM
- regSet actor in FHEM
- set on/set off in FHEM
- toogle in FHEM
- controlling actor via peered devices
- Showing current status in FHEM (Copy device config below)
- Reading current sensor and sending it via RF (message type 5E. Same format as HM-ES-PMSw1-Pl).
- Showing current sensor value in FHEM. (Copy device config below).
- Virtual Actor channel for double-throw switch/Wechselschalter (channel 4)
- Set actor channel depending on current input
- Toggeling relay (channel 3) when toggeling virtual channel
- Load defaults to registers when peering (for both actor, remote, single and dual peerings)
- Interpreting current sensor values (60W ~= 6k/5W LED ~= 3k)
- Sending 41 Messages with current value to other actors
Using device in FHEM: Copy fhem/99_Asksin_HM_LC_Sw1PBU_FM_CustomFW.pm to FHEM/ in your FHEM installation and restart.
If you have feedback or problems you can ask questions or leave comments in this thread in FHEM Forum (forum is mostly german but you may also write in english): http://forum.fhem.de/index.php/topic,18071.0.html / http://forum.fhem.de/index.php/board,22.0.html