Project

General

Profile

Bug #605

DomotiGa crash after creating Osram Plug device

Added by OWK over 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DomotiGa3
Target version:
Start date:
05/22/2016
Due date:
% Done:

100%

Estimated time:
Resolution:
Fixed

Description

Today I added an Osram Plug (version 1.04.12 and Zigbee lightLink protocol) to my Hue configuration.
DomotiGa is running release 1.0.21 in client/server set-up, with no major problems.

Data on this plug you can find here: http://www.osram.nl/osram_bx/nl/producten/verlichtingscomponenten/lightify-controlunits/lightify-home/lightify-plug/index.jsp

After creating the device in the Hue bridge, DomotiGa reports it has found a new device and is not able to create it automatically in de system.

After creating the device manually in DomotiGa with address 8, the server crashes constantly and without notice; The client keeps runing. I assume at the moment receiving data from the Hue Bridge tying to match the received data to the devices configured.

Here is the data I've compiled around this issue grouping information into:
  1. Before adding an Osram Plug, DomotiGa debug for Hue shows
  2. After adding the Osram plug to the Hue set-up, using the Philips App (old version)
  3. After manually crating a device with address 8
  4. Analysis of then data received form Hue after adding the plug to the Hue bridge

Have to restart DomotiGa, but it only starts if the manually created Hue device (with address 8) is removed.

Two main thought up till now:
  • Looks like the Osram plug is not using the field where Philips wn devices put something like BRI:XXX.
  • Could also be that DomotiGa does not like that addresses are not continues? (7 is missing in my setup)

1: Before adding an Osram Plug, DomotiGa debug for Hue shows:

2016/05/22 13:44:07 [PhilipsHue] Received json: '{"name": "Hue VS 21","zigbeechannel": 20,"bridgeid": "001788FFFE2200F0","mac": "00:17:88:22:00:f0","dhcp": true,"ipaddress": "192.168.178.14","netmask": "255.255.255.0","gateway": "192.168.178.254","proxyaddress": "none","proxyport": 0,"UTC": "2016-05-22T11:44:06","localtime": "2016-05-22T13:44:06","timezone": "Europe/Amsterdam","modelid": "BSB002","swversion": "01033370","apiversion": "1.13.0","swupdate":{"updatestate": 0,"checkforupdate": false,"devicetypes": { "bridge": false, "lights": [], "sensors": []},"url": "","text": "","notify": true},"linkbutton": false,"portalservices": true,"portalconnection": "connected","portalstate":{"signedon": true,"incoming": true,"outgoing": true,"communication": "disconnected"},"factorynew": false,"replacesbridgeid": null,"backup":{"status": "idle","errorcode": 0},"whitelist":{"D0559uWqJQD6bel3":{"last use date": "2016-03-26T09:34:27","create date": "2015-12-31T10:14:31","name": "Hue#Yyyy's padje"},"lTpKQaSZunc4Jtjg":{"last use date": "2016-05-20T06:45:38","create date": "2016-01-01T13:11:40","name": "Hue#iPhone van Xxxx"},"3a61251d7a925e8521af95787f94a685":{"last use date": "2016-05-22T11:44:06","create date": "2016-01-04T21:22:40","name": "DomotiGa"},"1c6f438f743feade19027159f2e1146":{"last use date": "2016-01-25T14:34:50","create date": "2016-01-12T18:38:42","name": "Harmony Hub"},"9ed420b5f71f3d646a15f283438ad61":{"last use date": "2016-05-22T11:44:06","create date": "2016-01-30T10:57:12","name": "Harmony Hub"},"64e7a3c25e56965b2c9edb657527add1":{"last use date": "2016-05-01T09:08:44","create date": "2016-03-26T18:23:48","name": "Hue#iPad van Xxxx"},"123abc":{"last use date": "2016-04-03T21:26:43","create date": "2016-04-03T21:26:43","name": "huelabs-user"},"123abc":{"last use date": "2016-04-03T21:27:02","create date": "2016-04-03T21:27:02","name": "huelabs-user"},"13abc":{"last use date": "2016-04-03T21:27:41","create date": "2016-04-03T21:27:41","name": "huelabs-user"},"123abc":{"last use date": "2016-04-03T21:37:00","create date": "2016-04-03T21:37:00","name": "huelabs-user"},"123abc":{"last use date": "2016-05-05T07:38:46","create date": "2016-05-01T10:53:58","name": "Hue 2#iPhone van Xxxx"}}}'
2016/05/22 13:44:07 [PhilipsHue] PhilipsHue required bridge version: 1.3.0 currently using: 1.13.0

