Git Product home page Git Product logo

emporia-downloader's People

Contributors

dependabot[bot] avatar helgew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emporia-downloader's Issues

What is "channel":"1,2,3", and why are the "Mains power" items not included in the JSON raw download?

Pulling into my Home Automation (Indigo 7.5) system, I am not using the influxDB, but simply calling the downloader to get the raw minute scaled JSON data once per minute and piping the stdout into a python dict... It works well for all 16 channels that I am monitoring to keep track of AC use and when the washer and dryer end their cycles, but it would be nice to know what the total power draw (shown in the csv files from emporia that I pull periodically and hand process), and I simply ignore the
{"channel":"1,2,3","deviceGid":"XXXXX","usageList":[null,null],"firstUsageInstant":"2021-12-04T22:30:00Z"}
entry... but I was just curious as to why it was there...

Update POM with lombok 1.18.20

On latest JDK and with pom on lombok 1.18.10 we get the following error.
Fatal error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor

To fix, need to update pom to use to 1.18.20

Invalid ID Token

Can you tell me what should be used for the influx-token setting?  I've tried using the API token for my account, but I keep getting an "Invalid ID token" error.

23 Jan 2022 21:29:08 - ERROR (CognitoAuthenticationManager.java:123): Invalid ID token!
com.auth0.jwt.exceptions.InvalidClaimException: The Token can't be used before Sun Jan 23 21:29:11 EST 2022.

I can get it to work with displaying the Vue data to the terminal window, but whenever I try to include my InfluxDB, it get the above error. Thanks!

EmpDownTokenIdError.txt

Simple interface

Mr. Weissig,

All I want to do is pull the current power usage or production from the emporia VUE. I can probably use a Raspberry Pi to try to run your Java script, but there is a lot I am unfamiliar with.

Are there any simple ways to query the unit directly? It's on my WiFi network. Is there a Telnet like feature?

I want to build a battery system to use with my solar power system. I want to turn on charging if I am making a high enough level of power. The device works great and gives me real time power generation or usage on my phone or on the web, but scraping the number is not easy either. The company said they have no API or SDK, but that I should check out the forums.

It would also be fun to create a device that turns on a green light when I am making power and a red light when I am using power.

My private email address is [email protected]

Thanks for your time.

Greg

Process stops with error related to resources comsuption

Hi ! After update to new version emporia-downloader.1.2, around 20 hours later the process stops with this error (related to resources comsuption):
emporia-1 2

