owagner / hue2mqtt Goto Github PK
View Code? Open in Web Editor NEWGateway between a Philips Hue bridge and MQTT
License: MIT License
Gateway between a Philips Hue bridge and MQTT
License: MIT License
Hi,
after a while I get the following Exception:
Nov 16, 2016 9:24:29 PM com.tellerulam.hue2mqtt.HueHandler onError WARNUNG: Error in bridge connection. Code 22: No connection; will reconnect in 10s Nov 16, 2016 9:24:29 PM com.tellerulam.hue2mqtt.HueHandler onConnectionLost WARNUNG: Connection to bridge 192.168.2.126 lost Exception in thread "Timer-0" com.philips.lighting.hue.sdk.exception.PHHueException: You are already connected. at com.philips.lighting.hue.sdk.PHHueSDK.connect(PHHueSDK.java:286) at com.tellerulam.hue2mqtt.HueHandler.connect(HueHandler.java:66) at com.tellerulam.hue2mqtt.HueHandler.reconnect(HueHandler.java:71) at com.tellerulam.hue2mqtt.HueHandler$1.run(HueHandler.java:208) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) Nov 16, 2016 9:28:47 PM com.tellerulam.hue2mqtt.HueHandler onError WARNUNG: Error in bridge connection. Code 22: No connection; will reconnect in 10s Exception in thread "Timer-1" java.lang.IllegalStateException: Timer already cancelled. at java.util.Timer.sched(Timer.java:397) at java.util.Timer.schedule(Timer.java:193) at com.tellerulam.hue2mqtt.HueHandler.onError(HueHandler.java:204) at com.philips.lighting.hue.sdk.notification.impl.PHNotificationManagerImpl$1.onReceived(PHNotificationManagerImpl.java:140) at com.philips.lighting.hue.sdk.notification.impl.PHHueResultReceiver.execute(PHHueResultReceiver.java:24) at com.philips.lighting.hue.sdk.notification.impl.PHNotificationManagerImpl.notifySDKError(PHNotificationManagerImpl.java:146) at com.philips.lighting.hue.sdk.heartbeat.PHHeartbeatProcessor.run(PHHeartbeatProcessor.java:168) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505)
After this point no more updates arrived in mqtt - I have to restart hue2mqtt. Do u have an idea?
Would it be possible to add some help on what linux commands I need to move the .jar file to my Rpi? Also to ensure I have the needed programs updated and running. And how I make sure hue2mqtt starts automatically after each boot. If too trivial, then please just refer to where I can find out. Thanks a million from a newbie in Copenhagen.
The Hue Java SDK supports the new attributes bri_inc, sat_inc, hue_inc and ct_inc since V1.8. Can you add support for them in the set-topic?
Could you add a command line option to activate publishing of all datapoints status (e.g. hue/status/lights/lamp1/sat)?
mosquitto_pub -t 'hue/set/lights/Hobbyraum/alert' -m 'select'
leads to...
com.tellerulam.hue2mqtt.MQTTHandler processMessage
WARNING: Exception when processing published message to set/lights/Hobbyraum/alert: select
java.lang.IllegalArgumentException: Attempting to set unknown datapoint alert to value select
at com.tellerulam.hue2mqtt.MQTTHandler.addDatapointToLightState(MQTTHandler.java:210)
WARNING: Exception when processing published message to set/lights/Bad/hue: 30000.12356
java.lang.NumberFormatException: For input string: "30000.12356"
After the latest round of FW updates on the Hue Bridge and lamps and introducing the new Hue Motion Sensor to my setup, I now get an ongoing stream of
hue2mqtt[650]: SEVERE: Internal API error [com.philips.lighting.model.PHHueParsingError@e52776, com.philips.lighting.model.PHHueParsingError@1b90a01, com.philips.lighting.model.PHHueParsingError@978117, com.philips.lighting.model.PHHueParsingError@5d042e, com.philips.lighting.model.PHHueParsingError@1fc5c04]
So I guess this is caused by the messages the motion sensor sends to the bridge.
Solution: I first need to find out the exact problem. Is there a way to run hue2mqtt with a higher debug level so I can start collecting data on the root cause? I am happy to help with adding support for the motion sensor to hue2mqtt even with my very basic understanding of Java :-)
The motion sensor announces itself with an ID of "ZLLPresence" according to 1.3 at http://www.developers.meethue.com/documentation/supported-sensors
It shouldn't be too hard to add its specifics to hue2mqtt but that is definitely not for me to decide :-)
Ups. Heading should be
Hue bridge on permanent local IP address.
In my router I made sure that my hue bridge is always on 192.168.0.199. Can hue2mqtt performance benefit from this? If yes where do I define the permanent IP address? And can I do this if I use your .jar to install hue2mqtt on my raspberry pi running full Jessie. Thanks. And sorry if this is a very simple question. Thanks in advance.
Could you please create a tag for version 0.4?
Could you give a procedure to have hue2mqtt installed and running on Raspberry pi 3.
I have installed node.js version 8.x.x and when I run the command
sudo npm install -g hue2mqtt
I get and error:
npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'internal/util/types'
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-06-07T12_45_04_668Z-debug.log
Your help will be appreciated
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.