MQTT Connection Showing as Offline


#41

can you share the output of sudo -u cayenne python3 -m myDevices


#42

I pasted in that command then got an email notification that it was properly installed! finally…

its still putting out lines, and seems to be working. here is the output up until now:

Summary

$ sudo -u cayenne python3 -m myDevices

2018-12-10 18:31:54 - myDevices - INFO - Registration succeeded for invite code mibgpgw3g5, credentials = {‘status’: True, ‘id’: ‘b4eb1df0-fc79-11e8-b82d-f12a91579eed’, ‘mqtt’: {‘username’: ‘f2721c40-f220-11e8-a08c-c5a286f8c00d’, ‘password’: ‘f23fea56689874ed21ae9a2c531916b374b9a064’, ‘clientId’: ‘b4eb1df0-fc79-11e8-b82d-f12a91579eed’}}

2018-12-10 18:31:55 - myDevices - INFO - Connecting to mqtt.mydevices.com:8883

2018-12-10 18:31:55 - myDevices - INFO - Connected with result code 0

2018-12-10 18:31:57 - myDevices - INFO - GPIO - Native added

2018-12-10 18:31:57 - myDevices - INFO - Send system info: [{‘sys:os:name’: ‘raspbian’}, {‘sys:os:version’: ‘9’}, {‘agent:version’: ‘2.0.2.264’}, {‘sys:pwr:reset’: 0}, {‘sys:pwr:halt’: 0}, {‘sys:i2c’: 1}, {‘sys:spi’: 1}, {‘sys:uart’: 0}, {‘sys:1wire’: 1}, {‘sys:devicetree’: 1}]

2018-12-10 18:31:58 - myDevices - INFO - Executing regular download test for network speed

2018-12-10 18:31:58 - myDevices - INFO - Sensors info:

2018-12-10 18:31:58 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 39.4}, {‘sys:cpu;temp’: 62.3}, {‘sys:ram;usage’: 572383232}, {‘sys:storage:/;usage’: 7435411456}, {‘sys:net;ip’: ‘192.168.1.111’}] + sys:gpio

2018-12-10 18:32:13 - myDevices - INFO - Sensors info:

2018-12-10 18:32:18 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 31.2}, {‘sys:ram;usage’: 564584448}, {‘sys:storage:/;usage’: 7435591680}, {‘sys:net;speedtest’: 1.451209256393121}]

2018-12-10 18:32:28 - myDevices - INFO - Sensors info:

2018-12-10 18:32:55 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 34.7}, {‘sys:cpu;temp’: 61.224}, {‘sys:ram;usage’: 563376128}, {‘sys:storage:/;usage’: 7435747328}]

2018-12-10 18:32:57 - myDevices - INFO - Sensors info:

2018-12-10 18:32:58 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 65.7}, {‘sys:ram;usage’: 612597760}, {‘sys:storage:/;usage’: 7435702272}]

2018-12-10 18:33:12 - myDevices - INFO - Sensors info:

2018-12-10 18:33:13 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 30.3}, {‘sys:cpu;temp’: 61.762}, {‘sys:ram;usage’: 607698944}, {‘sys:storage:/;usage’: 7435628544}, {‘sys:net;ip’: ‘192.168.1.111’}, {‘sys:net;speedtest’: 1.451209256393121}] + sys:gpio

2018-12-10 18:33:27 - myDevices - INFO - Sensors info:

2018-12-10 18:33:27 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 29.4}, {‘sys:cpu;temp’: 61.224}, {‘sys:ram;usage’: 589504512}, {‘sys:storage:/;usage’: 7435649024}]

2018-12-10 18:33:42 - myDevices - INFO - Sensors info:

2018-12-10 18:33:43 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 29.3}, {‘sys:cpu;temp’: 60.148}, {‘sys:ram;usage’: 585678848}, {‘sys:storage:/;usage’: 7435694080}]

2018-12-10 18:33:57 - myDevices - INFO - Sensors info:

2018-12-10 18:33:57 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 34.4}, {‘sys:cpu;temp’: 62.838}, {‘sys:ram;usage’: 586915840}, {‘sys:storage:/;usage’: 7435689984}]

2018-12-10 18:34:12 - myDevices - INFO - Sensors info:

2018-12-10 18:34:14 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 33.1}, {‘sys:cpu;temp’: 63.376}, {‘sys:ram;usage’: 601993216}, {‘sys:storage:/;usage’: 7435743232}, {‘sys:net;ip’: ‘192.168.1.111’}, {‘sys:net;speedtest’: 1.451209256393121}] + sys:gpio

2018-12-10 18:34:27 - myDevices - INFO - Sensors info:

2018-12-10 18:34:27 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 26.6}, {‘sys:ram;usage’: 537903104}]

2018-12-10 18:34:42 - myDevices - INFO - Sensors info:

2018-12-10 18:34:43 - myDevices - INFO - Send changed data: [{‘sys:cpu;temp’: 61.224}, {‘sys:ram;usage’: 530849792}, {‘sys:storage:/;usage’: 7435784192}]

2018-12-10 18:34:57 - myDevices - INFO - Sensors info:

2018-12-10 18:34:57 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 25.1}, {‘sys:cpu;temp’: 62.3}, {‘sys:ram;usage’: 537260032}]

2018-12-10 18:35:12 - myDevices - INFO - Sensors info:

2018-12-10 18:35:13 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 28.8}, {‘sys:cpu;temp’: 60.148}, {‘sys:ram;usage’: 602447872}, {‘sys:storage:/;usage’: 7435788288}, {‘sys:net;ip’: ‘192.168.1.111’}, {‘sys:net;speedtest’: 1.451209256393121}] + sys:gpio

2018-12-10 18:35:27 - myDevices - INFO - Sensors info:

2018-12-10 18:35:28 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 34.3}, {‘sys:ram;usage’: 596508672}, {‘sys:storage:/;usage’: 7435812864}]


#43

yup. it is working. you can see the device online on the web dashboard?
Once you stop the program, try restarting the service sudo service myDevices start


#44

yep, I saw it on the dashboard but then it went away when I issued the last command you asked me to.

Summary

pi@openplotter : ~ $ sudo service myDevices start

pi@openplotter : ~ $ sudo -u cayenne python3 -m myDevices

2018-12-10 18:47:11 - myDevices - INFO - /var/run/myDevices/cayenne.pid already exists, exiting

pi@openplotter : ~ $ sudo service myDevices start

pi@openplotter : ~ $ sudo tail -f /var/log/myDevices/cayenne.log

2018-12-10 18:43:56 - myDevices - INFO - Add device returned: (200, ‘OK’, ‘text/plain’)

2018-12-10 18:43:56 - myDevices - INFO - ok,Mxw8GqtFJHz8LGn

2018-12-10 18:43:57 - myDevices - INFO - Sensors info: [{‘channel’: ‘dev:GH7nyCK1n8DxHro’, ‘value’: 37.32, ‘type’: ‘temp’, ‘unit’: ‘c’, ‘name’: ‘BMP180 Temperature’}, {‘channel’: ‘dev:HtML0rGwGx4tDyF’, ‘value’: 99182, ‘type’: ‘bp’, ‘unit’: ‘pa’, ‘name’: ‘BMP180 Pressure’}]

2018-12-10 18:43:58 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 33.7}, {‘sys:cpu;temp’: 60.686}, {‘sys:ram;usage’: 222609408}, {‘sys:storage:/;usage’: 7422050304}, {‘dev:GH7nyCK1n8DxHro’: 37.32}, {‘dev:HtML0rGwGx4tDyF’: 99182}]

2018-12-10 18:44:12 - myDevices - INFO - Sensors info: [{‘channel’: ‘dev:GH7nyCK1n8DxHro’, ‘value’: 37.36, ‘type’: ‘temp’, ‘unit’: ‘c’, ‘name’: ‘BMP180 Temperature’}, {‘channel’: ‘dev:HtML0rGwGx4tDyF’, ‘value’: 99185, ‘type’: ‘bp’, ‘unit’: ‘pa’, ‘name’: ‘BMP180 Pressure’}]