[73490.060s][warning][os,thread] Failed to start thread - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
Exception in thread "main" java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/re source limits reached
at java.base/java.lang.Thread.start0(Native Method)
at java.base/java.lang.Thread.start(Thread.java:798)
at java.base/java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:937)
at java.base/java.util.concurrent.ThreadPoolExecutor.ensurePrestart(ThreadPoolExecutor.java:1583)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:346)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:579)
at io.reactivex.internal.schedulers.NewThreadWorker.scheduleActual(NewThreadWorker.java:147)
at io.reactivex.internal.schedulers.NewThreadWorker.schedule(NewThreadWorker.java:51)
at io.reactivex.Scheduler$Worker.schedulePeriodically(Scheduler.java:433)
at io.reactivex.internal.operators.flowable.FlowableWindowTimed$WindowExactBoundedSubscriber.onSubscribe(FlowableWi ndowTimed.java:340)
at io.reactivex.internal.operators.flowable.FlowablePublishMulticast$MulticastProcessor.subscribeActual(FlowablePub lishMulticast.java:297)
at io.reactivex.Flowable.subscribe(Flowable.java:14935)
at io.reactivex.internal.operators.flowable.FlowableWindowTimed.subscribeActual(FlowableWindowTimed.java:67)
at io.reactivex.Flowable.subscribe(Flowable.java:14935)
at io.reactivex.Flowable.subscribe(Flowable.java:14882)
at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onNext(FlowableFlatMap.java:163)
at io.reactivex.internal.operators.flowable.FlowableFromArray$ArraySubscription.slowPath(FlowableFromArray.java:162 )
at io.reactivex.internal.operators.flowable.FlowableFromArray$BaseArraySubscription.request(FlowableFromArray.java: 90)
at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onSubscribe(FlowableFlatMap.java:117)
at io.reactivex.internal.operators.flowable.FlowableFromArray.subscribeActual(FlowableFromArray.java:38)
at io.reactivex.Flowable.subscribe(Flowable.java:14935)
at io.reactivex.internal.operators.flowable.FlowableFlatMap.subscribeActual(FlowableFlatMap.java:53)
at io.reactivex.Flowable.subscribe(Flowable.java:14935)
at com.influxdb.client.internal.AbstractWriteClient.lambda$null$2(AbstractWriteClient.java:133)
at io.reactivex.internal.operators.flowable.FlowableDefer.subscribeActual(FlowableDefer.java:35)
at io.reactivex.Flowable.subscribe(Flowable.java:14935)
at io.reactivex.Flowable.subscribe(Flowable.java:14882)
at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onNext(FlowableFlatMap.java:163)
at io.reactivex.internal.operators.flowable.FlowableFromArray$ArraySubscription.slowPath(FlowableFromArray.java:162 )
at io.reactivex.internal.operators.flowable.FlowableFromArray$BaseArraySubscription.request(FlowableFromArray.java: 90)
at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onSubscribe(FlowableFlatMap.java:117)
at io.reactivex.internal.operators.flowable.FlowableFromArray.subscribeActual(FlowableFromArray.java:38)
at io.reactivex.Flowable.subscribe(Flowable.java:14935)
at io.reactivex.internal.operators.flowable.FlowableFlatMap.subscribeActual(FlowableFlatMap.java:53)
at io.reactivex.Flowable.subscribe(Flowable.java:14935)
at io.reactivex.Flowable.subscribe(Flowable.java:14882)
at io.reactivex.internal.operators.flowable.FlowablePublishMulticast.subscribeActual(FlowablePublishMulticast.java: 72)
at io.reactivex.Flowable.subscribe(Flowable.java:14935)
at io.reactivex.Flowable.subscribe(Flowable.java:14882)
at io.reactivex.internal.operators.flowable.FlowableConcatMap.subscribeActual(FlowableConcatMap.java:66)
at io.reactivex.Flowable.subscribe(Flowable.java:14935)
at io.reactivex.internal.operators.mixed.FlowableConcatMapSingle.subscribeActual(FlowableConcatMapSingle.java:62)
at io.reactivex.Flowable.subscribe(Flowable.java:14935)
at io.reactivex.internal.operators.mixed.FlowableConcatMapMaybe.subscribeActual(FlowableConcatMapMaybe.java:62)
at io.reactivex.Flowable.subscribe(Flowable.java:14935)
at io.reactivex.internal.operators.flowable.FlowableDoFinally.subscribeActual(FlowableDoFinally.java:46)
at io.reactivex.Flowable.subscribe(Flowable.java:14935)
at io.reactivex.Flowable.subscribe(Flowable.java:14872)
at io.reactivex.Flowable.subscribe(Flowable.java:14791)
at com.influxdb.client.internal.AbstractWriteClient.(AbstractWriteClient.java:175)
at com.influxdb.client.internal.WriteApiImpl.(WriteApiImpl.java:54)
at com.influxdb.client.internal.InfluxDBClientImpl.getWriteApi(InfluxDBClientImpl.java:120)
at com.influxdb.client.internal.InfluxDBClientImpl.getWriteApi(InfluxDBClientImpl.java:111)
at org.grajagan.emporia.influxdb.InfluxDBLoader.save(InfluxDBLoader.java:172)
at org.grajagan.emporia.EmporiaDownloader.processDevice(EmporiaDownloader.java:431)
at org.grajagan.emporia.EmporiaDownloader.run(EmporiaDownloader.java:344)
at org.grajagan.emporia.EmporiaDownloader.main(EmporiaDownloader.java:150)

Not able to download with the option "--scale m --history 1d"

The following worked in May 2022 and before, but it's not working in June 2022 any more.

java -jar emporia-downloader.1.2.jar --config config.properties --scale m --history 1d

Here is an example of warning message.
28 Jun 2022 13:38:37 - WARN (EmporiaDownloader.java:424): Readings: null
{"channel":"9","deviceGid":"21041","message":"requesting Minutes data from 2022-06-27T04:32:36Z to 2022-06-28T04:38:36Z is larger than the allowed limit of PT13H20M"}

