[quote=“cybrmage, post:57, topic:199107”]@amg0: With version 0.9, I am seeing the pluging crash when setAttrIfChanged is called… Specifically, it is being passed the modelid for an Ecosmart bulb, and the value is nil causing the string.format function in the debug statement to error out…
2018-04-13 12:41:36.041 luup_log:76: ALTHUE: debug: data:{"2":{"etag":"f5ec436d66027f7b14258aca04695b27","hascolor":false,"manufacturername":"2.1.0_16d_YF05","modelid":null,"name":"Light 2","state":{"alert":"none","bri":25,"on":false,"reachable":true},"swversion":null,"type":"Dimmable light","uniqueid":"dd:16:ab:ff:f1:a1:67:70-01"}}
2018-04-13 12:41:36.041 luup.variable_set:: 76.urn:upnp-org:serviceId:althue1.LastValidComm was: 1523644896 now: 1523644896 #hooks:0
2018-04-13 12:41:36.041 luup_log:76: ALTHUE: debug: ALTHueHttpCall(76,GET,sensors,)
2018-04-13 12:41:36.041 luup_log:76: ALTHUE: debug: Calling Hue with GET http://192.168.1.124/api/AADD8AA672/sensors , body:
2018-04-13 12:41:36.061 luup_log:76: ALTHUE: debug: request:1
2018-04-13 12:41:36.061 luup_log:76: ALTHUE: debug: code:200
2018-04-13 12:41:36.061 luup_log:76: ALTHUE: debug: data:{"1":{"config":{"configured":true,"on":true,"sunriseoffset":30,"sunsetoffset":-30},"etag":"529620323fdefbfa2f549f9c32fa48c7","manufacturername":"Philips","modelid":"PHDL00","name":"Daylight","state":{"daylight":true,"lastupdated":"2018-04-13T13:27:04","status":160},"swversion":"1.0","type":"Daylight","uniqueid":"00:21:2e:ff:ff:01:02:e5-01"}}
2018-04-13 12:41:36.061 luup.variable_set:: 76.urn:upnp-org:serviceId:althue1.LastValidComm was: 1523644896 now: 1523644896 #hooks:0
2018-04-13 12:41:36.062 luup_log:76: ALTHUE: debug: SyncLights(76)
2018-04-13 12:41:36.062 luup.chdev.append:: [dd:16:ab:ff:f1:a1:67:70-01] Hue Light 2
2018-04-13 12:41:36.062 luup_log:76: ALTHUE: debug: SyncSensors(76)
2018-04-13 12:41:36.062 luup.chdev.sync:: [76] raspbeegw, syncing children
2018-04-13 12:41:36.062 luup_log:76: ALTHUE: debug: InitDevices(76) MapUID2Index is: {"dd:16:ab:ff:f1:a1:67:70-01":"2"}
2018-04-13 12:41:36.062 luup_log:76: ALTHUE: debug: setAttrIfChanged(name,Hue Light 2,77)
2018-04-13 12:41:36.062 luup_log:76: ALTHUE: debug: setAttrIfChanged(manufacturer,2.1.0_16d_YF05,77)
2018-04-13 12:41:36.063 luup.attr_set:: 77.manufacturer = 2.1.0_16d_YF05
2018-04-13 12:41:36.063 openLuup.context_switch:: ERROR: [string "L_ALTHUE.lua"]:150: bad argument #3 to 'format' (string expected, got nil)
2018-04-13 12:41:36.063 luup.delay_callback:: function: 0x1c321e0 ERROR: [string "L_ALTHUE.lua"]:150: bad argument #3 to 'format' (string expected, got nil)
[/quote]
I have put a v0.91 on github which should fix this issue. if it works, please report back the device name/type so we know what is compatible
thx !