Converting a MAX! Cube to CUL/CUN to use with Home Assistant

Hi @capfirepants,

I just pushed an update to my repo, please try again.

With this version, I have verified the functioning a few days ago with the standard hassio image on RaspberryPi 3.

Thanks. I wasnā€™t able to get the new version, I get this error in the logs:
19-04-11 09:31:16 WARNING (MainThread) [hassio.addons.data] Can't read /data/addons/git/bdf3b3e1/homegear/config.json: required key not provided @ data['arch']. Got None
I think the following key needs to be added to the config.json
"arch": ["armhf"]

Edit: Confirmed, manually adding the key makes it work

Great. I just added this to the repo.

Thanks for the update - trying to start, I get the following error message now:

19-04-11 10:50:12 INFO (SyncWorker_11) [hassio.docker.addon] Build 69c7aa1d/armv7-addon-homegear:0.3.1 done
19-04-11 10:50:16 ERROR (SyncWorker_12) [hassio.docker] Can't start addon_69c7aa1d_homegear: 500 Server Error: Internal Server Error ("linux runtime spec devices: error gathering device information while adding custom device "/dev/ttyUSB0": no such file or directory")
19-04-11 10:50:23 INFO (SyncWorker_2) [hassio.docker.interface] Clean addon_69c7aa1d_homegear application

If I understand correctly this is a hass.io error, might be similar to this: Addon does not start Ā· Issue #62 Ā· hassio-addons/addon-node-red Ā· GitHub
Also, there are no ports being shown in the hass.io overview:

Edit2: I forked your code and removed the line about usbtty0 from the config.json. I was able to start the server now, but it says /admin is missing when trying to access the server.

Startup log:

04/11/19 14:12:23.110 Starting IPC server...
04/11/19 14:12:23.146 Startup complete. Waiting for physical interfaces to connect.
04/11/19 14:12:23.146 Info: Waiting for physical interfaces to connect (0 of 180s).
04/11/19 14:12:23.146 All physical interfaces are connected now.
04/11/19 14:12:23.147 Starting UPnP server...
04/11/19 14:12:23.149 Info: Created new UPnP UDN: 7BBA71A2-15E3-F266-9388-E39EECDBB740
04/11/19 14:12:23.150 Info: UPnP server: Binding to address: 192.168.99.30
04/11/19 14:12:23.150 UPnP Server: Info: Started listening.
04/11/19 14:12:23.427 IPC Server: Info: Connection accepted. Client number: 7
04/11/19 14:12:23.850 IPC Server: Info: Connection accepted. Client number: 8
04/11/19 14:12:23.852 IPC Server: Info: Client 1 successfully registered RPC method "influxdbGetDatabase" (this method is registered by 1 client(s)).
04/11/19 14:12:23.855 IPC Server: Info: Client 1 successfully registered RPC method "influxdbSetLogging" (this method is registered by 1 client(s)).
04/11/19 14:12:23.857 IPC Server: Info: Client 1 successfully registered RPC method "influxdbGetLoggedVariables" (this method is registered by 1 client(s)).
04/11/19 14:12:23.859 IPC Server: Info: Client 1 successfully registered RPC method "influxdbQuery" (this method is registered by 1 client(s)).
04/11/19 14:12:23.861 IPC Server: Info: Client 1 successfully registered RPC method "influxdbWrite" (this method is registered by 1 client(s)).
04/11/19 14:12:23.863 IPC Server: Info: Client 1 successfully registered RPC method "influxdbCreateContinuousQuery" (this method is registered by 1 client(s)).
04/11/19 14:12:24.300 IPC Server: Info: Client 0 successfully registered RPC method "managementGetCommandStatus" (this method is registered by 1 client(s)).
04/11/19 14:12:24.302 IPC Server: Info: Client 0 successfully registered RPC method "managementSleep" (this method is registered by 1 client(s)).
04/11/19 14:12:24.304 IPC Server: Info: Client 0 successfully registered RPC method "managementDpkgPackageInstalled" (this method is registered by 1 client(s)).
04/11/19 14:12:24.305 IPC Server: Info: Client 0 successfully registered RPC method "managementGetConfigurationEntry" (this method is registered by 1 client(s)).
04/11/19 14:12:24.307 IPC Server: Info: Client 0 successfully registered RPC method "managementServiceCommand" (this method is registered by 1 client(s)).
04/11/19 14:12:24.308 IPC Server: Info: Client 0 successfully registered RPC method "managementReboot" (this method is registered by 1 client(s)).
04/11/19 14:12:24.310 IPC Server: Info: Client 0 successfully registered RPC method "managementSetConfigurationEntry" (this method is registered by 1 client(s)).
04/11/19 14:12:24.312 IPC Server: Info: Client 0 successfully registered RPC method "managementWriteCloudMaticConfig" (this method is registered by 1 client(s)).
04/11/19 14:12:24.314 IPC Server: Info: Client 0 successfully registered RPC method "managementSetUserPassword" (this method is registered by 1 client(s)).
04/11/19 14:12:24.315 IPC Server: Info: Connection accepted. Client number: 9
04/11/19 14:12:24.316 IPC Server: Info: Client 2 successfully registered RPC method "managementGetCommandStatus" (this method is registered by 2 client(s)).
04/11/19 14:12:24.316 IPC Server: Info: Client 0 successfully registered RPC method "managementAptUpdate" (this method is registered by 1 client(s)).
04/11/19 14:12:24.317 IPC Server: Info: Client 0 successfully registered RPC method "managementAptUpgrade" (this method is registered by 1 client(s)).
04/11/19 14:12:24.319 IPC Server: Info: Client 0 successfully registered RPC method "managementAptFullUpgrade" (this method is registered by 1 client(s)).
04/11/19 14:12:24.320 IPC Server: Info: Client 0 successfully registered RPC method "managementHomegearUpdateAvailable" (this method is registered by 1 client(s)).
04/11/19 14:12:24.321 IPC Server: Info: Client 0 successfully registered RPC method "managementSystemUpdateAvailable" (this method is registered by 1 client(s)).
04/11/19 14:12:24.322 IPC Server: Info: Client 0 successfully registered RPC method "managementCreateBackup" (this method is registered by 1 client(s)).
04/11/19 14:12:24.323 IPC Server: Info: Client 2 successfully registered RPC method "managementSleep" (this method is registered by 2 client(s)).
04/11/19 14:12:24.324 IPC Server: Info: Client 0 successfully registered RPC method "managementRestoreBackup" (this method is registered by 1 client(s)).
04/11/19 14:12:24.325 IPC Server: Info: Client 0 successfully registered RPC method "managementCaExists" (this method is registered by 1 client(s)).
04/11/19 14:12:24.326 IPC Server: Info: Client 0 successfully registered RPC method "managementCreateCa" (this method is registered by 1 client(s)).
04/11/19 14:12:24.328 IPC Server: Info: Client 0 successfully registered RPC method "managementCreateCert" (this method is registered by 1 client(s)).
04/11/19 14:12:24.329 IPC Server: Info: Client 0 successfully registered RPC method "managementDeleteCert" (this method is registered by 1 client(s)).
04/11/19 14:12:24.329 IPC Server: Info: Client 2 successfully registered RPC method "managementDpkgPackageInstalled" (this method is registered by 2 client(s)).
04/11/19 14:12:24.330 IPC Server: Info: Client 0 successfully registered RPC method "managementGetNetworkConfiguration" (this method is registered by 1 client(s)).
04/11/19 14:12:24.331 IPC Server: Info: Client 0 successfully registered RPC method "managementSetNetworkConfiguration" (this method is registered by 1 client(s)).
04/11/19 14:12:24.333 IPC Server: Info: Client 0 successfully registered RPC method "managementCopyDeviceDescriptionFile" (this method is registered by 1 client(s)).
04/11/19 14:12:24.334 IPC Server: Info: Client 2 successfully registered RPC method "managementGetConfigurationEntry" (this method is registered by 2 client(s)).
04/11/19 14:12:24.336 IPC Server: Info: Client 2 successfully registered RPC method "managementServiceCommand" (this method is registered by 2 client(s)).
04/11/19 14:12:24.337 IPC Server: Info: Client 2 successfully registered RPC method "managementReboot" (this method is registered by 2 client(s)).
04/11/19 14:12:24.338 IPC Server: Info: Client 2 successfully registered RPC method "managementSetConfigurationEntry" (this method is registered by 2 client(s)).
04/11/19 14:12:24.345 IPC Server: Info: Client 2 successfully registered RPC method "managementWriteCloudMaticConfig" (this method is registered by 2 client(s)).
04/11/19 14:12:24.346 IPC Server: Info: Client 2 successfully registered RPC method "managementSetUserPassword" (this method is registered by 2 client(s)).
04/11/19 14:12:24.347 IPC Server: Info: Client 2 successfully registered RPC method "managementAptUpdate" (this method is registered by 2 client(s)).
04/11/19 14:12:24.348 IPC Server: Info: Client 2 successfully registered RPC method "managementAptUpgrade" (this method is registered by 2 client(s)).
04/11/19 14:12:24.348 IPC Server: Info: Client 2 successfully registered RPC method "managementAptFullUpgrade" (this method is registered by 2 client(s)).
04/11/19 14:12:24.349 IPC Server: Info: Client 2 successfully registered RPC method "managementHomegearUpdateAvailable" (this method is registered by 2 client(s)).
04/11/19 14:12:24.350 IPC Server: Info: Client 2 successfully registered RPC method "managementSystemUpdateAvailable" (this method is registered by 2 client(s)).
04/11/19 14:12:24.351 IPC Server: Info: Client 2 successfully registered RPC method "managementCreateBackup" (this method is registered by 2 client(s)).
04/11/19 14:12:24.352 IPC Server: Info: Client 2 successfully registered RPC method "managementRestoreBackup" (this method is registered by 2 client(s)).
04/11/19 14:12:24.353 IPC Server: Info: Client 2 successfully registered RPC method "managementCaExists" (this method is registered by 2 client(s)).
04/11/19 14:12:24.354 IPC Server: Info: Client 2 successfully registered RPC method "managementCreateCa" (this method is registered by 2 client(s)).
04/11/19 14:12:24.355 IPC Server: Info: Client 2 successfully registered RPC method "managementCreateCert" (this method is registered by 2 client(s)).
04/11/19 14:12:24.356 IPC Server: Info: Client 2 successfully registered RPC method "managementDeleteCert" (this method is registered by 2 client(s)).
04/11/19 14:12:24.357 IPC Server: Info: Client 2 successfully registered RPC method "managementGetNetworkConfiguration" (this method is registered by 2 client(s)).
04/11/19 14:12:24.358 IPC Server: Info: Client 2 successfully registered RPC method "managementSetNetworkConfiguration" (this method is registered by 2 client(s)).
04/11/19 14:12:24.359 IPC Server: Info: Client 2 successfully registered RPC method "managementCopyDeviceDescriptionFile" (this method is registered by 2 client(s)).
04/11/19 14:13:09.332 RPC Server (Port 2001): Info: Connection from ::ffff:10.8.0.6:56203 accepted. Client number: 10
04/11/19 14:13:09.332 RPC Server (Port 2001): Info: RPC server client id for client number 10 is: 0
04/11/19 14:13:09.335 Web server (Port 2001): Client is requesting: / (translated to /share/homegear/lib/homegear/www/rpc/index.php, method: GET)
04/11/19 14:13:09.336 Script Engine Server: Info: Spawning new script engine process.
04/11/19 14:13:10.057 Info: Setting allowed core file size to "4294967295" for user with id 105 and group with id 107.
04/11/19 14:13:10.057 Info: Core file size now is "4294967295".
04/11/19 14:13:10.057 Info: Setting maximum thread priority to "0" for user with id 105 and group with id 107.
04/11/19 14:13:10.057 Info: Maximum thread priority now is "0".
04/11/19 14:13:10.334 Script Engine Server: Info: Connection accepted. Client number: 11
04/11/19 14:13:10.335 Script Engine Server: Info: Client with pid 5493 successfully registered.
04/11/19 14:13:10.336 Script Engine Server: Info: Script engine process successfully spawned. Process id is 5493. Client id is: 0.
04/11/19 14:13:10.336 Script Engine Server: Info: Starting script "/share/homegear/lib/homegear/www/rpc/index.php" with id 1.
04/11/19 14:13:10.360 Info: Script with id 1 finished with exit code 0
04/11/19 14:13:10.620 RPC Server (Port 2001): Info: Connection from ::ffff:10.8.0.6:56208 accepted. Client number: 12
04/11/19 14:13:10.621 RPC Server (Port 2001): Info: RPC server client id for client number 12 is: 1
04/11/19 14:13:10.830 Warning: Requested URL not found: favicon.ico
04/11/19 14:13:23.606 RPC Server (Port 2002): Info: Connection from ::ffff:192.168.99.151:50768 accepted. Client number: 13
04/11/19 14:13:23.606 RPC Server (Port 2002): Info: RPC server client id for client number 13 is: 2
04/11/19 14:13:39.971 RPC Server (Port 2001): Info: Connection from ::ffff:10.8.0.6:56274 accepted. Client number: 14
04/11/19 14:13:39.972 RPC Server (Port 2001): Info: RPC server client id for client number 14 is: 3
04/11/19 14:13:40.132 Warning: Requested URL not found: favicon.ico
04/11/19 14:13:43.171 RPC Server (Port 2001): Info: Connection from ::ffff:10.8.0.6:56284 accepted. Client number: 15
04/11/19 14:13:43.172 RPC Server (Port 2001): Info: RPC server client id for client number 15 is: 4
04/11/19 14:13:43.180 Web server (Port 2001): Client is requesting: / (translated to /share/homegear/lib/homegear/www/rpc/index.php, method: GET)
04/11/19 14:13:43.180 Script Engine Server: Info: Starting script "/share/homegear/lib/homegear/www/rpc/index.php" with id 2.
04/11/19 14:13:43.198 Info: Script with id 2 finished with exit code 0
04/11/19 14:13:43.411 RPC Server (Port 2001): Info: Connection from ::ffff:10.8.0.6:56285 accepted. Client number: 16
04/11/19 14:13:43.412 RPC Server (Port 2001): Info: RPC server client id for client number 16 is: 5
04/11/19 14:14:25.562 RPC Server (Port 2002): Info: Connection from ::ffff:192.168.99.151:50769 accepted. Client number: 17
04/11/19 14:14:25.563 RPC Server (Port 2002): Info: RPC server client id for client number 17 is: 6
04/11/19 14:14:34.693 RPC Server (Port 2001): Info: Connection from ::ffff:10.8.0.6:56425 accepted. Client number: 18
04/11/19 14:14:34.694 RPC Server (Port 2001): Info: RPC server client id for client number 18 is: 7
04/11/19 14:14:34.852 Warning: Requested URL not found: favicon.ico
04/11/19 14:15:23.768 RPC Server (Port 2002): Info: Connection from ::ffff:192.168.99.151:50770 accepted. Client number: 19
04/11/19 14:15:23.768 RPC Server (Port 2002): Info: RPC server client id for client number 19 is: 8
04/11/19 14:16:05.739 RPC Server (Port 2002): Info: Connection from ::ffff:192.168.99.151:50771 accepted. Client number: 20
04/11/19 14:16:05.739 RPC Server (Port 2002): Info: RPC server client id for client number 20 is: 9

