Home Assistant does not recognise CCU2 but recognise wireless component

But i don’t see any of my variables and the CCU2 doesn’t show up in the HomeAssistant UI and isn’t recogniced by Home Assistant.

The CCU not showing up was because of a bug. It has been fixed. Home Assistant 0.62 has been releasen today. So if you update, you should get at least the card with the sum of the current service messages. As said before, the variables are a general bug in the CCU, so I can’t do anything about that. Usually people get errors when they have the bug, so I’m not sure why it is not working for you.
Anyways, please first update Home Assistant so we can verify that you get the CCU2 entity.

After the Uptdate it finaly works, variables (like you mentioned) dosen’t show but the ccu2 card with the numbers of service messages apper.
Thank you very very much for the quick replies… :slight_smile:

Anyways one last question, can i set a variable for the ccu2 from home assistant (need this for HM-Dis-WM55) so to speak that i can change a variable with home assistant for the ccu2?

Vielen Danke und schönes restliches Wochenende. :wink:

Yes, variables could work even when HA is not able to get them. The automation to do that for a boolean would look something like this:

  service: homematic.set_variable_value
    entity_id: homematic.ccu2
    name: Variablename
    value: true

Tried allready this or is this wrong? (Btw doesn’t work)

Edit: Tried it allready with 1 and 0 but no change

For me that works without a problem. Did you have a look at the logs while calling the service? Maybe the problem that prevents you from receiving the variables also prevents you from setting them.
PS: For a boolean variable all these variants should work (they do for me):

  • "true" / "false"
  • true / false
  • 1 / 0

Here is the log:

e[31m2018-01-28 14:32:41 ERROR (SyncWorker_23) [homeassistant.components.homematic] Variable Alarmanlage not found on ccu2e[0m

but on the CCU2 the variable exists:

Or is this the bug on the CCU2 that it couldn’t read the variables?

Could you increase the log level to debug? I would need to see what exactly happens in the pyhomematic module. So just like the log messages you have posted earlier.

If you want you can also use this to manually do what HA tries to do when getting variables. Maybe it gives us a hint of where the probem ist.

Attached the full log from my HA.
You find the ERROR in line: 2992 and 3454 (called the service two times), i only see this error and no other error…

Edit: Do i have to install the XML-API or are you talking to the ccu2 through the XML-RPC module?

home-assistant.yaml (790.8 KB)

It doesn’t even try to get the variables via the JSON-RPC API. It uses the method where no username and password are required, which only works when using Homegear. Are you sure you have properly set up a username and password on the CCU2? And also added those to the host-part of your configuration parameters?

Edit: The XML-API is only used to resolve device names (turn QEQ123456 to Waschmaschine). But that’s optional since the same can be done via JSON-RPC, and every CCU2 can do that without any modification and just a user to authenticate.

@danielperna84 just tried to set a variable on my setup too, but same result as @ich777:

ERROR (SyncWorker_1) [homeassistant.components.homematic] Variable Alle not found on ccu2

tried your test python script:

root@homeassistant:/usr/src/app# python3 /config/scripts/testscript.py                                                
DEBUG:__main__:jsonRpcPost: Method: Session.login                                                                     
DEBUG:__main__:jsonRpcPost: API-Endpoint:                                       
DEBUG:__main__:Result: {'id': 0, 'version': '1.1', 'result': 'aM86MNmhds', 'error': None}                             
DEBUG:__main__:jsonRpcPost: Method: Interface.listInterfaces                                                          
DEBUG:__main__:jsonRpcPost: API-Endpoint:                                       
DEBUG:__main__:Got interface: BidCos-RF                                                                               
DEBUG:__main__:jsonRpcPost: Method: Device.listAllDetail                                                              
DEBUG:__main__:jsonRpcPost: API-Endpoint:                                       
DEBUG:__main__:Resolving devicenames                                                                                  
DEBUG:__main__:Handling device: NEQ1761410                                                                            
DEBUG:__main__:Name: Badezimmer Fenster                                                                               
DEBUG:__main__:Handling device: LEQ0545202                                                                            
DEBUG:__main__:Name: Badezimmer Fussbodenheizung                                                                      
DEBUG:__main__:Handling device: LEQ0596781                                                                            
DEBUG:__main__:Name: Wohnzimmer Thermostat                                                                            
DEBUG:__main__:jsonRpcPost: Method: SysVar.getAll                                                                     
DEBUG:__main__:jsonRpcPost: API-Endpoint:                                       
ERROR:__main__:jsonRpcPost: Exception parsing JSON: Invalid \escape: line 1 column 58 (char 57)                       
WARNING:__main__:getAllSystemVariables: Exception: 'error'                                                            
INFO:__main__:Variables: {}                                                                                           
DEBUG:__main__:jsonRpcPost: Method: Session.logout                                                                    
DEBUG:__main__:jsonRpcPost: API-Endpoint:                                       

That’s the usual CCU bug. I have added a possible workaround for that in the latest _hm.py. If you don’t use hassio you could replace that file and see if it solved the problem for you.

1 Like

@danielperna84 thanks for the quick workaround, but with this its still not working:

2018-01-30 07:43:53 ERROR (SyncWorker_1) [pyhomematic._hm] RPCFunctions.jsonRpcPost: Exception: Expecting value: line 1 column 1 (char 0)

But nevermind, I will try to correct the CCU bug by myself directly on my CCU2 as described here: https://github.com/jens-maus/RaspberryMatic/commit/87a83f3b81ab19124f88e17a26b2b75978ecf794

I will give feedback :slight_smile:

hey its working :slight_smile:

you have to login on the ccu2 with SSH, then:

mount -o remount,rw /

edit the file as described here: https://github.com/jens-maus/RaspberryMatic/commit/87a83f3b81ab19124f88e17a26b2b75978ecf794

mount -o remount,ro /

reboot the CCU.

Thats all. Please keep in mind that you have to do this every time you update the firmware of your CCU2, as this is a bug and its not fixed by EQ3.

Thanks @danielperna84 for your patience, I am happy now :wink:


Thank you so much for your patience and help @danielperna84 and @nicx works now like charm.

Also the CCU2 fix for the bug is working perfect!

1 Like

Can somebody tell me how this fix can be applied to a CCU2 (I’m not using RaspberryMatic but an actual CCU2 hardware).

I think nicx’s mentioned patch just solves it for RaspberryMatic.

My CCU2 has v2.31.25 and I’m using Hass.IO 0.64.3.

I get following error message being logged 1-2 times per minute:

RPCFunctions.jsonRpcPost: Exception: Expecting value: line 1 column 1 (char 0)
/components/homematic/__init__.py (ERROR)

And I see the ccu2 in the HASS.IO UI but no variables and just a “0” as well as I’m not able to set any variable.

The fix described above is meant for the CCU. You have to enable SSH access in the settings of the CCU and then follow the steps. You don’t have to change anything at your HA-configuration. At the point where you are you already get everything you need, but with the buggy output. So all you need to do is apply the patch. Afterwards everything should be working.

And the CCU bug is exactly the reason why you just get the 0 (number of service messages). The CCU bug prevents HA from getting the variables.

Sorry, then I don’t get the point how to proceed. Because I already was on my CCU2 via SSH.

This would be the steps I would do:

  1. Login to the CCU via SSH (I use WinSCP and start a terminal) => DONE

  2. Type in the terminal the command “mound -o remount,rw /” => DONE

  3. What should I do now? nicx’s link contains a patch file “0025-WebUI-Fix-JSON-Response.patch” and the original as well as the modified “json.tcl” file. Do I have to copy the patch to somewhere on the CCU via SSH and replace my CCU’s “json.tcl” by the modified one from the link? But where do I find that?
    Do I have to start the patch file? How?

  4. Type in the terminal the command “mound -o remount,ro /”

  5. Reboot the CCU

I’ve edited the file (occu/WebUI/www/api/eq3/json.tcl) and removed the 2 lines that are red (https://github.com/jens-maus/RaspberryMatic/commit/87a83f3b81ab19124f88e17a26b2b75978ecf794).

+-    "\{" "\\\{"
+-    "\[" "\\\["

Thanks for the feedback. Everything is working fine now!

Just for others having the same issues:

  • my json.tcl file was located here on my CCU2: /www/api/eq3/json.tcl
    => I just removed the two lines mentioned by “ich777”, that’s it!
  • after my CCU reboot three climate thermostats didn’t provide a status anymore (current temp., active program [man, auto, boost]) but I could access them via CCU’s device settings. The solution: Just delete the respective devices in the CCU and start the learn procedure again as you had to do initially. That’s it, the devices are working fine again!
1 Like