BTW the following works even today, but it doesn't work with --history 13h and larger
java -jar emporia-downloader.1.2.jar --config config.properties --scale m --history 12h

I think minute data retention is for 7 days. I could download minutes data for 7 days in May 2022 and before, but it's not allowed any more. Is there any way to download minutes data for 1 day or 7 day?

Thanks!

Customer null has no devices!

Since about a day now getting the error : WARN (EmporiaDownloader.java:313): Customer null has no devices!

Looks like "customer" is returning null on service.getCustomer()

smart plugs and emporia vue mains have no device name associated in database

I want to start by saying thank you for putting this downloader together. It started me on a journey of capturing my own data locally and learning a new database (influxdb)
One thing I have noticed is that the downloader imports the smart plugs and vue mains inputs with null device names. So I have to go through each _measurement id and determine which device I am viewing and it makes queries by device name incomplete.

Is there a way to name the measurements a unique name or tag in influxdb? I have searched but am really new to databases in general so not finding what I am looking for.
Thanks,
Justin

How to execute the command?

I want to connect this java API with my Emporia device. I've my username and password. Now I downloaded the emporia downloader files. But whenever I try to execute the jar file through the command prompt, it doesn't show any response. I've attached a screenshot below. Please help me with it so I can communicate with my Emporia device. Thanks!

right_command

Retrieve 1min data

We are running a cron job at interval of 1min at our end. hence , have set setScale to 1Min, but not getting any usage data . I am adding the code snippet below. Screenshot 2021-08-05 at 3 22 12 AM
In short what we want is to retrieving previous min data on every min.

Improve Influx data structure

Not an issue, but a feature request to the influx data structure.

  1. Can you make the measurement something static like "emporia_energy_usage" instead of being dynamic like deviceName
  2. For the parts that are dynamic can you add tag instead that can include the channel name, channel number, emporia account name, etc...

basically enhance the point building on line 124 of influxDBloader.java. Something like :

        Point point =
                Point.measurement("Emporia_energy_usage").time(i.toEpochMilli(), TimeUnit.MILLISECONDS)
                        .addField("watts", (int) (data.get(i) * multiplier * 100) / 100.0)
                        .tag("Channel Name", channelName )
                        .tag("Channel Number", channelNum )
                        .build();

Can't connect to InfluxDB

Sorry if this is the wrong place, but I can't get it to connect to InfluxDB.

I have a "bucket" configured in InfluxDB called "electricity". I have it connecting to the Emporia API and dumping data to STDOUT, that all works. I just can't get it to get into Influx. Here's the error...I'm certain this is not your issue, but I need help. I am Windows user..I could swap and run on a ubuntu VM I have on my pc if it helps...

Exception in thread "main" org.influxdb.InfluxDBIOException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:8086
        at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:831)
        at org.influxdb.impl.InfluxDBImpl.executeQuery(InfluxDBImpl.java:814)
        at org.influxdb.impl.InfluxDBImpl.query(InfluxDBImpl.java:549)
        at org.grajagan.emporia.influxdb.InfluxDBLoader.load(InfluxDBLoader.java:84)
        at org.grajagan.emporia.EmporiaDownloader.loadChannelData(EmporiaDownloader.java:394)
        at org.grajagan.emporia.EmporiaDownloader.run(EmporiaDownloader.java:336)
        at org.grajagan.emporia.EmporiaDownloader.main(EmporiaDownloader.java:151)
Caused by: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:8086
        at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:265)
        at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:183)

Thank you!

Influx 1.x

Hi, at May 22th you‘ve added „Influx 2 compatibility“. But indeed you‘ve removed v1 compatibility, haven‘t you?

raspberry pi

would it be possible to include a tutorial how to do this please for running the script on raspberry pi, also, how to get the data into node red?

Influx setup

Hello,
How do you setup influx to get the data from emporia-downloader?

How to create the jar file?

There's a option for building jar file as mvn package. whenever I put this command on the directory of my project using cmd, it shows a error message. please help me out how to do it in correct way?

Screenshot_2

Can't get it to run in WIndows

I'm trying to run emporia-downloader v1.3 in Windows 10. I can get it to show its help file, but nothing else. Here is my PowerShell command line:
java -jar .\emporia-downloader.jar --debug --history 2y

What am I doing wrong? How do I get it to do some real work?

Thank you - Rowan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.