Another edit:
Accessing index.php directly gives me this:
grafik

Yet another edit: Looks like the adminui is missing. Do I need to add it somehow or is this by design?

Script Engine Server: Error: Could not execute script: Script file does not exist: /share/homegear/lib/homegear/admin-ui/public/index.php

Last Edit for this post: Finally got it to work. There is no config or ports on the addon overview page. All files can be edited from the share if you install the smb addon. I think there is no frontend, I just used the homematic manager like suggested in the first post. All works now!

1 Like

Hey,

I am a little bit stucked: I canā€™t really save the config (everytime I hit ā€œstartā€, the config code is erased). Is there something wrong in my syntax or is there another way to add the config and run the homegear server?

I am using hass.io v0.91.3.

Thanks a lot

hass

You have to edit the config files in /config/homegear/families. Create / edit the max.conf there.

Hi,

Thanks for the hint, but in my case there isnā€™t any folder like homegear in the /config. We are talking about the same folder where configurations.yaml or automations.yaml is stored, right?

I installed the add on via Hass.io, but when I try to start, it doesnā€™t (after a couple after clicking of seconds the ā€˜startā€™ link is marked red) and there is no folder created. Do I have to do this manually?

Greetings

hi everyone,

thanks for the instructions and all the advices. After a while, now it works so far but Iā€™m still struggling to control multiple thermostats in one room. Iā€™ve already tried to combine them together in a group, etc. But without any success. Has anyone any ideas for me how to set the mode and temperature for 2+ thermostats only at one thermostat at the frontend? Iā€™m very happy for any suggestions.

