Commit Graph

29 Commits

Author SHA1 Message Date
Jarno Rankinen 4b89aec1c5 0.0.17 Remove 'Days until service'. Closes gh-25 2023-03-10 11:13:07 +02:00
Jarno Rankinen a0dedc7fcd 0.0.16 Correct hreg addresses for humidity readings. Outside hum still shows 0%, will need to wait until summer to see if the reading works. Closes gh-26. Added 48h avg hum readings back to HASS dashboards 2023-03-10 11:09:36 +02:00
Jarno Rankinen a0bb5c3e69 temperature endpoint can take raw register value, full degrees C or a single decimal precision float degrees C value as parameter. up & down as parameters shift the temperature setpoint up or down a full degree. Closes gh-21 2023-03-09 22:35:43 +02:00
Jarno Rankinen 415bf638be gh-24 0.0.14 ReadCoil, WriteCoil, WriteCoils, andheckMutexCoils, now use common modbus.Client with proper locking 2023-03-09 22:18:12 +02:00
Jarno Rankinen a49978ee5f gh-21 PUT /api/v1/temperature/<action> for changing temperature setpoint 2023-03-09 16:15:54 +02:00
Jarno Rankinen 193cfede8d 0.0.12 Include all coil values in homeassistant status output 2023-03-08 20:46:07 +02:00
Jarno Rankinen 0f081fe5fd CLI flags
-debug enables debug logging
-httplog enables HTTP access logging
-interval N sets background update interval to N seconds

closes gh-18
2023-03-03 10:09:43 +02:00
Jarno Rankinen dbbc22809e 0.0.10 PinvinKL.Debug.Println, logs debug messages with prefix 'DEBUG:' if debug is enabled 2023-03-03 08:20:54 +02:00
Jarno Rankinen 93992d3dd6 POST /api/v1/coils/N to flip a coil 2023-03-03 08:08:36 +02:00
Jarno Rankinen ce1c569564 Methods for reading and writing single holding registers. Unfortunately the writes don't seem to have much effect, the registers are reset after a short period or instantly. Maybe due to something with the library, but no errors are produced. Closes gh-5 2023-03-02 14:24:05 +02:00
Jarno Rankinen bcb8d55126 gh-10 0.0.7 Check that only one of mutex coils is 1 at a time 2023-03-02 13:36:49 +02:00
Jarno Rankinen 173020b720 Version bump 2023-02-28 20:49:26 +02:00
Jarno Rankinen 150ed97071 gh-6 /api/v1/status returns float values if applicable 2023-02-27 21:10:24 +02:00
Jarno Rankinen f76bddbb45 gh-10 read/write single coil api method
GET /api/v1/coils/N
- read coil N (int)
POST /api/v1/coils/N/VAL
- set coil N (int) to VAL, VAL can be one of accepted values for
  strconv.ParseBool (1 or 0 is the simplest)
2023-02-24 22:52:13 +02:00
Jarno Rankinen 6ffb90b848 Reduced Monitor interval to 2 seconds, will implement a cli flag for this soon 2023-02-24 21:54:50 +02:00
Jarno Rankinen 175254b4ba gh-16 Retry reading registers 5 times, added debug variable to PingvinKL.New(). Not much debug output yet. 2023-02-19 21:28:50 +02:00
Jarno Rankinen e30c83c96a gh-10 Background updates for data 2023-02-19 12:28:26 +02:00
Jarno Rankinen 9fefef8a98 gh-6 the update/populate functions now work on the struct they're a member of, instead of on a copy. Added /api/v1/status route 2023-02-18 21:52:53 +02:00
Jarno Rankinen f851bf44a7 Added comment about building to main.go 2023-02-02 13:38:31 +02:00
Jarno Rankinen 21bfe7a9d5 gh-5 Show bitfields correctly again
Bump version to 0.0.3
2023-02-02 13:31:24 +02:00
Jarno Rankinen 5d23e34f44 Include static files in build
Building requires replacing symlinks under static/ with the target file
contents.
2023-02-02 11:44:34 +02:00
Jarno Rankinen 2758f67299 gh-5 Debug/other output 2023-02-01 22:19:57 +02:00
Jarno Rankinen 3990a0a833 gh-5 Register API route somewhat works now
Internal data handling needs much improvement, as signed/unsigned
integers and other data types are not yet handled.

Javascript seems like a really poor choice for parsing the html
table, currently it takes ~10 seconds to hande the data. API
response time is good, so probably switching to Go templates for
the dynamic tables is the best course of action. This will move
the load from clientside to serverside, hopefully the planned
RPi Zero W can handle the computations
2023-02-01 22:12:56 +02:00
Jarno Rankinen 81a7e5cb22 Serve everything from the binary instead of Nginx. Missing TLS, but that may not be a requirement at all 2023-02-01 21:52:55 +02:00
Jarno Rankinen a3bb7aa22e #10 /api/v1/coils content-type to application/json 2023-01-29 23:43:36 +02:00
Jarno Rankinen c16f94c6d4 Closes #9 Update coil values on startup. #10 /api/v1/coils route started 2023-01-29 23:31:21 +02:00
Jarno Rankinen 8143414c39 #9 Function to update all coil values 2023-01-29 21:56:22 +02:00
Jarno Rankinen 3fab63f60f #9 Go: Get single coil 2023-01-29 14:42:03 +02:00
Jarno Rankinen ddfbc4610d Initial steps of go implementation, prime coil data from CSV file 2023-01-28 23:28:37 +02:00