mattzzw / kindle-weatherstation

Turn a Kindle Paperwhite into a server-less weatherstation with optimized battery runtime.
31 stars 5 forks source link

Support for Kindle D01100 (aka 4th gen) #3

Closed StephanAAU closed 3 years ago

StephanAAU commented 3 years ago

Hello.

I think I am having trouble running this software due to missing icons or something? I am using a Kindle 4th gen with:

I get error message: [root@kindle weatherstation]# ./kindle-weather.sh ./kindle-weather.sh: line 27: cannot create /sys/devices/system/fl_tps6116x/fl_tps6116x0/fl_intensity: nonexistent directory ./kindle-weather.sh: line 34: stop: not found ./kindle-weather.sh: line 36: cannot create /sys/devices/platform/mxc_epdc_fb/graphics/fb0/rotate: nonexistent directory ./kindle-weather.sh: line 41: stop: not found ./kindle-weather.sh: line 42: stop: not found ./kindle-weather.sh: line 43: stop: not found ./kindle-weather.sh: line 44: stop: not found ./kindle-weather.sh: line 45: stop: not found ./kindle-weather.sh: line 46: stop: not found ./kindle-weather.sh: line 47: stop: not found ./kindle-weather.sh: line 48: stop: not found ./kindle-weather.sh: line 49: stop: not found ./kindle-weather.sh: line 50: stop: not found ./kindle-weather.sh: line 51: stop: not found date: invalid date '@1627283319' ./kindle-weather.sh: line 145: cannot create /sys/devices/system/fl_tps6116x/fl_tps6116x0/fl_intensity: nonexistent directory 3 wpa_cli v0.6.10 Copyright (c) 2004-2009, Jouni Malinen j@w1.fi and contributors This program is free software. You can distribute it and/or modify it under the terms of the GNU General Public License version 2. Alternatively, this software may be distributed under the terms of the BSD license. See README and COPYING for more details. Selected interface 'wlan0' Interactive mode > OK > OK > OK > Invalid SET_NETWORK command: needs three arguments (network id, variable name, and value) > Invalid SET_NETWORK command: needs three arguments (network id, variable name, and value) > Invalid SET_NETWORK command: needs three arguments (network id, variable name, and value) > OK > <2>Trying to associate with SSID 'SSID-REMOVED-FOR-PRIVACY' OK > Sending discover... Sending discover... Received SIGTERM Problem getting data: HTTPSConnectionPool(host='api.openweathermap.org', port=443): Max retries exceeded with url: /data/2.5/onecall?lat=57&lon=10&units=metric&lang=dk&appid=aefc12ef44ef88da2dd1eaea93888d51 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x40e5e4f0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')) ./kindle-weather.sh: line 145: fbink: not found ./kindle-weather.sh: line 145: rtcwake: not found

StephanAAU commented 3 years ago

Ok. So to fix the missing stop command i replaced the "stop" entries with:

start-stop-daemon -K -n 'name-of-service'

mattzzw commented 3 years ago

Looks like you have to adjust kindle-weather.sh according to your device. The script defaults to PW2. I can't say from the top of my head if PW3 is the same as 4th gen PW.

E.g. for FBROTATE and BACKLIGHT you need to find the corresponding pathes in /sys/devices.

./kindle-weather.sh: line 27: cannot create /sys/devices/system/fl_tps6116x/fl_tps6116x0/fl_intensity: nonexistent directory is telling you exactly that.

Seems like pretty much everything in the script does not work for your device. :-| fbink and rtcwake are not in the path either.

StephanAAU commented 3 years ago

Alright, i'll try and snoop around to see if I can find equivalent paths :D

StephanAAU commented 3 years ago

Seems a lot of stuff is not working. I think it would require a rewrite of much of the scripts as you also hinted. I think this is more than I personally can handle as I am not very fluent in 'bash' - and seeing as the Kindle 4th is 8 years old, there is probably not many people who would find this useful.

Examples of stuff that doesn't work: date -d @unixtime stop 'service' (this has to be start-stop-demon -K -n 'name-of-service') wpa_cli set_network $id group.... only supports 1 argument and not 2, same for proto and pairwise.