I control them via HomeGear and mqtt and running hass.io 0.91.4.

Hi. I made new installation of hassio (92.2). Now i install homegear and when I try to start in. Start button only marked red after few seconds. Does anyone have same problem? I have make setting for cun in config/homegear/
I use only cun connected via USB

EDIT
I have also notice that addon does not make folder Homegear.

Hi, ctreu, did you solve problem? I have same problem, addon does not create folder and i can not start up addon.

Hey,

I just reinstalled and made a ā€œhardā€ restart (plug off the raspi). Suddenly the folder appeared :wink:

Greetings

I canā€™t install it on 93.1 on a nuc (is reddish).

This add-on is not available on your system.

It happened with other addon, and my understanding is that can be fixed easily (like adding the different procressor), but I do not know how to do this

I can install addon on hassio 93.1 (on rpi3)

But when i try to start up i get log like this

19-05-19 19:06:24 ERROR (SyncWorker_1) [hassio.docker] Can't start addon_69c7aa1d_homegear: 500 Server Error: Internal Server Error ("linux runtime spec devices: error gathering device information while adding custom device "/dev/ttyUSB0": no such file or directory")

Enyone have idea why?

You can fix this by removing line 25-26 in the following file:

Follow this tutorial to install a downloaded copy of the repo:
https://developers.home-assistant.io/docs/en/hassio_addon_tutorial.html

