Page 1 of 4 1234 LastLast
Results 1 to 10 of 187

Thread: My HGI80 equivalent Domoticz setup without HGI80

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Automated Home Ninja
    Join Date
    Aug 2016
    Posts
    489

    Default My HGI80 equivalent Domoticz setup without HGI80

    Hello,

    Several people have asked me recently (in threads, and via PM) about my Domoticz setup which is equivalent to using an HGI80, but without the HGI80!

    I intend to write more about it soon, but in summary I use a Raspberry Pi which has a radio board I bought from busware.de (I'll write more about this too). The radio board has an Atmel atmega1284p microcontroller and a Texas Instruments CC1100 radio chip on it. I have custom-written firmware which runs on the microcontroller and configures and interfaces with the radio chip to read the Evohome radio messages and decode them into the same format that the HGI80 produces. At this point, Domoticz thinks it's talking directly to a genuine HGI80 and everything is good! (Oh, and it can transmit too, so you have rudimentary control of the Evohome via Domoticz.)

    I am a professional software developer, and the code I hacked together is somewhat shameful. I'm in the process of cleaning it up, etc., and will publish it here together with more information when I'm done.

    If anyone has any questions in the mean time, please feel free to ask!

  2. #2
    Automated Home Sr Member
    Join Date
    Oct 2015
    Posts
    78

    Default

    Thanks for this @dty.

    We all have "dirty" code as it's for us and not for a commercial product/team
    I'm sure everybody who would like to use it would only be too happy to help with cleaning/improving it.

    Looking forward to the detail.

  3. #3
    Automated Home Legend
    Join Date
    Sep 2014
    Location
    Scotland
    Posts
    1,845

    Default

    Watching with interest...

  4. #4
    Automated Home Guru
    Join Date
    Feb 2016
    Posts
    230

    Default

    @dty

    Thanks for posting the details on this. I'm beginning to think that this may ultimately prove to be a better solution for those interested in using Domoticz to analyse and control their Evohome system. My reason for saying this is that I'm currently testing repeater functionality using the HGI80 and it's taken me some time (and significant frustration) to discover and fully understand what others have posted previously, that the HGI80 always inserts its fixed device type and ID (18:730) when sending messages. I'm not yet sure whether this will prevent successful implementation of the HGI80 as a repeater, as my testing is now going OK, but it's certainly added further complexity to my development.

    I might need to be building my own device soon!

    Dan

  5. #5

    Default

    I'm going to echo comments of others here, more than happy to take a look at 'dirty' code.

    Are the resource requirements such that the code will only run on as 1284p, or is the code footprint small enough that it would run on a smaller processor ?

  6. #6
    Automated Home Ninja
    Join Date
    Aug 2016
    Posts
    489

    Default

    @DanD - I'd like to explore a repeater. I'm increasingly convinced that the only sensible way to do it is for the repeater to pretend to be a controller and have the "far away" devices "bind" to it, and then have it do a pretend binding to the real controller so that it can store and (re-address and) forward messages as necessary. I'm not sure simply receiving and re-broadcasting will work. I suspect it will confuse some devices and you'll definitely end up getting collisions - when a device makes a request from the controller, for example, and the controller responds at the same time as your repeater is re-broadcasting. And I don't think a simple delay will work, because there's only a relatively narrow window when the battery-operated devices are awake listening to transmissions, and if you're not careful your delayed re-transmission will miss that window.

    @MrB - there's dirty and there's destroy your professional reputation :-)

    @StuartP - I honestly don't know. I don't think it's super heavyweight, but it does need to be able to synchronously clock-in serial data at 38400 baud. Even at 8MHz, that only gives you about 200 clock cycles per bit. You're going to struggle with anything slower than 8MHz. To be fair, the board manufacturers have sadly not linked up the CC1100 to the Atmel's UART pins, so I've had to build a software UART. If they had, I think things would be nicer because I'd just program the UART and get raw bytes from the radio. Also, the CC1100 is capable of doing packet handling, but it's not configurable enough to allow it to interpret the Rameses II protocol in hardware. So I end up synchronously reading raw bits (not bytes) from the radio and doing all the packet handling (preamble, start/stop bits, etc.) in software.

    I'm increasingly warming to the idea of ditching the controller and writing my own one! That way I could build in repeaters, unlimited zones, etc.

  7. #7
    Automated Home Guru
    Join Date
    Dec 2014
    Posts
    149

    Default

    just chiming in to say that you can get a HGI80 via ebay for not much more than it costs to roll your own - the ebay seller I used had an "offer" function so don't be mislead by the advertised price

  8. #8
    Automated Home Jr Member
    Join Date
    Jan 2018
    Posts
    17

    Default

    I've just bought myself one of these
    [https://www.smarthome-agentur.de/pro...ick-fuer-fhem/ ~42 euro delivered in 2-3 days (If you're competent with a soldering iron there are kit forms for less).

    Essentially it's an Arduino Nano V3 (http://www.pighixxx.com/test/pinouts/boards/nano.pdf) with a CC1101 piggy backed on.

    It comes with the nanoCUL build of culfw installed but that doesn't support the evoHOME option (it needs 2 UARTs)

    So I downloaded the current master branch of @dty's evofw2.
    Added a new HW include file to define the i/o + baudrate (76800) and updated config.h.
    Made a few mods to Makefile (MCU=atmega328p, F_CPU=16000000 and some AVRDUDE parameters).

    Hooked it up to putty on windows and bingo, could see all the messages being sent by Wifi, HR92s and BDR91. RX definitely working with occasional errors (mainly BAD STOP BIT).

    I want to test TX but not sure of command format - can anybody provide me with a simple command that I can use to prod something in the system?

    Once I know that's working I'll clone the git and do the edit's properly. (@dty we may need to discuss how best to handle the Makefile)

  9. #9
    Automated Home Ninja
    Join Date
    Aug 2016
    Posts
    489

    Default

    Excellent news! Send me a PM with your email and I’ll add you to a Slack chat room where a few of us discuss this stuff (although it’s been pretty quiet of late).

    If you hook it up to Domoticz, it can write in the correct format. I think from memory that it’s broadly the same as the receive format but with the first field (RSSI) removed. Having said that, I’m not convinced sending is working at the moment.

  10. #10
    Automated Home Jr Member
    Join Date
    Jan 2018
    Posts
    17

    Default

    Quote Originally Posted by dty View Post
    Send me a PM with your email
    @dty it appears you're exceeding your stored private message quota :-)

    Quote Originally Posted by dty View Post
    If you hook it up to Domoticz, it can write in the correct format
    I'm currently running Domoticz on a Synology and I have all the USB ports in use :-( Planning to switch it to a pi I've got lying around.
    Meanwhile I want to try to prove the port in as simple an environment as possible.

    I'm just looking for the format of a simple command that will provoke a response.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •