anton-johansson / e-home Goto Github PK
View Code? Open in Web Editor NEWAn E-Home controller server.
License: Apache License 2.0
An E-Home controller server.
License: Apache License 2.0
We're just asserting that this method is called. But since it's accepting a Consumer<Config>
, we don't really verify what is actually happening in the consumer...
If we are monitoring a value and we receive a device's first update, the device might not yet have any metric. That means, the currentValue
might be null.
Stacktrace:
2018-02-22 18:57:53,005 ERROR com.whizzosoftware.wzwave.channel.ZWaveChannelInboundHandler:81 - An exception occurred
java.lang.NullPointerException
at com.anton.ehome.zwave.Controller$Listener.onZWaveNodeUpdated(Controller.java:166)
at com.whizzosoftware.wzwave.controller.netty.NettyZWaveController.onZWaveNodeUpdated(NettyZWaveController.java:271)
at com.whizzosoftware.wzwave.controller.netty.NettyZWaveController.onApplicationCommand(NettyZWaveController.java:396)
at com.whizzosoftware.wzwave.channel.ZWaveChannelInboundHandler.channelRead(ZWaveChannelInboundHandler.java:56)
at com.whizzosoftware.wzwave.channel.ZWaveChannelInboundHandler.userEventTriggered(ZWaveChannelInboundHandler.java:94)
at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:304)
at io.netty.channel.AbstractChannelHandlerContext.fireUserEventTriggered(AbstractChannelHandlerContext.java:290)
at com.whizzosoftware.wzwave.channel.TransactionInboundHandler$NettyZWaveChannelContext.process(TransactionInboundHandler.java:171)
at com.whizzosoftware.wzwave.channel.TransactionInboundHandler.channelRead(TransactionInboundHandler.java:66)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
at com.whizzosoftware.wzwave.channel.FrameQueueHandler.channelRead(FrameQueueHandler.java:239)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
at com.whizzosoftware.wzwave.channel.ACKInboundHandler.channelRead(ACKInboundHandler.java:33)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
at io.netty.channel.oio.AbstractOioByteChannel.doRead(AbstractOioByteChannel.java:147)
at io.netty.channel.oio.AbstractOioChannel$1.run(AbstractOioChannel.java:45)
at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:53)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at java.lang.Thread.run(Thread.java:748)
This class is pretty messy. As this is the first time I'm writing a raw SSH shell, the focus is more on getting things to work.
Some devices can be monitored, for example energy consumption. These values should be able to be stored in the database, for future usages:
We're starting to get a few different set of libraries, and more will come, for example Zigbee and Sonos. I've already noticed issues with Java dependency hell. We should consider OSGi after all.
Pros:
Allow configuring automatic notifications when monitored data changes.
CanExit
interface is used to provide commands the possibility to exit the shell. Feels a bit overkill. Maybe use a specific exception for instead? That way, the ExitCallback
interface never really leaves the EHomeShell
class.
Should be able to filter by controller, using an option
When we add a Z-Wave controller, it's not remembered the next run. We need to update the configuration and persist it.
For example Watts
or CubicMeters
. See the Scale
class for more info.
When a device' metrics change, it sends an update to the controller. If there is no change (for example if the value is zero, and keeps being zero), no update will be sent. This means we won't send any metrics to the database. This will seem incorrect, for example if devices are turned off.
Instead, we should poll the devices at fixed, configurable intervals.
Add support for using Up
and Down
arrows for scrolling through SSH command history. Would be nice if it was persisted through SSH sessions. Maybe per user name? Where to store it? In InfluxDB? If so, can we store them forever or do we need to clean up?
Mess around with different voice control libraries. Try with basic functionality, such as enable and disable devices.
It seems that all data stored in Influx has some retention... Is it a bug or is it intended? Some data we must store forever, for example configuration.
2018-01-04 20:41:29,649 INFO com.anton.ehome.Daemon:72 - Stopping daemons...
2018-01-04 20:41:29,659 INFO com.anton.ehome.zwave.Controller:80 - Stopping Z-Wave controller 'default'
2018-01-04 20:41:29,662 INFO com.anton.ehome.Daemon:74 - All daemons successfully stopped
2018-01-04 20:41:29,662 INFO com.anton.ehome.EntryPoint:61 - Exiting...
2018-01-04 20:41:30,186 ERROR com.whizzosoftware.wzwave.channel.ZWaveChannelInboundHandler:81 - An exception occurred
java.lang.NullPointerException
at com.whizzosoftware.wzwave.controller.netty.NettyZWaveController.onTransactionFailed(NettyZWaveController.java:457)
at com.whizzosoftware.wzwave.channel.ZWaveChannelInboundHandler.userEventTriggered(ZWaveChannelInboundHandler.java:97)
at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:304)
at io.netty.channel.AbstractChannelHandlerContext.fireUserEventTriggered(AbstractChannelHandlerContext.java:290)
at com.whizzosoftware.wzwave.channel.TransactionInboundHandler$NettyZWaveChannelContext.process(TransactionInboundHandler.java:184)
at com.whizzosoftware.wzwave.channel.TransactionInboundHandler.processEvent(TransactionInboundHandler.java:135)
at com.whizzosoftware.wzwave.channel.TransactionInboundHandler.userEventTriggered(TransactionInboundHandler.java:101)
at com.whizzosoftware.wzwave.channel.TransactionTimeoutHandler.run(TransactionTimeoutHandler.java:44)
at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:123)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:341)
at io.netty.util.concurrent.SingleThreadEventExecutor.confirmShutdown(SingleThreadEventExecutor.java:640)
at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:62)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at java.lang.Thread.run(Thread.java:748)
Mess around with Philips HUE. Investigate what is needed and how the protocol works (I assume it's over WiFi, and no controller is needed, but this needs to be checked). What device(s) do I need to try it out?
There seems to be an OK Java SDK available:
It expires after one hour. It should be much longer. Maybe a year? Could maybe go forever, the storage probably won't be an issue...
Allow configuring graphs that can be visualized over HTTP.
Travis is disabled because there are two unresolvable dependencies:
See this build for details.
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.