1
0
mirror of https://github.com/pommi/python-itho-wpu.git synced 2024-11-14 12:42:15 +01:00
Commit Graph

7 Commits

Author SHA1 Message Date
Pim van den Berg
6958032121 refactor(itho-wpu): rm wait type
The wait type is unreliable. No reason to keep maintaining this.
2020-11-05 13:42:21 +01:00
Pim van den Berg
ddbd857574 feat(itho-wpu): add checksum validation for received messages 2020-11-05 13:41:47 +01:00
Pim van den Berg
5e94f480b2 feat(itho-wpu): cli arguments to run master/slave only + set slave timeout
--master-only allows to only run the I2C master functionality.
--slave-only allows to only run the I2C slave functionality.

The I2C slave functionality via the "set_callback" mechanism (--type
callback) just executes the pigpio "event_callback()" function and waits
for 2 seconds for a response. The amount of seconds can now be
configured via --slave-timeout.
2020-10-25 13:54:43 +01:00
Pim van den Berg
85458eb769 feat(itho-wpu): option to slave via event_callback()
Argument "--type [callback,wait]" is added to be able to switch between
"wait_for_event()" (previous functionality) and "event_callback()" in
the I2C slave functionality.

In a thread set_callback() executes event_callback() and just (very
dirty) sleeps 2 seconds to get a response or else cancels the event and
stops pigpio.

To get the most reliable output pigpiod is started with -s 2 (sample
rate 2 microseconds). Still most of the time too few bytes are received
on the "getdatalog" action (153 bytes expected).
2020-10-22 14:39:04 +02:00
Pim van den Berg
bec3415c4e feat(itho-wpu): basic slave functionality
This uses the pigpio library as I'm not quite sure yet how to read this
data directly from /dev/i2c-1, without polling and high CPU usage.
2020-10-22 14:38:43 +02:00
Pim van den Berg
ff1fabce2c feat(itho-wpu): initial i2c master functionality
Writing directly to the /dev/i2c-1 device.

Support for 4 actions:
- getregelaar
- getserial
- getdatatype
- getdatalog
2020-10-17 18:05:56 +02:00
Pim van den Berg
af7778354b docs(readme): initial commit 2020-10-16 19:17:51 +02:00