2016/05/22 13:45:17 [PhilipsHue] Received json: '{"1":{"state": {"on":false,"bri":207,"alert":"none","reachable":true}, "type": "Dimmable light", "name": "Eettafel 1", "modelid": "LWB006", "manufacturername": "Philips","uniqueid":"00:17:88:01:10:59:1c:123abc", "swversion": "5.38.1.15095"},"2":{"state": {"on":false,"bri":207,"alert":"none","reachable":true}, "type": "Dimmable light", "name": "Eettafel 2", "modelid": "LWB006", "manufacturername": "Philips","uniqueid":"00:17:88:01:10:59:41:123abc", "swversion": "5.38.1.15095"},"3":{"state": {"on":false,"bri":207,"alert":"none","reachable":true}, "type": "Dimmable light", "name": "Eettafel 3", "modelid": "LWB006", "manufacturername": "Philips","uniqueid":"00:17:88:01:10:50:19:123abc", "swversion": "5.38.1.15095"},"4":{"state": {"on":false,"bri":115,"alert":"none","reachable":true}, "type": "Dimmable light", "name": "Voordeur", "modelid": "LWB006", "manufacturername": "Philips","uniqueid":"00:17:88:01:10:57:123abc", "swversion": "5.38.1.15095"},"5":{"state": {"on":false,"bri":204,"alert":"none","reachable":true}, "type": "Dimmable light", "name": "Zithoek 19a", "modelid": "LWB006", "manufacturername": "Philips","uniqueid":"00:17:88:01:10:40:123abc", "swversion": "5.38.1.15095"},"6":{"state": {"on":false,"bri":254,"hue":9190,"sat":29,"effect":"none","xy":[0.3945,0.3850],"ct":370,"alert":"none","colormode":"ct","reachable":true}, "type": "Extended color light", "name": "Badkamer ledstrip", "modelid": "LST002", "manufacturername": "Philips","uniqueid":"00:17:88:01:01:1c:123abc", "swversion": "5.50.2.16151"}}'

2: After adding the Osram plug (versie 1.04.12) to the Hue set-up, using the Philips App (old version)

2016/05/22 14:09:07 [Devices] Device with type 'Plug 01', address '8', instance 1' and interface 'Philips Hue Interface' not found!
2016/05/22 14:09:07 [Devices] Auto device create for 'Huiskamer multimedia plug Osram #1' failed because it's unknown!
2016/05/22 14:09:07 [Devices] Device type: Plug 01
2016/05/22 14:09:07 [Devices] Address: 8
2016/05/22 14:09:07 [Devices] Interface: 'Philips Hue Interface' (58)
2016/05/22 14:09:07 [Devices] Instance: 1
2016/05/22 14:09:07 [Devices] Please report this to
2016/05/22 14:09:07 [Devices] Also note that you can probably simply create this device manually, and selecting a devicetype similar to the one missing.

3: Json string after adding th Osram Plug, but before creating the deviace manually in DomotiGa:

2016/05/22 14:15:27 [PhilipsHue] Received json: '{"1":{"state": {"on":false,"bri":207,"alert":"none","reachable":true}, "type": "Dimmable light", "name": "Eettafel 1", "modelid": "LWB006", "manufacturername": "Philips","uniqueid":"00:17:88:01:10:59:1c:123abc", "swversion": "5.38.1.15095"},"2":{"state": {"on":false,"bri":207,"alert":"none","reachable":true}, "type": "Dimmable light", "name": "Eettafel 2", "modelid": "LWB006", "manufacturername": "Philips","uniqueid":"00:17:88:01:10:59:41:123abc", "swversion": "5.38.1.15095"},"3":{"state": {"on":false,"bri":207,"alert":"none","reachable":true}, "type": "Dimmable light", "name": "Eettafel 3", "modelid": "LWB006", "manufacturername": "Philips","uniqueid":"00:17:88:01:10:50:19:123abc", "swversion": "5.38.1.15095"},"4":{"state": {"on":false,"bri":115,"alert":"none","reachable":true}, "type": "Dimmable light", "name": "Voordeur", "modelid": "LWB006", "manufacturername": "Philips","uniqueid":"00:17:88:01:10:57:c6:123abc", "swversion": "5.38.1.15095"},"5":{"state": {"on":false,"bri":204,"alert":"none","reachable":true}, "type": "Dimmable light", "name": "Zithoek 19a", "modelid": "LWB006", "manufacturername": "Philips","uniqueid":"00:17:88:01:10:40:d0:123abc", "swversion": "5.38.1.15095"},"6":{"state": {"on":false,"bri":254,"hue":9190,"sat":29,"effect":"none","xy":[0.3945,0.3850],"ct":370,"alert":"none","colormode":"ct","reachable":true}, "type": "Extended color light", "name": "Badkamer ledstrip", "modelid": "LST002", "manufacturername": "Philips","uniqueid":"00:17:88:01:01:1c:65:123abc", "swversion": "5.50.2.16151"},"8":{"state": {"on":false,"alert":"select","reachable":true}, "type": "On/Off plug-in unit", "name": "Huiskamer multimedia plug Osram", "modelid": "Plug 01", "manufacturername": "OSRAM","uniqueid":"84:18:26:00:00:09:cd:123abc", "swversion": "V1.04.12"}}'

