Go to advanced search

by scotty101
Thu Jun 20, 2019 7:40 am
Forum: Advanced users
Topic: Get the Raw data from a Zigbee-Sensor!
Replies: 2
Views: 40

Re: Get the Raw data from a Zigbee-Sensor!

Which programming language do you wish to use and what database type?

You'll have to write a program that subscribes to the MQTT topic and when it receives a message, runs a query on the database to store the information.
by scotty101
Thu Jun 20, 2019 7:36 am
Forum: General discussion
Topic: Display-o-tron HAT projects
Replies: 17
Views: 557

Re: Display-o-tron HAT projects

Try changing the line humid = str(float ("%3.f" % humidity)) #define output formats for Humidity and Temperature to humid = str(float ("%3.f" % Humidity_Value)) #define output formats for Humidity and Temperature You seem to be doing a lot of unnecessary conversions between floats and string and the...
by scotty101
Wed Jun 19, 2019 8:33 pm
Forum: General discussion
Topic: Display-o-tron HAT projects
Replies: 17
Views: 557

Re: Display-o-tron HAT projects

Can you share a more complete code example? What sets humid for example?

I suspect you aren't converting humid to a string but it is impossible to tell with the partial example that you've shared.
by scotty101
Wed Jun 19, 2019 8:28 pm
Forum: Python
Topic: How to send data from remotely hosted HTML form to Pi
Replies: 1
Views: 30

Re: How to send data from remotely hosted HTML form to Pi

Why not host the HTML on the raspberry pi?
Then you can use Python/Flask or Node.js to serve the HTML and receive any commands to control the devices.
I'd use JavaScript to send HTTP requests from the user's browser back to the server.
by scotty101
Wed Jun 19, 2019 10:12 am
Forum: Networking and servers
Topic: json data from server to client
Replies: 9
Views: 168

Re: json data from server to client

gauravsharma0190 wrote:
Wed Jun 19, 2019 9:53 am
Actually i have two code of server and client in TCP/UDP communication , and i am communicating through it mean message to the client and server.
If you already have code for TCP communication, why can't you just send the JSON data in the same way?

I have no idea what "it mean message" is..
by scotty101
Tue Jun 18, 2019 1:31 pm
Forum: Networking and servers
Topic: json data from server to client
Replies: 9
Views: 168

Re: json data from server to client

hello scooty i read the flask library . i just read the http and REST API from which i can use to send and receive the json data using the get and post request. Here i write a code in python import json, requests data = { 'user' : 'gaurav' 'var' : '7892' } payload = json.dumps(data) url = ' ' r = r...
by scotty101
Tue Jun 18, 2019 7:36 am
Forum: Networking and servers
Topic: json data from server to client
Replies: 9
Views: 168

Re: json data from server to client

Python has lots of wonderful libraries to help with things like this (although the core library also contains ways to do this). You can setup an HTTP server in python using Flask and on the other end you can use Requests to access the server and get the JSON data. http://flask.pocoo.org/ https://2.p...
by scotty101
Fri Jun 14, 2019 11:07 am
Forum: Advanced users
Topic: temperature
Replies: 1
Views: 166

Re: temperature

/usr/bin/vcgencmd measure_temp is the GPU Temp and the other is the CPU temp.

See http://kernelreloaded.com/formatting-ou ... e-sensors/
by scotty101
Thu Jun 13, 2019 12:16 pm
Forum: Automation, sensing and robotics
Topic: Communicating with other sensors distributed to other spaces
Replies: 5
Views: 667

Re: Communicating with other sensors distributed to other spaces

I am having a similar kind of project bt on large scale, so can't use wifi. So how can I send sensors data from nodemcu to rpi without internet and most importantly it's on large scale, you can assume the size to be of a farm. A farm is the same size as a piece of string. Unspecified length anywher...
by scotty101
Wed Jun 12, 2019 7:32 am
Forum: Python
Topic: Using datetime to control lights
Replies: 11
Views: 281

Re: Using datetime to control lights

Zachgober, If you want help fixing your python code, it generally helps if you share the python code. Remember to put it inside code tags so it appears like this

Code: Select all

while True:
    if code_not_in_tags:
        print("Code is unreadable")
by scotty101
Wed Jun 12, 2019 7:25 am
Forum: Python
Topic: Variable Not being Defined
Replies: 3
Views: 171

Re: Variable Not being Defined

Would also be helpful for you to share a more complete code example and the full error message that you receive. At the moment, we have no idea which variable is the problem.
by scotty101
Wed Jun 12, 2019 7:22 am
Forum: Python
Topic: How to change any value in python with an input
Replies: 15
Views: 370

Re: How to change any value in python with an input

Shaurya wrote:
Wed Jun 12, 2019 6:04 am
But then how will I change the value of x with inputs???????
If you look at gordon77's code example, the value of x is increased every time the GPIO.Input(29) is true. This is done by the line "x += 1" which means add 1 to the current value of x.
by scotty101
Thu Jun 06, 2019 10:38 am
Forum: Networking and servers
Topic: Connecting Smart TV to internet with RPi1 Model B
Replies: 8
Views: 264

