Attempted to use the python3 version of emonhub and the EmonHubSocketInterfacer.py
.
I get this error on packet receipt.
2020-06-10 17:10:39,183 WARNING Pulse Exception caught in Pulse thread. Traceback (most recent call last):
File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 32, in wrapper
return f(*args)
File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 99, in run
rxc = self.read()
File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubSocketInterfacer.py", line 69, in read
select.select([self._socket], [], [], 0)
TypeError: argument must be an int, or have a fileno() method.
I am using this script to send the packets - Directly connecting to Optical Pulse Counter with RPi? - #61 by danbates
I note that there is a print f
which I corrected but I am getting this error with Python3
Traceback (most recent call last):
File "/home/pi/pulses.py", line 31, in eventHandler2
processpulse(2,GPIO.input(channel))
File "/home/pi/pulses.py", line 51, in processpulse
send(f)
File "/home/pi/pulses.py", line 58, in send
s.send(f)
TypeError: a bytes-like object is required, not 'str'
This all relates to trying to get a pulse interfacer going Emonhub Pulse Interfacer