Its ARM only. It can easily be extended for x86, but I currently have no time to do this.

adding proper processor in line 10?

"arch": ["armhf"],

I changed it

"arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],

and made a fork, testing now.

EDIT, not working :stuck_out_tongue: I guess is more then that

Every step of the description worked more or less well, but I`m struggeling at the last step, the integration of the homematic component into hassio. When I copy this into my config and restart the system, nothing happens.

"Now all your devices are added in HomeGear, we can finally get them into HomeAssistant - you should also see them listed if you hit the HomeGear server again at http://<HOMEGEAR_IP>:2001

Add the following to your Home Assistant configuration.yaml:-

homematic:

  • local_ip: <HOME_ASSISTANT_IP>*
  • local_port: 36845*
  • interfaces:*
  • wireless:*
  •  host: <HOMEGEAR_IP>*
    
  •  port: 2001*
    
  •  callback_ip: <HOME_ASSISTANT_IP>*
    
  •  callback_port: 36845*
    
  •  resolvenames: json*
    
  •  username: <HOMEGEAR_USER>*
    
  •  password: <HOMEGEAR_PASS>*
    

Restart Home Assistant once added - you should now magically see a bunch of homematic devices appear which correlate with your HomeGear devices.

Note, my device friendly names didnā€™t pull through from HomeGear to HA - Iā€™ve not looked into this yet, but I simply used the serial numbers to determine which device was which (since the serial is displayed next to the friendly name I assigned in HomeMatic Manager).
Then I added a friendly name using the UI in Home Assistant."

Even after an hour no thermostats appear. Has anyone any suggestions or hints? Thanks and best regards. I run Hassio 0.91.4. and homegear both on the same Pi.

Hi,
I noticed my wall thermostats time is not right so it messes up my schedule (fortunately weā€™re in summer!)
I canā€™t manage to set it via the thermostat itself, any idea how I should do it?
thanks!

Is there an alternative to homegear? Iā€™m having a lot of trouble with homegear, so would like to try anything else if possibleā€¦

Hi,

this is my log when it try to start homegear. Seams like ther is no permition to some folder?
Also it always stop a this line
Determining maximum thread count...


LOS10
Generating RSA private key, 2048 bit long modulus
.................+++++
..............................................................................................................+++++
e is 65537 (0x010001)
Signature ok
subject=C = AU, ST = Some-State, O = Internet Widgits Pty Ltd
Getting Private key
Generating DH parameters, 1024 bit long safe prime, generator 5
This is going to take a long time
....+.......................................................................................................................................................................+........................................................+.+..........................................................+....................................................................+.++*++*++*++*++*
DH parameters appear to be ok.
chmod: cannot access '/var/lib/homegear/db.sql': No such file or directory
/etc/init.d/homegear: line 94: ulimit: real-time priority: cannot modify limit: Operation not permitted
Starting Homegear: homegear08/05/19 22:26:21.967 Loading RPC server settings from /etc/homegear/rpcservers.conf
08/05/19 22:26:21.996 Loading RPC client settings from /etc/homegear/rpcclients.conf
08/05/19 22:26:22.045 Info: Setting allowed core file size to "4294967295" for user with id 0 and group with id 0.
08/05/19 22:26:22.046 Info: Core file size now is "4294967295".
08/05/19 22:26:22.046 Info: Setting maximum thread priority to "0" for user with id 0 and group with id 0.
08/05/19 22:26:22.046 Info: Maximum thread priority now is "0".
08/05/19 22:26:22.048 Info: Setting allowed core file size to "4294967295" for user with id 0 and group with id 0.
08/05/19 22:26:22.049 Info: Core file size now is "4294967295".
08/05/19 22:26:22.049 Info: Setting maximum thread priority to "0" for user with id 0 and group with id 0.
08/05/19 22:26:22.050 Info: Maximum thread priority now is "0".
cat: /boot/cmdline.txt: No such file or directory
.
/etc/init.d/homegear-management: line 62: ulimit: real-time priority: cannot modify limit: Operation not permitted
Starting homegear-management: homegear-management.
/etc/init.d/homegear-influxdb: line 67: ulimit: real-time priority: cannot modify limit: Operation not permitted
Starting Homegear-InfluxDB: homegear-influxdb.
08/05/19 22:26:22.064 Homegear version 0.7.40-2942
08/05/19 22:26:22.064 Git commit SHA of libhomegear-base: -
08/05/19 22:26:22.064 Git commit SHA of libhomegear-base: -
08/05/19 22:26:22.064 Git branch of libhomegear-base:     -
08/05/19 22:26:22.064 Git branch of libhomegear-base:     -
08/05/19 22:26:22.064 Git commit SHA of Homegear:         -
08/05/19 22:26:22.064 Git commit SHA of Homegear:         -
08/05/19 22:26:22.064 Git branch of Homegear:             -
08/05/19 22:26:22.064 Git branch of Homegear:             -
08/05/19 22:26:22.064 Determining maximum thread count...
08/05/19 22:26:30.432 Starting Homegear...
08/05/19 22:26:30.432 Homegear version 0.7.40-2942
08/05/19 22:26:30.433 Git commit SHA of libhomegear-base: -
08/05/19 22:26:30.433 Git branch of libhomegear-base:     -
08/05/19 22:26:30.433 Git commit SHA of Homegear:         -
08/05/19 22:26:30.433 Git branch of Homegear:             -
08/05/19 22:26:30.437 Starting Homegear...
08/05/19 22:26:30.437 Homegear version 0.7.40-2942
08/05/19 22:26:30.437 Git commit SHA of libhomegear-base: -
08/05/19 22:26:30.437 Git branch of libhomegear-base:     -
08/05/19 22:26:30.437 Git commit SHA of Homegear:         -
08/05/19 22:26:30.437 Git branch of Homegear:             -
08/05/19 22:26:30.437 Determining maximum thread count...