ArchiveSW - Display & Data Archive Storage

udp
nodejs
wfarchive
archivesw
#882

That was a dumb bug. Great catch.

It’s fixed and a new file uploaded.

Sorry that it took so long to fix this one.

3 Likes

#883

Version 1.7.15.xxx is now released. This is version update only from 1.7.14.027.

This is a stable release and testers have run this for a week with no errors and no restarts.

7 Likes

#884

Hi Gary,

I’ve just discovered this and really like what you have done! Thank you!

I have been playing around with the html and css for the panel recently to make it fit nicely on the screen next to my solar panel data display. Some of the data now doesn’t display and I have found some issues within the logs - not sure what to make of it so wondering if you could help? I’m (fairly) sure this won’t have been related to the changes I’ve made in html and css. Sorry for the long post.

Altertables.log has this text:

====
2018-12-30 15:23:38 Starting AlterTables v1.7.15.028
2018-12-30 15:23:41 Dropping table index: DailySky
2018-12-30 15:23:41 Dropping table index: PrecipEvent
2018-12-30 15:23:41 Dropping table index: SkyObservation
2018-12-30 15:23:41 Error dropTableIndex: SkyObservation
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:41 Dropping table index: StrikeEvent
2018-12-30 15:23:41 Checking table index: AirBackfill
2018-12-30 15:23:41 Checking table index: AirObservation
2018-12-30 15:23:42 Checking table index: DailyAir
2018-12-30 15:23:42 Checking table index: DailySensor
2018-12-30 15:23:42 Checking table index: DailySky
2018-12-30 15:23:42 Checking table index: DeviceEvents
2018-12-30 15:23:42 Checking table index: DeviceStatus
2018-12-30 15:23:42 Checking table index: FWUpdate
2018-12-30 15:23:42 Checking table index: HubEvents
2018-12-30 15:23:43 Checking table index: HubStatus
2018-12-30 15:23:43 Checking table index: PrecipEvent
2018-12-30 15:23:43 Checking table index: RapidWind
2018-12-30 15:23:43 Checking table index: SkyBackfill
2018-12-30 15:23:44 Checking table index: SkyObservation
2018-12-30 15:23:44 Error alterTableIndex (create index): SkyObservation serial_number_timestamp_hub_sn
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:44 Error alterTableIndex (create index): SkyObservation serial_number_timestamp
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:44 Error alterTableIndex (create index): SkyObservation serial_number
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:44 Error alterTableIndex (create index): SkyObservation hub_sn
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:44 Error alterTableIndex (create index): SkyObservation timestamp
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:44 Error alterTableIndex (create index): SkyObservation datestamp
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:44 Error alterTableIndex (create index): SkyObservation illuminance
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:44 Error alterTableIndex (create index): SkyObservation uv
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:44 Error alterTableIndex (create index): SkyObservation rain_accumulated
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:44 Error alterTableIndex (create index): SkyObservation wind_lull
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:44 Error alterTableIndex (create index): SkyObservation wind_avg
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:44 Error alterTableIndex (create index): SkyObservation wind_gust
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:44 Error alterTableIndex (create index): SkyObservation wind_direction
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:45 Error alterTableIndex (create index): SkyObservation solar_radiation
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:45 Error alterTableIndex (create index): SkyObservation daily_rain_accumulation
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:45 Error alterTableIndex (create index): SkyObservation precip_type
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:45 Error alterTableIndex (create index): SkyObservation battery
HA_ERR_CRASHED_ON_REPAIR
2018-12-30 15:23:45 Checking table index: StrikeEvent
2018-12-30 15:23:45 Checking table index: Xrain
2018-12-30 15:23:45 Checking table index: Z_version
2018-12-30 15:23:47 Process changes complete
2018-12-30 15:23:47 Update Version complete

and Archive.err has this:

 TypeError: Cannot read property '0' of undefined
        at Query.<anonymous> (/home/pi/archivesw/archive.js:945:22)
        at Query.<anonymous> (/home/pi/archivesw/node_modules/mysql/lib/Connection.js:502:10)
        at Query._callback (/home/pi/archivesw/node_modules/mysql/lib/Connection.js:468:16)
        at Query.Sequence.end (/home/pi/archivesw/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)
        at Query.ErrorPacket (/home/pi/archivesw/node_modules/mysql/lib/protocol/sequences/Query.js:90:8)
        at Protocol._parsePacket (/home/pi/archivesw/node_modules/mysql/lib/protocol/Protocol.js:278:23)
        at Parser.write (/home/pi/archivesw/node_modules/mysql/lib/protocol/Parser.js:76:12)
        at Protocol.write (/home/pi/archivesw/node_modules/mysql/lib/protocol/Protocol.js:38:16)
        at Socket.<anonymous> (/home/pi/archivesw/node_modules/mysql/lib/Connection.js:91:28)
        at Socket.<anonymous> (/home/pi/archivesw/node_modules/mysql/lib/Connection.js:502:10)

Best regards, Ben

1 Like

#885

Something crashed your database. The SkyObservation table is bad.

0 Likes

#886

Ben,

I am working on an modification to AlterTables application that will detect the error and repair the table.

open a terminal window on the RPi and from the archivesw folder run:

wget -N http://fsoft.com/archivesw/repairtable.js
node repairtable

3 Likes

#887