2018-12-10 18:44:13 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 27.8}, {‘sys:ram;usage’: 234868736}, {‘sys:storage:/;usage’: 7422066688}, {‘dev:GH7nyCK1n8DxHro’: 37.36}, {‘dev:HtML0rGwGx4tDyF’: 99185}]

2018-12-10 18:44:27 - myDevices - INFO - Sensors info: [{‘channel’: ‘dev:GH7nyCK1n8DxHro’, ‘value’: 37.32, ‘type’: ‘temp’, ‘unit’: ‘c’, ‘name’: ‘BMP180 Temperature’}, {‘channel’: ‘dev:HtML0rGwGx4tDyF’, ‘value’: 99193, ‘type’: ‘bp’, ‘unit’: ‘pa’, ‘name’: ‘BMP180 Pressure’}]

2018-12-10 18:44:28 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 30.5}, {‘sys:cpu;temp’: 61.224}, {‘sys:ram;usage’: 257744896}, {‘sys:storage:/;usage’: 7422087168}, {‘sys:net;ip’: ‘192.168.1.111’}, {‘sys:net;speedtest’: 0.7569906668728206}, {‘dev:GH7nyCK1n8DxHro’: 37.32}, {‘dev:HtML0rGwGx4tDyF’: 99193}] + sys:gpio

2018-12-10 18:44:42 - myDevices - INFO - Sensors info: [{‘channel’: ‘dev:GH7nyCK1n8DxHro’, ‘value’: 37.41, ‘type’: ‘temp’, ‘unit’: ‘c’, ‘name’: ‘BMP180 Temperature’}, {‘channel’: ‘dev:HtML0rGwGx4tDyF’, ‘value’: 99181, ‘type’: ‘bp’, ‘unit’: ‘pa’, ‘name’: ‘BMP180 Pressure’}]

2018-12-10 18:44:43 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 25.6}, {‘sys:ram;usage’: 265158656}, {‘sys:storage:/;usage’: 7422115840}, {‘dev:GH7nyCK1n8DxHro’: 37.41}, {‘dev:HtML0rGwGx4tDyF’: 99181}]

^Z

[3]+ Stopped sudo tail -f /var/log/myDevices/cayenne.log

pi@openplotter : ~ $ sudo reboot

Connection to openplotter.local closed by remote host.

Connection to openplotter.local closed.


#45

your log file show that the device is online


#46

it stopped writing at 18:44 and has not been seen by the dashboard since. 10 minutes ago. I rebooted the machine and looked at the log and 18:44 is still the last entry.
I ran sudo -u cayenne python3 -m myDevices and it is now seen again, but when I reboot it does not come on again on its own.
sudo service myDevices start does not make the device available in the dashboard.
it is still not available after a system restart, and not seen on the dashboard.


#47

Does the /etc/systemd/system/myDevices.service file exist?


#48

it does, but the device is still not seen on the dashboard.

**pi@openplotter** : **~ $** nano /etc/systemd/system/myDevices.service
GNU nano 2.7.4 File: /etc/systemd/system/myDevices.service
PermissionsStartOnly=true
ExecStartPre=-/bin/mkdir -p /var/run/myDevices
ExecStartPre=-/bin/chown cayenne:cayenne /var/run/myDevices/
ExecStartPre=-/bin/mkdir -p /var/log/myDevices
ExecStartPre=-/bin/chown -R cayenne:cayenne /var/log/myDevices/
ExecStartPre=-/bin/chown cayenne:cayenne /etc/myDevices
ExecStartPre=-/bin/chown cayenne:cayenne /etc/myDevices/AppSettings.ini
ExecStartPre=-/bin/chown cayenne:cayenne /etc/myDevices/agent.db*
ExecStartPre=-/bin/chown cayenne:cayenne /etc/myDevices/devices.json
# Run ExecStart with cayenne user
ExecStart=/usr/bin/python3 -m myDevices -P /var/run/myDevices/cayenne.pid
PIDFile=/var/run/myDevices/cayenne.pid
Restart=on-failure
StandardOutput=null
[Install]
WantedBy=multi-user.target

