Hi Adam,
With the first one solution I receive a error: buffersize must be an integer
The second one seems to be working.
here is a printscreen from the moment I logon to PI with putty:
login as: pi
pi@192.168.1.20âs password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Feb 12 09:21:51 2017 from 192.168.1.2
pi@pi20:~ $ cd /home/pi/tinkerforge
pi@pi20:~/tinkerforge $ python brick-mqtt-proxy.py --brickd-host 192.168.1.41 --brickd-port 4223 --broker-host localhost --broker-port 1883 --update-interval 5&
[1] 2151
pi@pi20:~/tinkerforge $ python cayenne-mqtt.py
{â_timestampâ:1486889999.273564,âtemperatureâ:2456}
{â_timestampâ:1486890034.483148,âhumidityâ:272}
{â_timestampâ:1486890034.895567,âair_pressureâ:1017743}
{â_timestampâ:1486890039.948072,âair_pressureâ:1017742}
{â_timestampâ:1486889999.273564,âtemperatureâ:2456}
{â_timestampâ:1486890034.483148,âhumidityâ:272}
{â_timestampâ:1486890039.948072,âair_pressureâ:1017742}
{â_timestampâ:1486890045.001824,âair_pressureâ:1017750}
{â_timestampâ:1486890045.001824,âair_pressureâ:1017750}
{â_timestampâ:1486889999.273564,âtemperatureâ:2456}
{â_timestampâ:1486890034.483148,âhumidityâ:272}
{â_timestampâ:1486890045.001824,âair_pressureâ:1017750}
{â_timestampâ:1486890049.521626,âhumidityâ:271}
{â_timestampâ:1486890049.521626,âhumidityâ:271}
{â_timestampâ:1486890049.521626,âhumidityâ:271}
{â_timestampâ:1486890050.097411,âair_pressureâ:1017752}
{â_timestampâ:1486890050.097411,âair_pressureâ:1017752}
{â_timestampâ:1486890050.097411,âair_pressureâ:1017752}
{â_timestampâ:1486889999.273564,âtemperatureâ:2456}
{â_timestampâ:1486890049.521626,âhumidityâ:271}
{â_timestampâ:1486890050.097411,âair_pressureâ:1017752}
{â_timestampâ:1486890055.1549,âair_pressureâ:1017749}
{â_timestampâ:1486890055.1549,âair_pressureâ:1017749}
{â_timestampâ:1486890055.1549,âair_pressureâ:1017749}
{â_timestampâ:1486890055.1549,âair_pressureâ:1017749}
^Cpi@pi20:~/tinkerforge $
first of allI have two questions:
-
I have to manually start the broker at the command prompt every time I restart the pi with :
cd /home/pi/tinkerforge
python brick-mqtt-proxy.py --brickd-host 192.168.1.41 --brickd-port 4223 --broker-host localhost --broker-port 1883 --update-interval 5&
can I be done automatically? I tried to put the commands in a .sh file and put it the crontab.(found this on Google). But only the python brick-mqtt-proxy.py start without the --brickd-host 192.168.1.41 --brickd-port 4223 --broker-host localhost --broker-port 1883 --update-interval 5& arguments. So I do not have the 5 seconds refreshment but one value.
2.is this normal that with the 5 seconds interval (from question 1), I receive every 5 seconds the values of my 3 sensors in random order and sometimes more than once; as example see the last 4 lines of my print screen; 4 identical timestamps with 4 identical air_pressure values.
Is this normal mqtt behavior?
Then I went to the cayenne dash board and the dashboard went from
to this screen as soon I a ran the python cayenne-mqtt.py command at the command prompt.
Yellow band at the top disappeared, so I think communication is working but still no sensor data.
how do I fix this?
Thanks
Patrick