Re: Connecting Smart TV to internet with RPi1 Model B

It's been covered before on here, you bridge the WiFi and Ethernet interfaces.

viewtopic.php?t=132674
by scotty101
Thu Jun 06, 2019 10:08 am
Forum: Other projects
Topic: How to internal website send command to terminal raspbian
Replies: 5
Views: 181

Re: How to internal website send command to terminal raspbian

Perhaps you could share your code? As an example, I created something a while back to send IR commands via a python script from a web page. This allowed me to control my TV from a web browser on my phone. https://github.com/scotty3785/pi_tv_remote It uses python-flask, a framework for creating dynam...
by scotty101
Wed Jun 05, 2019 10:08 am
Forum: Media centres
Topic: Noob advice needed
Replies: 3
Views: 172

Re: Noob advice needed

Garjen wrote:
Wed Jun 05, 2019 6:59 am
Bit worried about Kodi thought it was illigal?
Kodi is not illegal. It is Kodi Plugins that allow the free streaming of shows from subscription services that are legally questionable.

Buy a starter kit as you are likely to need some of the part in order to initially setup the Kodi box.
by scotty101
Tue Jun 04, 2019 2:29 pm
Forum: General discussion
Topic: Wordpress plugin
Replies: 3
Views: 101

Re: Wordpress plugin

What kind of plugin? What do you want it to do?
Generally you have an idea for a feature you'd like your web site have, realise that wordpress by default doesn't do it and search for a suitable plugin.
What feature do you want to add?
by scotty101
Tue Jun 04, 2019 12:16 pm
Forum: Camera board
Topic: Soldering camera cable
Replies: 1
Views: 91

Re: Soldering camera cable

I'd suspect you're likely to melt the plastic or lift the metal strips off the plastic well before any solder melts.

You could experiment with conductive adhesives or just buy a longer cable.
by scotty101
Tue Jun 04, 2019 10:43 am
Forum: Troubleshooting
Topic: how to read the data from the XML file in Raspberry Pi 3
Replies: 6
Views: 135

Re: how to read the data from the XML file in Raspberry Pi 3

PeterO wrote:
Tue Jun 04, 2019 9:54 am
Maybe read the other replies first ?
I did.. OP clearly didn't so I posted it again.
by scotty101
Tue Jun 04, 2019 9:46 am
Forum: General discussion
Topic: Self sailing boat
Replies: 9
Views: 285

Re: Self sailing boat

Thanks appreciate the reply very helpful as before I had no idea where to start How do you eat an elephant? One bite at a time. You have an ambitious project but no experience. In order to complete your project you're going to have to put your project aside for the moment and learn some skills. The...
by scotty101
Tue Jun 04, 2019 9:35 am
Forum: Troubleshooting
Topic: how to read the data from the XML file in Raspberry Pi 3
Replies: 6
Views: 135

Re: how to read the data from the XML file in Raspberry Pi 3

harishreddy wrote:
Tue Jun 04, 2019 7:40 am
Thank you for your reply,

Yes, i want C example
Let me google that for you
http://www.xmlsoft.org/examples/
by scotty101
Sat Jun 01, 2019 10:20 pm
Forum: Troubleshooting
Topic: BrightPi Schedule On/Off in Python?
Replies: 10
Views: 236

Re: BrightPi Schedule On/Off in Python?

Try the following import line

Code: Select all

from brightpi.brightpilib import *
As per the example of the Bright Pi GitHub https://github.com/PiSupply/Bright-Pi/b ... pi-test.py
by scotty101
Fri May 31, 2019 2:45 pm
Forum: General discussion
Topic: any plans to upgrade zero?
Replies: 7
Views: 277

Re: any plans to upgrade zero?

hello i am just asking if there are any plans to upgrade the Pi z to like a pi z+ giving it more ram and a better CPU but keeping the idea of it being small and cheap (cheap being like 10-15 USD) The Pi Zero form factor is reliant on the Package on Package System on Chip that only the older and slo...
by scotty101
Fri May 31, 2019 10:05 am
Forum: Python
Topic: Seeking assistance getting tKinter to play nice
Replies: 7
Views: 233

Re: Seeking assistance getting tKinter to play nice

Difficult to tell as you haven't shared a complete and executable example of your code. Can you create a smallish example of code that replicates the same fault?

Do you have a call to the tkinter mainloop method?
by scotty101
Thu May 30, 2019 4:45 pm
Forum: Troubleshooting
Topic: Got IndexError: list index out of range during output of internal ip addr
Replies: 4
Views: 109

Re: Got IndexError: list index out of range during output of internal ip addr

Can you share what output you get on the screen when you run "ip addr show eth0". The error suggests that what is being returned from the check_output command is not what you are expecting and that one of the lists is not long enough. For example, an IndexError will occur if you try to access elemen...
by scotty101
Thu May 30, 2019 12:35 pm
Forum: Advanced users
Topic: live system information on website
Replies: 1
Views: 131

Re: live system information on website

What did you try already?
Did you follow a tutorial? Which one?

Go to advanced search