also, VNC stopped working.


#49

try systemctl status -l -n 20 myDevices and journalctl -u myDevices and post what those output.


#50

systemctl status -l -n 20 myDevices

Summary

***** myDevices.service - myDevices service

Loaded: loaded (/etc/systemd/system/myDevices.service; enabled; vendor preset: enabled)

Active: failed (Result: exit-code) since Mon 2018-12-10 22:48:06 CET; 26s ago

Process: 27774 ExecStart=/usr/bin/python3 -m myDevices -P /var/run/myDevices/cayenne.pid (code=exited, status=1/FAILURE)

Process: 27772 ExecStartPre=/bin/chown cayenne:cayenne /etc/myDevices/devices.json (code=exited, status=0/SUCCESS)

Process: 27768 ExecStartPre=/bin/chown cayenne:cayenne /etc/myDevices/agent.db* (code=exited, status=1/FAILURE)

Process: 27765 ExecStartPre=/bin/chown cayenne:cayenne /etc/myDevices/AppSettings.ini (code=exited, status=0/SUCCESS)

Process: 27762 ExecStartPre=/bin/chown cayenne:cayenne /etc/myDevices (code=exited, status=0/SUCCESS)

Process: 27759 ExecStartPre=/bin/chown -R cayenne:cayenne /var/log/myDevices/ (code=exited, status=0/SUCCESS)

Process: 27757 ExecStartPre=/bin/mkdir -p /var/log/myDevices (code=exited, status=0/SUCCESS)

Process: 27754 ExecStartPre=/bin/chown cayenne:cayenne /var/run/myDevices/ (code=exited, status=0/SUCCESS)

Process: 27751 ExecStartPre=/bin/mkdir -p /var/run/myDevices (code=exited, status=0/SUCCESS)

Main PID: 27774 (code=exited, status=1/FAILURE)

Dec 10 22:48:05 openplotter systemd[1]: myDevices.service: Unit entered failed state.

Dec 10 22:48:05 openplotter systemd[1]: myDevices.service: Failed with result ‘exit-code’.

Dec 10 22:48:06 openplotter systemd[1]: myDevices.service: Service hold-off time over, scheduling restart.

Dec 10 22:48:06 openplotter systemd[1]: Stopped myDevices service.

Dec 10 22:48:06 openplotter systemd[1]: myDevices.service: Start request repeated too quickly.

Dec 10 22:48:06 openplotter systemd[1]: Failed to start myDevices service.

Dec 10 22:48:06 openplotter systemd[1]: myDevices.service: Unit entered failed state.

Dec 10 22:48:06 openplotter systemd[1]: myDevices.service: Failed with result ‘exit-code’.

journalctl -u myDevices

Summary

Dec 10 21:23:06 openplotter systemd[1]: myDevices.service: Service hold-off time over, scheduling restart.

Dec 10 21:23:06 openplotter systemd[1]: Stopped myDevices service.

Dec 10 21:23:06 openplotter systemd[1]: myDevices.service: Start request repeated too quickly.

Dec 10 21:23:06 openplotter systemd[1]: Failed to start myDevices service.

Dec 10 21:23:06 openplotter systemd[1]: myDevices.service: Unit entered failed state.

Dec 10 21:23:06 openplotter systemd[1]: myDevices.service: Failed with result ‘exit-code’.

Dec 10 21:24:01 openplotter systemd[1]: Starting myDevices service…

Dec 10 21:24:01 openplotter systemd[1]: Started myDevices service.

Dec 10 21:24:01 openplotter systemd[25239]: pam_unix(login:session): session opened for user cayenne by (uid=0)

