{"action":"closed","issue":{"url":"https://api.github.com/repos/maglub/piLogger/issues/147","labels_url":"https://api.github.com/repos/maglub/piLogger/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/maglub/piLogger/issues/147/comments","events_url":"https://api.github.com/repos/maglub/piLogger/issues/147/events","html_url":"https://github.com/maglub/piLogger/issues/147","id":118609903,"number":147,"title":"piLogger-cloud spool data for sensors that are not registered with pilogger.net","user":{"login":"maglub","id":2961018,"avatar_url":"https://avatars.githubusercontent.com/u/2961018?v=3","gravatar_id":"","url":"https://api.github.com/users/maglub","html_url":"https://github.com/maglub","followers_url":"https://api.github.com/users/maglub/followers","following_url":"https://api.github.com/users/maglub/following{/other_user}","gists_url":"https://api.github.com/users/maglub/gists{/gist_id}","starred_url":"https://api.github.com/users/maglub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maglub/subscriptions","organizations_url":"https://api.github.com/users/maglub/orgs","repos_url":"https://api.github.com/users/maglub/repos","events_url":"https://api.github.com/users/maglub/events{/privacy}","received_events_url":"https://api.github.com/users/maglub/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/maglub/piLogger/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-24T13:35:52Z","updated_at":"2015-11-24T20:34:34Z","closed_at":"2015-11-24T20:34:34Z","body":"piLogger-cloud cannot send sensor data to pilogger.net for devices that are not registered. This can happen when:\r\n\r\n* One add more sensors to the device after the registration process, or\r\n* One use ./logMetric to add new sensor data for \"virtual\" or non existing sensors ad hoc for non registered sensors\r\n\r\n```\r\npi@d1wire-r001fry ~/piLogger/bin $ ./logMetric arne 123\r\n20151124_143047;logMetric;  - Logging data for device arne, 123 C\r\n20151124_143047;logMetric;    - callRemoteLoggingPlugins: found piLogger-cloud\r\n20151124_143047;piLogger-cloud;error: did get HTTP status code 403 from REST api - something went wrong\r\n20151124_143047;piLogger-cloud;writing measured data to /var/spool/piLogger/piLogger-cloud_2608_1448371847 for later processing\r\n20151124_143047;logMetric;    - callRemoteLoggingPlugins: found piLogger-remote\r\n20151124_143047;piLogger-remote;Logging arne:123 to 192.168.2.61\r\n{\"sensorId\":\"arne\",\"temperature\":\"123\",\"ok\":true,\"msg\":\"Added temperature to the database. Return message: OK!\"}200\r\n20151124_143047;logMetric;    - callRemoteLoggingPlugins: found shiftr.io\r\n20151124_143048;shiftr.io;  - Sending data to shiftr.io: d1wire-r001fry:arne:123\r\nOK\r\npi@d1wire-r001fry ~/piLogger/bin $ ls -latr /var/spool/piLogger/\r\ntotal 296\r\ndrwxr-xr-x 6 root root   4096 Oct  1 18:38 ..\r\n-rw-r--r-- 1 pi   pi       62 Nov 24 14:30 piLogger-cloud_2608_1448371847\r\ndrwxrwxrwx 2 pi   pi   290816 Nov 24 14:30 .\r\npi@d1wire-r001fry ~/piLogger/bin $ cat /var/spool/piLogger/piLogger-cloud_2608_1448371847 \r\na39c1872c47ab8fad315f90a4ac5cd9c,2015-11-24 14:30:47,123,arne\r\n```\r\n\r\n* Log entry from piLogger-cloud for this error:\r\n\r\n```\r\n20151124_143047;piLogger-cloud;error: did get HTTP status code 403 from REST api - something went wrong\r\n```\r\n\r\nWe should:\r\n\r\n* Add better logging for piLogger-cloud\r\n* Not spool data for non registered sensors (or make it an opitonal configuration)\r\n* Perhaps we could add a blacklist for sensors that we do not want to send to pilogger.net\r\n"}}