It has moved to here: http://threefools.org:3000/
// Configuration info for the WeeRT server itself
server: {
port: 3000,
api: "/api/v1"
},
-tk# Once every 24 hours InfluxDB will report usage data to usage.influxdata.com
# The data includes a random ID, os, arch, version, the number of series and other
# usage data. No data from user databases is ever transmitted.
# Change this option to true to disable reporting.
reporting-disabled = truecurl -v -u weert:xxxxxxx -i -X POST -H Content-type:application/json -d '{"timestamp": 1529895217000, "tags": {"platform": "default_platform", "stream": "default_stream"}, "fields": {"gauge_pressure": 1002.6683035778668,"out_temperature":16.470000000000002,"heatindex_temperature": 16.470000000000002, "altimeter_pressure": 1009.5370707366749, "windchill_temperature": null, "dewpoint_temperature": 13.326693680497735, "extra1_temperature": 16.63, "unit_system": 17, "out_humidity_percent": 81.69, "sealevel_pressure": 1009.68, "y_wind_speed": null, "x_wind_speed": null, "wind_dir": null}, "measurement": "wxpackets"}' http://localhost:3001/api/v1/measurements/examples/packetsNote: Unnecessary use of -X or --request, POST is already inferred.* Trying 127.0.0.1...* Connected to localhost (127.0.0.1) port 3001 (#0)* Server auth using Basic with user 'weert'> POST /api/v1/measurements/examples/packets HTTP/1.1> Host: localhost:3001> Authorization: Basic d2VlcnQ6Y3Jhd2xzcGFjZQ==> User-Agent: curl/7.47.0> Accept: */*> Content-type:application/json> Content-Length: 545> * upload completely sent off: 545 out of 545 bytes< HTTP/1.1 403 ForbiddenHTTP/1.1 403 Forbidden< X-Powered-By: ExpressX-Powered-By: Express< Content-Type: text/html; charset=utf-8Content-Type: text/html; charset=utf-8< Content-Length: 12Content-Length: 12< ETag: W/"c-dAuDFQrdjS3hezqxDTNgW7AOlYk"ETag: W/"c-dAuDFQrdjS3hezqxDTNgW7AOlYk"< Vary: Accept-EncodingVary: Accept-Encoding< Date: Mon, 25 Jun 2018 11:44:16 GMTDate: Mon, 25 Jun 2018 11:44:16 GMT< Connection: keep-aliveConnection: keep-alive
I actually found the tutorials that come with Redux to be pretty useful. You want to build towards the 'async' tutorial, which is the first realistic application of Redux.It can get confusing, but underlying it all is a very simple concept: the "reduction" process means you take an immutable data structure or "state", apply an action, and end up with another immutable state. That means very simple state changes: two read-only inputs, one read-only output. It makes debugging complicated programs very easy.But, I don't claim to be an expert at this.-tkOn Mon, Jun 25, 2018 at 10:54 AM Bill Morrow <morr...@gmail.com> wrote:Had a quick look in to the javascript side of weert. I see what you are describing with NEW_PACKET actions, reducers, and other such voodoo! I have a steep learning curve ahead of me.On Mon, Jun 25, 2018 at 1:47 PM Bill Morrow <morr...@gmail.com> wrote:I was just looking at the loop_filters in weert.py. Could I do something with those?There's a number of ways of implementing this. My first thought is to create a new reducer method, which on every NEW_PACKET action, scans the internal data structures, constructing a full packet, then emitting it as a new action, call it NEW_FULL_PACKET. React would then subscribe to this (instead of NEW_PACKET).This would belong in the neighborhood of the get_post_body method in weert.py? Not sure if this will get to the top of the priority list, but I'll think about it a bit anyway.On Mon, Jun 25, 2018 at 1:22 PM Thomas Keffer <tke...@gmail.com> wrote:Yes, the "N/A" current values is likely to be the same problem: the most recent packet consists of mostly null values.I can imagine two fixes:1. The WeeWX uploader caches values, creating full packets before sending them off to WeeRT. This is what the Weather Underground uploader already does, so it's an easy fix.2. The "current value" component shows the most recent non-null value for each observation type. This would also be fairly easy to do.I think I prefer solution #2. I don't like the idea of messing with the data-of-record. This keeps the data intact, and just affects the display.There's a number of ways of implementing this. My first thought is to create a new reducer method, which on every NEW_PACKET action, scans the internal data structures, constructing a full packet, then emitting it as a new action, call it NEW_FULL_PACKET. React would then subscribe to this (instead of NEW_PACKET).It will be a while before I get a chance to look at this, but if you want to give it a try...!-tkOn Mon, Jun 25, 2018 at 8:52 AM Bill Morrow <morr...@gmail.com> wrote:I'm not immediately concerned about the plots, more the left pane "Current values". They're a bit behind wall clock time and except for the first packet, the values are "N/A". Even though the developer console suggests real values are coming in.I like your theory on the partial packets. The last packet that arrives in a burst is probably all NULLs.On Mon, Jun 25, 2018 at 10:39 AM Thomas Keffer <tke...@gmail.com> wrote:Yes, it is rather chatty! Each new packet triggers a new action. So, the console shows the state of the internal data structures before the action, the action itself, and the state after the action.Looking at your website, the packets are coming in, and the data structures are getting updated, but the new data points are not showing up on the graphs.I suspect the problem is either the unit system you're using (METRICWX), or (more likely) the partial packets emitted by your weather station. I have only tested WeeRT with a VantagePro2, which emits full packets.The partial packets means there will be a lot of nulls in the time-series vector that it's trying to plot. This may result in react effectively plotting a lot of (invisible) points, not lines. Mousing over the plots shows the invisible points.Try going into client/config/componentConfig.js and add an option connectNulls:export const plotOptions = {width: "95%",height: 200,margin: { top: 5, right: 5, left: 5, bottom: 5 },nXTicks: 5,type: "linear",connectNulls : true,...}See if that does anything. I've found a lot of bugs in recharts, so it wouldn't surprise me if this didn't work.-tkOn Mon, Jun 25, 2018 at 8:16 AM Bill Morrow <morr...@gmail.com> wrote:On Mon, Jun 25, 2018 at 9:46 AM Thomas Keffer <tke...@gmail.com> wrote:Sounds like a WebSocket issue. Try opening up the "debugging" window on your browser (Ctrl-Shift-I on Chrome) and look on the console. It may give you some clues as to what's happening.There's a lot of traffic. A new packet every 0.5 seconds?action NEW_PACKET @ 10:14:25.708main.js:21 prev state
- {selectedTags: {…}, selectedTimeSpan: "recent", timeSpans: {…}, stats: {…}}
main.js:21 action
- {type: "NEW_PACKET", measurement: "wxpackets", packet: {…}}
- measurement:"wxpackets"
- packet:{timestamp: 1529939663000, out_temperature: 11.270000000000001, extra2_temperature: 33.6, extra1_temperature: 12.41, unit_system: 17, …}
- type:"NEW_PACKET"
- __proto__:Object
main.js:21 next state
- {selectedTags: {…}, selectedTimeSpan: "recent", timeSpans: {…}, stats: {…}}
main.js:21 action NEW_PACKET @ 10:14:25.735This may be a side effect of the rate I am bombarding weewx with my wxMesh driver.Is the WeeRT server exposed to the outside world? If so, I can try taking a look.Just opened it: http://east.themorrow.net:3001/
...
action
- {type: "NEW_PACKET", measurement: "wxpackets", packet: {…}}
- measurement:"wxpackets"
- packet:{timestamp: 1530277846000, out_temperature: 16.52, extra2_temperature: 34.2, extra1_temperature: 17.219999999999995, unit_system: 17, …}
- type:"NEW_PACKET"
...
these are all for the same time stamp, and all the same data?
- {type: "NEW_PACKET", measurement: "wxpackets", packet: {…}}
- measurement:"wxpackets"
- packet:{timestamp: 1530278448000, unit_system: 17}
- type:"NEW_PACKET"
...
action
- {type: "NEW_PACKET", measurement: "wxpackets", packet: {…}}
- measurement:"wxpackets"
- packet:{timestamp: 1530278448000, extra1_temperature: 17.18, unit_system: 17, sealevel_pressure: 1010.89}
- type:"NEW_PACKET"
...
...
action
- {type: "NEW_PACKET", measurement: "wxpackets", packet: {…}}
- measurement:"wxpackets"
- packet:{timestamp: 1530278448000, out_temperature: 16.24, extra1_temperature: 17.18, unit_system: 17, sealevel_pressure: 1010.89, …}
- type:"NEW_PACKET"
...
action
- {type: "NEW_PACKET", measurement: "wxpackets", packet: {…}}
- measurement:"wxpackets"
- packet:{timestamp: 1530278448000, wind_speed: 0, out_temperature: 16.24, windchill_temperature: 16.24, extra2_temperature: 34.2, …}
- type:"NEW_PACKET"
$ influx
> precision rfc3339
> use weert;
Using database weert
> SELECT time,out_temperature, in_temperature FROM h24.wxpackets order by time desc limit 10;
name: wxpackets
time out_temperature in_temperature
---- --------------- --------------
2018-06-29T13:47:55Z 16.22 24.099999999999998
2018-06-29T13:47:35Z 16.209999999999997 24.11
2018-06-29T13:47:15Z 16.209999999999997 24.119999999999997
2018-06-29T13:46:55Z 16.22 24.13
2018-06-29T13:46:35Z 16.22 24.119999999999997
2018-06-29T13:46:15Z 16.22 24.11
2018-06-29T13:45:55Z 16.2 24.11
2018-06-29T13:45:35Z 16.22 24.11
2018-06-29T13:45:15Z 16.24 24.11
2018-06-29T13:44:55Z 16.28 24.119999999999997 [[sensor_map]]
windDir = wind_dir.0A66.Acurite5n1Packet
windSpeed = wind_speed.0A66.Acurite5n1Packet
outTemp = temperature.18A8.AcuriteTowerPacket
outHumidity = humidity.18A8.AcuriteTowerPacket
#outTemp = temperature.0A66.Acurite5n1Packet
#outHumidity = humidity.0A66.Acurite5n1Packet
rain_total = rain_total.0A66.Acurite5n1Packet
#rain_since_reset.0A66.Acurite5n1Packet
inTemp = temperature.3067.AcuriteTowerPacket
inHumidity = humidity.3067.AcuriteTowerPacketroot@weert:~/weert-js# git log
commit ec6b53008d8ecaffcad7caffefc52951cbc9ba87
root@weert:~/weert-js# git pullremote: Counting objects: 12, done.remote: Compressing objects: 100% (7/7), done.remote: Total 12 (delta 5), reused 12 (delta 5), pack-reused 0Unpacking objects: 100% (12/12), done. ec6b530..3041e63 master -> origin/masterUpdating ec6b530..3041e63Fast-forward client/src/containers/AppContainer.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
root@weert:~/weert-js# git log
commit 3041e6380bc933dec912ea2a26242dbeb1b3994e
Author: Tom Keffer <tkeffer@gmail.com>
Date: Sun Jul 1 07:38:57 2018 -0700
root@weert:~/weert-js# npm install
root@weert:~/weert-js# npm start #seperate window actually running in screen
root@weert:~/weert-js# npm test
> we...@0.5.0 test /root/weert-js> jasmine --config=spec/support/jasmine.json
Started.....................
21 specs, 0 failuresFinished in 1.17 seconds
root@weert:~/weert-js/client# npm install
root@weert:~/weert-js/client# npm run build
andylittle.ddns.net:3000
animationDuration: 500, connectNulls: true, // Connect null data values dot: false,
First time I've heard of Node-RED. Looks interesting. For years people have been trying to create effective "visual programming" tools. Perhaps IBM has finally succeeded!
Error: Page not found: /
at /home/maarten/git/weert-js/server/server.js:107:17
at Layer.handle [as handle_request] (/home/maarten/git/weert-js/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/maarten/git/weert-js/node_modules/express/lib/router/index.js:317:13)
at /home/maarten/git/weert-js/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/home/maarten/git/weert-js/node_modules/express/lib/router/index.js:335:12)
at next (/home/maarten/git/weert-js/node_modules/express/lib/router/index.js:275:10)
at SendStream.error (/home/maarten/git/weert-js/node_modules/serve-static/index.js:121:7)
at emitOne (events.js:116:13)
at SendStream.emit (events.js:211:7)
at SendStream.error (/home/maarten/git/weert-js/node_modules/send/index.js:270:17)This is something I've been fiddling with for quite a while: a realtime display for weeWX.It consists of a Node server running Express, an InfluxDB database, and a React client that uses Redux for state management.Please, please, please: do not attempt to install and get running unless you are very experienced with Linux and, preferably, Javascript, Node, InfluxDB, and npm. Expect a very steep learning curve. I would love contributions, but I simply do not have the time for any hand holding.Cheers,-tk