Dec 10 21:24:02 openplotter systemd[1]: myDevices.service: Main process exited, code=exited, status=1/FAILURE

Dec 10 21:24:02 openplotter systemd[1]: myDevices.service: Unit entered failed state.

Dec 10 21:24:02 openplotter systemd[1]: myDevices.service: Failed with result ‘exit-code’.

Dec 10 21:24:02 openplotter systemd[1]: myDevices.service: Service hold-off time over, scheduling restart.

Dec 10 21:24:02 openplotter systemd[1]: Stopped myDevices service.

Dec 10 21:24:02 openplotter systemd[1]: Starting myDevices service…

Dec 10 21:24:02 openplotter systemd[1]: Started myDevices service.

Dec 10 21:24:02 openplotter systemd[25292]: pam_unix(login:session): session opened for user cayenne by (uid=0)

Dec 10 21:24:03 openplotter systemd[1]: myDevices.service: Main process exited, code=exited, status=1/FAILURE

Dec 10 21:24:03 openplotter systemd[1]: myDevices.service: Unit entered failed state.

Dec 10 21:24:03 openplotter systemd[1]: myDevices.service: Failed with result ‘exit-code’.

Dec 10 21:24:03 openplotter systemd[1]: myDevices.service: Service hold-off time over, scheduling restart.

Dec 10 21:24:03 openplotter systemd[1]: Stopped myDevices service.

Dec 10 21:24:03 openplotter systemd[1]: Starting myDevices service…

Dec 10 21:24:03 openplotter systemd[1]: Started myDevices service.

Dec 10 21:24:03 openplotter systemd[25338]: pam_unix(login:session): session opened for user cayenne by (uid=0)

Dec 10 21:24:04 openplotter systemd[1]: myDevices.service: Main process exited, code=exited, status=1/FAILURE

Dec 10 21:24:04 openplotter systemd[1]: myDevices.service: Unit entered failed state.

Dec 10 21:24:04 openplotter systemd[1]: myDevices.service: Failed with result ‘exit-code’.

Dec 10 21:24:04 openplotter systemd[1]: myDevices.service: Service hold-off time over, scheduling restart.

Dec 10 21:24:04 openplotter systemd[1]: Stopped myDevices service.

Dec 10 21:24:04 openplotter systemd[1]: Starting myDevices service…

Dec 10 21:24:04 openplotter systemd[1]: Started myDevices service.

Dec 10 21:24:04 openplotter systemd[25386]: pam_unix(login:session): session opened for user cayenne by (uid=0)

Dec 10 21:24:05 openplotter systemd[1]: myDevices.service: Main process exited, code=exited, status=1/FAILURE

Dec 10 21:24:05 openplotter systemd[1]: myDevices.service: Unit entered failed state.

Dec 10 21:24:05 openplotter systemd[1]: myDevices.service: Failed with result ‘exit-code’.

Dec 10 21:24:05 openplotter systemd[1]: myDevices.service: Service hold-off time over, scheduling restart.

Dec 10 21:24:05 openplotter systemd[1]: Stopped myDevices service.

Dec 10 21:24:05 openplotter systemd[1]: Starting myDevices service…

Dec 10 21:24:05 openplotter systemd[1]: Started myDevices service.

Dec 10 21:24:05 openplotter systemd[25431]: pam_unix(login:session): session opened for user cayenne by (uid=0)

Dec 10 21:24:06 openplotter systemd[1]: myDevices.service: Main process exited, code=exited, status=1/FAILURE

Dec 10 21:24:06 openplotter systemd[1]: myDevices.service: Unit entered failed state.

Dec 10 21:24:06 openplotter systemd[1]: myDevices.service: Failed with result ‘exit-code’.

Dec 10 21:24:06 openplotter systemd[1]: myDevices.service: Service hold-off time over, scheduling restart.

Dec 10 21:24:06 openplotter systemd[1]: Stopped myDevices service.

Dec 10 21:24:06 openplotter systemd[1]: myDevices.service: Start request repeated too quickly.

