Commit Graph

435 Commits (master)

Author SHA1 Message Date
Colin Kuebler 95632b143f
Merge pull request #226 from kueblc/enhance-api
Server enhancements, API additions
2019-09-21 17:22:44 -04:00
Colin Kuebler 41ac947ce7 Readded old protocol 2.1 encoding back into mq_pub_15
Added optional argument "--protocol" which specifies whether to use the old or new MQTT encoding
Cleaned up a bit, adding some descriptive variable names and reducing code clutter
2019-09-21 17:08:46 -04:00
Colin Kuebler 468a976d05 Added libssl-dev as prereq for py sslpsk 2019-09-21 16:10:44 -04:00
Colin Kuebler 2903bd286e Added python3-dev and pycrypto as per #274 2019-09-21 16:06:16 -04:00
Colin Kuebler 8291ced3da Tidy PSK generation, only define PSK hint in one location 2019-09-21 16:04:10 -04:00
Madmartigan ea815b7d62 fix: gwId was not parsed 2019-09-19 08:33:28 +02:00
Madmartigan ed4fcaf8a4 fix typo 2019-09-18 22:15:27 +02:00
Madmartigan f1b27e4dc2 Add dependancy on fixed sslpsk 2019-09-18 21:43:32 +02:00
Madmartigan 7d588cda4e Circumvent new tuya sdk protection 2019-09-18 21:38:11 +02:00
Colin Kuebler 41df188dde Ignore "flag files" from git 2019-08-07 17:12:30 -04:00
Colin Kuebler 4c3fba4f91 Increased timeout for devices to appear to ~60s 2019-08-07 17:10:30 -04:00
Colin Kuebler a81da2b85e Added backups folder to gitignore 2019-08-07 17:10:14 -04:00
Colin Kuebler 4b9b1a0e1e Download backups and info to a backup directory with timestamped subdirectories
This allows us to do multiple backups without overwriting, as seen in #162 #182 and others
2019-08-07 16:54:35 -04:00
Colin Kuebler b55299d4bb Clean up smartconfig and prompt user to retry if device fails to appear online 2019-08-07 15:34:23 -04:00
Colin Kuebler f345e1843d Only print out smart config parameters once 2019-08-07 13:52:47 -04:00
Colin Kuebler 497bedbcfb Add a delay after starting the AP to allow time for the network interface to come up
This quick fix avoids issues where we want to bind to a specific address offered on the new AP
2019-08-07 13:27:13 -04:00
Colin Kuebler e3b49824f6 Start and stop smart-config as a fork instead of a screen
Allows smart-config to run as long as start_flash determines it necessary
2019-08-07 13:20:49 -04:00
Colin Kuebler 3b1c5ed771 Offer to flash another device, restarting the procedure automatically
Timeout waiting for the upgraded device after ~30s
Supress pushd/popd output
2019-08-07 13:14:47 -04:00
Colin Kuebler 84ad9723ed User only needs to agree to the EULA once 2019-08-07 13:10:08 -04:00
Colin Kuebler 22bdbb5629 Exit server cleanly on SIGINT (^C) to reduce error message noise 2019-07-04 19:54:12 -04:00
Colin Kuebler d754802f35 Added auto-retry to smartconfig, make 10 attempts before exiting 2019-07-04 19:26:25 -04:00
Colin Kuebler da1966ac42 Bugfixes; file_md5 was type bytes vs str, reply() needed argument default, use get_argument() instead of request.arguments[], json to str lambda to ease schema encoding, true => True in python 2019-07-03 14:02:33 -04:00
Colin Kuebler 54af5ebba8 Check for wpa_supplicant #19 #84 #172 #208 and many more 2019-07-02 15:31:37 -04:00
Colin Kuebler 39954071bd Added API response for s.gw.upgrade.updatestatus 2019-07-02 15:23:23 -04:00
Colin Kuebler 39b9bcd768 Added API methods: .device.upgrade .timer and .config
tuya.device.upgrade.get and tuya.device.upgrade.silent.get should allow upgrades on devices where s.gw.upgrade is not called
2019-07-02 14:48:36 -04:00
Colin Kuebler beab732cfe Implemented JSONHandler.reply to reduce code repetition
Adds timestamp, serializes response, and applies appropriate headers
Fetch gwId and a from query parameters instead of manual uri parsing
Represent API responses as dict objects for clarity and flexibility
Compute upgrade.bin md5 and file size only once when the server is started
2019-07-02 14:43:24 -04:00
Colin Kuebler d11f94f45d Backup hostapd config #61
Do not overwrite config backups #61
2019-07-02 14:30:09 -04:00
Colin Kuebler 9c8db5752c Added a check to ensure that the configured network interface exists 2019-07-02 14:22:25 -04:00
Colin Kuebler 48bdc072ed Added config for mosquitto so it only binds to 10.42.42.1
Now that there is no conflict for ports, we do not have to stop apache or mosquitto before starting our own
2019-07-02 14:18:03 -04:00
Colin Kuebler 0e7c1f080c Modify dnsmasq config to only bind to 10.42.42.1 as suggested in #187 2019-07-02 14:13:04 -04:00
Colin Kuebler fcbb35019b Added option for specifying the server bind addr, defaulting to 10.42.42.1
Catch bind error and produce a helpful message if port is unavailable
This should make it possible to run the server without interfering with 0.0.0.0:80
2019-07-02 14:00:18 -04:00
Colin Kuebler 9b0e36d3f5
Merge pull request #198 from probonopd/patch-1
Warn about manufacturer firmware updates
2019-05-25 01:30:13 -04:00
Colin Kuebler a351f25f4c
Modified update warning language
Added citation to the press release
Removed suggestion to disconnect your internet
Added emphasis on what should be done to avoid unwanted updates
2019-05-23 19:55:34 -04:00
probonopd 61cefc025d
Update README.md 2019-05-17 19:36:55 +02:00
probonopd adf74ca9c2
Warn about manufacturer firmware updates 2019-05-17 19:34:54 +02:00
Peter Lawler c77299795a
Fix for #138
Python3 from 3.7 on manages pip installs a little differently. This change should handle this change.
*NOTE: I can't recall where I saw that this is the preferred 3.7 method. I can't cite. However things work better now for me. See #138 as well.
2019-05-15 19:51:21 +10:00
Colin Kuebler 7ef1a78087
Merge pull request #193 from DoktorHeisenberg/master
net-tools (ifconfig) missing on newer systems
2019-05-14 17:09:03 -04:00
DoktorHeisenberg d50d08a785
Update install_prereq.sh 2019-05-10 18:58:37 +02:00
Colin Kuebler e16327ac85
Merge pull request #168 from rdelcorro/updateReadme
Tested on Raspbian Stretch in Raspberry 3B+
2019-04-23 18:01:46 -04:00
Ramiro del Corro 1e24fa4728
Tested on Raspbian Stretch in Raspberry 3B+ 2019-04-08 23:59:20 -07:00
Colin Kuebler 4a924908d0
Merge pull request #161 from kueblc/documentation
Small documentation update
2019-03-31 15:48:24 -04:00
Colin Kuebler 5c75dfe4ae Added related works section to README, #1 2019-03-31 15:41:23 -04:00
Colin Kuebler b287281ed5 Updated instruction in flashing script to match README 2019-03-31 15:40:29 -04:00
Colin Kuebler 99a317efd7
Merge pull request #153 from kueblc/master
Documentation improvements to reduce issue clutter
2019-03-23 20:06:39 -04:00
Colin Kuebler 24bdcba999 Added an issue template to help reduce repetitive issue clutter 2019-03-23 20:01:05 -04:00
Colin Kuebler dff64e8ced Updated instruction for flashing a custom URL
Updated list of dependencies
Reiterated that we do not provide support for post installation issues
2019-03-23 19:53:41 -04:00
Colin Kuebler b2211befac
Merge pull request #23 from kueblc/smart-link-py
SmartConfig in Python
2019-03-23 11:38:08 -04:00
Colin Kuebler 2309e03e74 Merge branch 'master' into smart-link-py 2019-03-23 11:37:37 -04:00
Colin Kuebler 42cce77522
Merge pull request #147 from kueblc/new-intermediate-fw
Upgrade intermediate firmware to 1.1
2019-03-23 11:28:25 -04:00
Colin Kuebler 780e62d99f Updated references to upgrade.bin
Simplify schema to lowest common denominator
2019-03-22 17:32:08 -04:00