Is there a more recent example available for the sensors as I get either:
TypeError: RuuviTagSensor() takes no arguments
Or if I leave out the macAddr in “sensor = RuuviTagSensor(macAddr)”
AttributeError: ‘RuuviTagSensor’ object has no attribute ‘update’
This is the stripped down version of the http example:
from ruuvitag_sensor.ruuvi import RuuviTagSensor
from time import sleep
sensor = None
macAddr = 'E9:39:41:56:D6:2D'
def run():
# start server
global sensor
global macAddr
sleepTime = 2.5
print('Connect to RuuviTag Beacon ' + macAddr)
sensor = RuuviTagSensor()
# give it some time...
sleep(sleepTime)
state = sensor.update()
state = sensor.state
dump = json.dumps(state)
data = json.loads(dump)
print("Data:" + str(data))
run()
As soon I want to directly manipulate the onscreen display I only see the data coming once during start-up…then it just hangs…well…the ruuvi background process hangs…
The temperature sensors of RuuviTags match very well other RuuviTags and alternative sensors, but placement of RuuviTag is critical for temperature accuracy. For example being near radiator or in sunlight can rise the temperature by several degrees. Same goes for electronic devices which produce a lot of heat such as desktop computers and monitors.
There’s also some response time for the sensor to settle in ambient temperature, the sensor stays warm for a few minutes after being handled.
I noticed this when I once positioned a RuuviTag on a shelf half a meter above our TV. Afterwards I could clearly see in my Grafana dashboard that the temperature rose with 0.5 degrees when we were watching TV, and it dropped again afterwards