Dec 10 21:24:06 openplotter systemd[1]: Failed to start myDevices service.

Dec 10 21:24:06 openplotter systemd[1]: myDevices.service: Unit entered failed state.

Dec 10 21:24:06 openplotter systemd[1]: myDevices.service: Failed with result ‘exit-code’.

Dec 10 21:25:02 openplotter systemd[1]: Starting myDevices service…

Dec 10 21:25:02 openplotter systemd[1]: Started myDevices service.

Dec 10 21:25:02 openplotter systemd[25638]: pam_unix(login:session): session opened for user cayenne by (uid=0)

Dec 10 21:25:02 openplotter systemd[1]: myDevices.service: Main process exited, code=exited, status=1/FAILURE

Dec 10 21:25:02 openplotter systemd[1]: myDevices.service: Unit entered failed state.

Dec 10 21:25:02 openplotter systemd[1]: myDevices.service: Failed with result ‘exit-code’.


#51

also, it didn’t continue working overnight, or even after an hour. started sending on port 8883 instead of 1883.

Summary

$ sudo -u cayenne python3 -m myDevices

2018-12-11 22:31:33 - myDevices - INFO - Connecting to mqtt.mydevices.com:8883

2018-12-11 22:31:33 - myDevices - INFO - Connected with result code 0

2018-12-11 22:31:33 - myDevices - INFO - GPIO - Native added

2018-12-11 22:31:33 - myDevices - INFO - [‘Temperature’] - BMP180_TEMPERATURE GH7nyCK1n8DxHro added

2018-12-11 22:31:34 - myDevices - INFO - [‘Pressure’] - BMP180_PRESSURE HtML0rGwGx4tDyF added

2018-12-11 22:31:34 - myDevices - INFO - Send system info: [{‘sys:os:name’: ‘raspbian’}, {‘sys:os:version’: ‘9’}, {‘agent:version’: ‘2.0.2.264’}, {‘sys:pwr:reset’: 0}, {‘sys:pwr:halt’: 0}, {‘sys:i2c’: 1}, {‘sys:spi’: 1}, {‘sys:uart’: 1}, {‘sys:1wire’: 1}, {‘sys:devicetree’: 1}]

2018-12-11 22:31:34 - myDevices - INFO - Executing regular download test for network speed

2018-12-11 22:31:35 - myDevices - INFO - Sensors info: [{‘channel’: ‘dev:GH7nyCK1n8DxHro’, ‘value’: 31.45, ‘type’: ‘temp’, ‘unit’: ‘c’, ‘name’: ‘BMP180 Temperature’}, {‘channel’: ‘dev:HtML0rGwGx4tDyF’, ‘value’: 101241, ‘type’: ‘bp’, ‘unit’: ‘pa’, ‘name’: ‘BMP180 Pressure’}]

2018-12-11 22:31:35 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 41.6}, {‘sys:cpu;temp’: 54.23}, {‘sys:ram;usage’: 322822144}, {‘sys:storage:/;usage’: 7562625024}, {‘sys:net;ip’: ‘192.168.1.111’}, {‘dev:GH7nyCK1n8DxHro’: 31.45}, {‘dev:HtML0rGwGx4tDyF’: 101241}] + sys:gpio

2018-12-11 22:31:50 - myDevices - INFO - Sensors info: [{‘channel’: ‘dev:GH7nyCK1n8DxHro’, ‘value’: 31.45, ‘type’: ‘temp’, ‘unit’: ‘c’, ‘name’: ‘BMP180 Temperature’}, {‘channel’: ‘dev:HtML0rGwGx4tDyF’, ‘value’: 101232, ‘type’: ‘bp’, ‘unit’: ‘pa’, ‘name’: ‘BMP180 Pressure’}]

2018-12-11 22:31:50 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 26.9}, {‘sys:cpu;temp’: 52.078}, {‘sys:ram;usage’: 322564096}, {‘sys:storage:/;usage’: 7562645504}, {‘sys:net;speedtest’: 1.4108446691763241}, {‘dev:HtML0rGwGx4tDyF’: 101232}]

