Page 1 of 1

Philips HUE errors in Domoticz

Posted: Friday 22 November 2019 14:54
by Kranendijk
Hi,

I hijacked another topic which I shouldn’t, apologies.

I encounter strange behaviour in Domoticz, my Philips HUE spits errors in the log. A bit of background.
It happened to me that the entire pi became unresponsive. I assumed it was due to the mosquitto mqtt broker I installed for using a tasmota flashed shelly1. After that the system really hung after a while (minutes, hours) at random times and the only remedy was a hard boot hoping not to destroy my os on Sd. I was lucky. Reinstalled the lot (latest stable, pi3) with the buster complete package. Also as usual dashticz.
No mqtt. No errors.

After a few days I decided to give it another shot using mqtt installation tutorial at https://maker.pro/raspberry-pi/tutorial ... spberry-pi.
Domoticz does not hang but since today I receive identical hue messages as well, bulbs were for sure not operated at that time:

2019-11-21 07:55:49.075 Error: Philips Hue: Error getting Light States, (Check IPAddress/Username)
2019-11-21 07:56:44.672 Error: Philips Hue: Error getting Light States, (Check IPAddress/Username)
2019-11-21 07:59:38.959 Error: Philips Hue: Error getting Light States, (Check IPAddress/Username)
2019-11-21 08:06:06.747 Error: Philips Hue: Error getting Light States, (Check IPAddress/Username)
2019-11-21 08:06:26.752 Error: Philips Hue: Error getting Light States, (Check IPAddress/Username)
2019-11-21 08:07:18.738 Error: Philips Hue: Error getting Light States, (Check IPAddress/Username)
2019-11-21 08:34:20.572 Error: Philips Hue: Error getting Light States, (Check IPAddress/Username)
2019-11-21 08:37:09.464 Error: Philips Hue: Error getting Light States, (Check IPAddress/Username)
2019-11-21 08:38:40.571 Error: Philips Hue: Error getting Light States, (Check IPAddress/Username)
2019-11-21 08:39:49.377 Error: Philips Hue: Error getting Light States, (Check IPAddress/Username)
2019-11-21 08:40:52.709 Error: Philips Hue: Error getting Light States, (Check IPAddress/Username)
2019-11-21 08:41:12.714 Error: Philips Hue: Error getting Light States, (Check IPAddress/Username)
2019-11-21 08:42:06.697 Error: Philips Hue: Error getting Light States, (Check IPAddress/Username)

And so forth...

Bulbs and domoticz work allright. Bridge is 3 weeks old, model 3241312018A it says on the back. Software on the HUE pack is up to date, I checked. Date october 24.

Looking for clues... And for the WAF a stable environment, planning to switch to full domoticz soon. Tablet is ready to go. Time to stop playing and start doing.

Could it be mqtt related? What can I do?

Re: Philips HUE errors in Domoticz

Posted: Friday 22 November 2019 17:27
by waaren
Kranendijk wrote: Friday 22 November 2019 14:54 I encounter strange behaviour in Domoticz, my Philips HUE spits errors in the log. A bit of background.
Could it be mqtt related? What can I do?
Could it be that your network and/or PI network interface is flooded with MQTT traffic ?
The Phillips hue hardware implementation in domoticz does poll the Hue bridge quite frequently and sometimes it does not get a timely response
What do you see if you give

Code: Select all

sudo mosquitto_sub -F "%U - %t - %p" -v -p 1883 -t '#'
command on the system with your MQTT broker ?
if you do not have mosquitto on your system yet do a

Code: Select all

sudo wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
sudo apt-key add mosquitto-repo.gpg.key
sudo apt install mosquitto mosquitto-clients
first

Re: Philips HUE errors in Domoticz

Posted: Friday 22 November 2019 19:03
by Kranendijk
Hi, thanks for the quick reply!

Mqtt is installed. When I issue the command I get a response like below:

pi@Pietje:~ $ sudo mosquitto_sub -F "%U - %t - %p" -v -p 1883 -t '#'
1574445722.735492773 - tele/sonoff/LWT - Offline
1574445731.054760514 - domoticz/out - {
"Battery" : 255,
"RSSI" : 12,
"description" : "",
"dtype" : "General",
"id" : "0000044D",
"idx" : 8,
"name" : "CPU",
"nvalue" : 0,
"stype" : "Percentage",
"svalue1" : "0.41",
"unit" : 1
}

1574445761.079223249 - domoticz/out - {
"Battery" : 255,
"RSSI" : 12,
"description" : "",
"dtype" : "Temp",
"id" : "1",
"idx" : 9,
"name" : "Temperatuur",
"nvalue" : 0,
"stype" : "LaCrosse TX3",
"svalue1" : "39.2",
"unit" : 1
}

1574445761.135867403 - domoticz/out - {
"Battery" : 255,
"RSSI" : 12,
"description" : "",
"dtype" : "General",
"id" : "0000044D",
"idx" : 8,
"name" : "CPU",
"nvalue" : 0,
"stype" : "Percentage",
"svalue1" : "0.21",
"unit" : 1
}


And that continues.
Yes, I named my Pi Pietje...

Does this provide some helpful information? It seems like it polls all devices like in a 10 second interval or so.

Re: Philips HUE errors in Domoticz

Posted: Friday 22 November 2019 19:11
by Kranendijk
If it is of any help: after letting the command run for half an hour or so I checked the Domoticz logs for any errors. None.

Re: Philips HUE errors in Domoticz

Posted: Friday 22 November 2019 19:17
by Kranendijk
The poll interval on my hardware Hue bridge is not changed and is set to 0. This means never poll?

Re: Philips HUE errors in Domoticz

Posted: Friday 22 November 2019 20:23
by waaren
Kranendijk wrote: Friday 22 November 2019 19:11 Does this provide some helpful information? It seems like it polls all devices like in a 10 second interval or so
It shows that domoticz is sending an MQTT message for every device update. If that is intended that's OK but if not you might want to restrict the number of messages.

You can do this by changing the settings of MQTT on the hardware tab of domoticz from Flat or Combined to Hierarchical.

Re: Philips HUE errors in Domoticz

Posted: Friday 22 November 2019 20:50
by waaren
Kranendijk wrote: Friday 22 November 2019 19:17 The poll interval on my hardware Hue bridge is not changed and is set to 0. This means never poll?
No that is not the case.

You can use networktools to see what is send / received from your pi to / from the hue bridge. I use tcpdump

tcpdump -vv dst 192.168.192.72 # get detailed information on what is send from your system to the hue bridge (change IP to IP of your hue
tcpdump -vv src 192.168.192.72 # get detailed information on what is received from the hue bridge (change IP to IP of your hue

Re: Philips HUE errors in Domoticz

Posted: Friday 22 November 2019 22:19
by Kranendijk
waaren wrote: Friday 22 November 2019 20:23
Kranendijk wrote: Friday 22 November 2019 19:11 Does this provide some helpful information? It seems like it polls all devices like in a 10 second interval or so
It shows that domoticz is sending an MQTT message for every device update. If that is intended that's OK but if not you might want to restrict the number of messages.

You can do this by changing the settings of MQTT on the hardware tab of domoticz from Flat or Combined to Hierarchical.
No such option? Please see attached.I do not use a floorplan by the way. Will check what my sniffing results to :D

Re: Philips HUE errors in Domoticz

Posted: Friday 22 November 2019 23:07
by waaren
Kranendijk wrote: Friday 22 November 2019 22:19 No such option? Please see attached.I do not use a floorplan by the way. Will check what my sniffing results to :D
out = flat
/ = hierarchical
out +/ = combined

Re: Philips HUE errors in Domoticz

Posted: Friday 22 November 2019 23:27
by Kranendijk
Thanks!

Re: Philips HUE errors in Domoticz

Posted: Saturday 23 November 2019 10:33
by Kranendijk
So far so good after setting to hierarchical. No errors yet.