Hi Gary,

Thanks for this, and so quickly too! I’ve only just had the chance to try and it’s worked a charm.

Happy New Year!

1 Like

#888

I have pushed updates to server.js, cwop.js, pwsw.js, the Upload page and config.

You may disable normal logging for CWOP and PWSW and it defaults to off. These two log files become very large on a daily basis. Errors will be logged regardless of the “logging” setting.

The updates will download for you if you have “Update files” checked. Once downloaded logging will be turned off. You will need to restart the Server Process to be able to turn on logging via the “Upload” web server page.

5 Likes

#889

Four times this week I have been asked about the Hub connecting to ArchiveSW via Wi-Fi.

One option I have thought about is to allow the RPi to act as a Wi-Fi access point so the Hub can directly connect to the RPi and therefore eliminate the need for a router connection.

This should allow the RPi to collect data from the Hub via Wi-Fi and pass the data to WeatherFow when the RPi is connected via Ethernet to a router.

I want to know from all of you if this is something you will find useful.

A huge benefit is you are 100% off the grid and portable. The Hub and RPi consume very little power and and can run for days on a good battery backup.

5 Likes

#890

I see the benefit from it but hence then your data is one shop only no ? Will you still be able to access you pi to read the data from another computer via wifi for ex ???

If not, means your pi becomes a dedicated device for the WF station (no problem with that) but gosh what an overkill in ressources for that.

I’d imagine to dev for a pi zero or alike then (less costly and even less energy consuming) and not storing data at all, just a plain device that gets the data and displays it.
And then there are maybe even smaller options with those mini devices that include wifi/bt etc on a little board like the wemos etc.

Just some wild thinking…

1 Like

#891

Yes. No current features would be lost. This allows the Hub to connect directly to the RPi which gives the added benefit of allowing data to be captured if the router loses power or fails. It also makes the Smart Weather Station 100% portable with zero data loss.

3 Likes

#892

Hi @GaryFunk,

YES I am intending to set my station up to be reliable during electricity and internet outages. This is important to me.

I will include backup power to my router, but eliminating that requirement is a good idea that I hadnt considered. I guess it is easy to setup the raspberry pi as a hotspot to achieve the desired result.

In New South Wales Australia we still rely on overhead power cables to our houses which means every time there is decent storm trees fall over the wires and in my suburb it can take a week to clean up and return power.

And the government has forced in a new optical fibre broadband network that replaces our old reliable telephone system. Many of us now use nodes in the street with copper wire to our houses. The nodes require electricity and have a backup battery which is expected to last about 6 hours. Whereas the old telephone exchanges had batteries and generators which lasted through all the electricity outages.

So I know just when I like to be recording my extreme weather I will loose mains electricity and the internet connection.

cheers Ian :slight_smile:

1 Like

#893

I received the extra microSD card and an Edimax N150 USB WiFi adapter today. I started from a fresh install from NOOBS v3.0.0 on a RPi 3B. After initial setup and updating I installed the USB WiFi adapter and then followed https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md to setup a WiFi access point on the embedded WiFi (wlan0). Other than SSID and password changes I changed the eth0 references to wlan1 for the uplink to my home WiFi.

I linked one of my WF hubs to the RPi access point and verified that it worked normally. I then installed ArchiveSW. (@GaryFunk I still had to follow the changes I emailed you.) After a couple of reboots after setup everything came up normally on the panel. I also was able to successfully switch between my home WiFi and the hotspot on my phone. :smiley:

When the RPi is disconnected from the internet the light goes red on the hub but the panel still updates. I assume that data is still being stored by the RPi. This should work well for my RV. One power source can run everything. :+1:

3 Likes

#894

I have never used NOOBS so there may be an incompatibility issue.

0 Likes

#895

Hi Gary,

I have a question about the pressure cell. I think there is something wrong with the way mine is displaying:

51

Am I right in thinking there should be something in the first line in place of “NaN”. The altitude, I presume, shouldn’t also be -2000 odd!

I’d be interested to hear you thoughts.

Thanks, Ben

1 Like

#896

In the the web server go to the Panel tab and make sure you have the proper height values in meters.

0 Likes

#897

Hi Gary,

The values all look OK to me, although I hadn’t set them in Config for some reason (perhaps I didn’t press save). However, the cell still displays the same for me.

Thanks, Ben

1 Like

#898

Now that you have set them restart the Panel Process.

0 Likes

#899

I’ve noticed a periodic anomaly in the wind direction indicator. Every so often I’ve seen it spin around the circle really fast one or more times around. I’ve seen it at least three times. It is like it gets wound up and has to unwind really quick. Maybe it is an Easter egg? :grin: It is more of a curiosity than a bug to urgently fix.

I also found a use for my Nokia Lumia 2520 tablet running Windows 8.1 RT. It works great as a display. Its only issue is Edge thinks the Sun is a square and dutifully rotates it around the circle.

1 Like

#900

I’ve seen the unwind happen a few times. It’s on the list to investigate. I need to add code to capture data and see how high the values go up. I know why I just don’t know why.

I’ll see if I can fix your Sun in Edge. That one should be easy

0 Likes

#901

I miss spoke (typed?). That is Internet Explorer that has the issue, both the desktop and “Metro” versions and IE on Windows 10. Edge works just fine. Probably not too many are using IE anymore.

1 Like