2018-12-11 22:32:05 - myDevices - INFO - Sensors info: [{‘channel’: ‘dev:GH7nyCK1n8DxHro’, ‘value’: 31.5, ‘type’: ‘temp’, ‘unit’: ‘c’, ‘name’: ‘BMP180 Temperature’}, {‘channel’: ‘dev:HtML0rGwGx4tDyF’, ‘value’: 101235, ‘type’: ‘bp’, ‘unit’: ‘pa’, ‘name’: ‘BMP180 Pressure’}]

2018-12-11 22:32:05 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 26.8}, {‘sys:cpu;temp’: 53.154}, {‘sys:ram;usage’: 327385088}, {‘sys:storage:/;usage’: 7562670080}, {‘dev:GH7nyCK1n8DxHro’: 31.5}, {‘dev:HtML0rGwGx4tDyF’: 101235}]


#52

we are looking into the issue.


#53

we need a bit more info, can you provide output of following:

ls -l /var/run/myDevices/

sudo ls -l /var/run/myDevices/

sudo -u cayenne /usr/bin/python3 -m myDevices -P /var/run/myDevices/cayenne.pid before running this you need to manual stop the service with sudo service myDevices stop


#54

ls -l /var/run/myDevices/
total 0

sudo ls -l /var/run/myDevices/
total 0

sudo -u cayenne /usr/bin/python3 -m myDevices -P /var/run/myDevices/cayenne.pid
/usr/bin/python3: No module named myDevices


#55

here’s from today:

$ systemctl status -l -n 20 myDevices

  • myDevices.service - myDevices service
    Loaded: loaded (/etc/systemd/system/myDevices.service; enabled; vendor preset
    Active: inactive (dead) since Sun 2018-12-16 01:44:02 CET; 56s ago
    Process: 6902 ExecStart=/usr/bin/python3 -m myDevices -P /var/run/myDevices/ca
    Process: 6899 ExecStartPre=/bin/chown cayenne:cayenne /etc/myDevices/devices.j
    Process: 6895 ExecStartPre=/bin/chown cayenne:cayenne /etc/myDevices/agent.db*
    Process: 6892 ExecStartPre=/bin/chown cayenne:cayenne /etc/myDevices/AppSettin
    Process: 6889 ExecStartPre=/bin/chown cayenne:cayenne /etc/myDevices (code=exi
    Process: 6885 ExecStartPre=/bin/chown -R cayenne:cayenne /var/log/myDevices/ (
    Process: 6882 ExecStartPre=/bin/mkdir -p /var/log/myDevices (code=exited, stat
    Process: 6879 ExecStartPre=/bin/chown cayenne:cayenne /var/run/myDevices/ (cod
    Process: 6875 ExecStartPre=/bin/mkdir -p /var/run/myDevices (code=exited, stat
    Main PID: 6902 (code=killed, signal=TERM)
    CPU: 113ms

Dec 16 01:44:01 openplotter systemd[1]: Starting myDevices service…
Dec 16 01:44:02 openplotter systemd[1]: Started myDevices service.
Dec 16 01:44:02 openplotter systemd[6902]: pam_unix(login:session): session open
Dec 16 01:44:02 openplotter systemd[1]: Stopping myDevices service…
Dec 16 01:44:02 openplotter systemd[1]: Stopped myDevices service.
lines 1-20/20 (END)…skipping…

  • myDevices.service - myDevices service
    Loaded: loaded (/etc/systemd/system/myDevices.service; enabled; vendor preset: enabled)
    Active: inactive (dead) since Sun 2018-12-16 01:44:02 CET; 56s ago
    Process: 6902 ExecStart=/usr/bin/python3 -m myDevices -P /var/run/myDevices/cayenne.pid (code=killed, signal=TERM)
    Process: 6899 ExecStartPre=/bin/chown cayenne:cayenne /etc/myDevices/devices.json (code=exited, status=0/SUCCESS)
    Process: 6895 ExecStartPre=/bin/chown cayenne:cayenne /etc/myDevices/agent.db* (code=exited, status=1/FAILURE)
    Process: 6892 ExecStartPre=/bin/chown cayenne:cayenne /etc/myDevices/AppSettings.ini (code=exited, status=0/SUCCESS)
    Process: 6889 ExecStartPre=/bin/chown cayenne:cayenne /etc/myDevices (code=exited, status=0/SUCCESS)
    Process: 6885 ExecStartPre=/bin/chown -R cayenne:cayenne /var/log/myDevices/ (code=exited, status=0/SUCCESS)
    Process: 6882 ExecStartPre=/bin/mkdir -p /var/log/myDevices (code=exited, status=0/SUCCESS)
    Process: 6879 ExecStartPre=/bin/chown cayenne:cayenne /var/run/myDevices/ (code=exited, status=0/SUCCESS)
    Process: 6875 ExecStartPre=/bin/mkdir -p /var/run/myDevices (code=exited, status=0/SUCCESS)
    Main PID: 6902 (code=killed, signal=TERM)
    CPU: 113ms

Dec 16 01:44:01 openplotter systemd[1]: Starting myDevices service…
Dec 16 01:44:02 openplotter systemd[1]: Started myDevices service.
Dec 16 01:44:02 openplotter systemd[6902]: pam_unix(login:session): session opened for user cayenne by (uid=0)
Dec 16 01:44:02 openplotter systemd[1]: Stopping myDevices service…
Dec 16 01:44:02 openplotter systemd[1]: Stopped myDevices service.
~
~
~
~
~
~
~
~
~
~
~

$ journalctl -u myDevices
– Logs begin at Sun 2018-12-16 01:17:01 CET, end at Sun 2018-12-16 01:46:57 CET. –
Dec 16 01:17:05 openplotter systemd[1]: Starting myDevices service…
Dec 16 01:17:06 openplotter systemd[1]: Started myDevices service.
Dec 16 01:17:07 openplotter systemd[593]: pam_unix(login:session): session opened for user cayenne by (uid=0)
Dec 16 01:17:26 openplotter systemd[1]: myDevices.service: Main process exited, code=exited, status=1/FAILURE
Dec 16 01:17:26 openplotter systemd[1]: myDevices.service: Unit entered failed state.
Dec 16 01:17:26 openplotter systemd[1]: myDevices.service: Failed with result ‘exit-code’.
Dec 16 01:17:27 openplotter systemd[1]: myDevices.service: Service hold-off time over, scheduling restart.
Dec 16 01:17:27 openplotter systemd[1]: Stopped myDevices service.
Dec 16 01:17:27 openplotter systemd[1]: Starting myDevices service…
Dec 16 01:17:27 openplotter systemd[1]: Started myDevices service.

this keeps repeating a while. I truncated it for posting here.


#56

thanks, we will look into the issue.


#57

I appear to be having a similar problem. I have an ESP8266 with a single LED, dashboard is set with button digital widget showing value. After resetting the 8266 the dashboard shows offline - after some time (>1 min) clicking on the button causes the LED to go on but dashboard shows value of 0. Refreshing the dashboard the button shows 1. Dashboard again shows “offline” and then the offline message goes away, the button moves up but the tab bar doesn’t - hides the top 1/3 of the button. The 8266 code is the sample code modified not to report the time (overflowed the messages allowed) and to set the led to the incoming value.


#58

thanks for reporting the bug with button widget value not changing, we will look into it.
About the dashboard showing offline is because you are not sending any data to the dashbioard to make it online. We are looking into this issue. you can add Cayenne.virtualWrite(0, millis()); in the void setup() to make the dashboard online.


#59

thank you for the tip, had thought, erroneously, that connecting would bring it on-line; Sending from setup does bring the dashboard on-line but when I refresh the page (to get the button value updated) it goes back to offline.

thanks again


#60

it should not go offline unless you have some internet connection issue. what do you mean by (to get the button value updated