After manually crating a device with address 8 (and optionally manual control it via DomotiGa):

2016/05/22 14:22:35 [Client] ERROR: 'Unable to Connect to Host (-1007)' when posting to URL 'http://192.168.178.13:9090'. Method: 'device.set'.

Analysis of then data received form Hue after adding the plug to the Hue bridge

See attached XLSX file

OsramPlugViaHue.xlsx (5.49 KB) OsramPlugViaHue.xlsx OWK, 05/22/2016 03:45 PM
server-main-2016-05.log (218 KB) server-main-2016-05.log OWK, 05/22/2016 06:25 PM
server-debug-2016-05(2).log (608 KB) server-debug-2016-05(2).log Edited some names and ID's OWK, 05/22/2016 06:44 PM
CPhilipsHue.class (17.6 KB) CPhilipsHue.class Alexie, 05/22/2016 07:16 PM

History

#1 Updated by Alexie over 3 years ago

The POST error is client/server, not sure your server is running? What other error are you getting - which causes the crash?

#2 Updated by Alexie over 3 years ago

server logs could help?

#3 Updated by OWK over 3 years ago

Dear Alexie

This is the server OS information, running on a Cubie Truck hardware:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.04
DISTRIB_CODENAME=vivid
DISTRIB_DESCRIPTION="Ubuntu 15.04"
NAME="Ubuntu"
VERSION="15.04 (Vivid Vervet)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 15.04"
VERSION_ID="15.04"

The information you requested is now added to this issue. The analysis I did and provided was basically Debug info, because I was aware of this going to happen and I switched debug for Hue interface on before starting.

One problem with DomotiGa recurring each 2-3 months is with RRD batchfiles. You'ĺl find it in the debug log as well, recently on 2016-05-12.

Current status for the problem reported:
I recreated the Hue device with address 8 again, this stopped the message that a device is not found. I did not switch the new device in 'control' on the client otherwise DomotiGa would crash again. The Hue interface is working fine and no errors are reported in Main/Debug

Regards
OWK

#4 Updated by Alexie over 3 years ago

I need to check your logging further, but i found out that "Osram Plug 01" doesn't support the "bri" value. I am not 100% familair with the Hue API, but it seems mandatory? Anyway, we shouldn't crash on it ;-) I added support for the missing bri value too.

It is fixed in the BETA, including auto-create of the Osram device. To fix it on your 1.0.021, install and compile the attached file.

#5 Updated by Alexie over 3 years ago

  • Category set to DomotiGa3
  • Assignee set to Alexie
  • Target version set to 1.0.023

#6 Updated by OWK over 3 years ago

Thanks Alexie,

That is really quick, you've set a record here and impressed me ;-)

Compiling will be a first for me, but I can manage I think.
Also I have to be frank that my time frame will be Wednesday before I can do this. Hope this is not offending you after the response you gave ;-)

Best regards
OWK

#7 Updated by Alexie about 3 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100
  • Resolution set to Fixed

Just waiting on your confirmation ;-)

#8 Updated by OWK about 3 years ago

Hi Alexie

Before the update with the Osram plug switched On would crash DomotiGa. Now after the update, DomotiGa keeps running
Seems OK, but need more testing.

Can you confirm I followed the correct procedure?
This is what I did:
  1. rename the old CPhilipsHue.class files to CPhilipsHue.old in the folder of DomotiGa3 and DomotiGaServer3 on the server
  2. copy the new CPhilipsHue.class file to the .src folder of DomotiGa3 and DomotiGaServer3
  3. Stop the DomotiGa server
  4. cd ~/domotiga
  5. /tools/compile.sh (2 times OK is received)
  6. start the server

Regards
OWK

#9 Updated by Alexie about 3 years ago

Yes, the procedure is correct. Ok, if no crash and you can switch it on/off, then we are there ;-)

#10 Updated by OWK about 3 years ago

Confirmed, I can switch the Osram plug on/off without crashing the server.

I couldn't switch it earlier because my girl was watching a concert from the server with the Media player mains running via the Osram plug. Don't want to feed the WAF negative ;-)

Now I have to solve a problem with the Logitech home control remote. It can only switch the Osram plug connected to Hue bridge off, not on. Of course this is not a DomotiGa problem but a Logitech or Osram problem ;-)

Thanks again
OWK

#11 Updated by rdnzl almost 3 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF