You can install our site as a web app on your iOS device by utilizing the Add to Home Screen feature in Safari. Please see this thread for more details on this.
Note: This feature may not be available in some browsers.
@Steffen75D Im not used to python codeing but it should look like the following...
Code:m = re.search(b'^<LL control=\".*LeistungPV/state\".*value=.([0-9]*)', greenEnergyData, re.MULTILINE)
... My question is, has anyone used this and controlled it from something other than Tesla software. I have the Sense Energy monitor installed and I am in the process of installing my own solar system using Enphase Envoy to track the generation on a panel by panel basis, but the Sense will give the view of how much solar there is vs. how much draw there is. It would be grand if I could connect a TWC to my car to charge from the sun. But since I charge using the UMC I would be happy if I could just tell the car to start charging when there is too much extra solar energy and cut it off when there isn't enough extra.
Just not sure how I am going to do it.
All was working fine for weeks but recently I got a problem, not really related to the script but more to the serial-to-usb driver it seems:
Code:[18830.252081] usb 1-1: USB disconnect, device number 3 [18830.252457] ftdi_sio ttyUSB1: error from flowcontrol urb [18830.252930] ftdi_sio ttyUSB1: FTDI USB Serial Device converter now disconnected from ttyUSB1 [18830.253007] ftdi_sio 1-1:1.0: device disconnected [18830.451813] Indeed it is in host mode hprt0 = 00021501 [18830.651727] usb 1-1: new full-speed USB device number 4 using dwc_otg [18830.651963] Indeed it is in host mode hprt0 = 00021501 [18830.887408] usb 1-1: New USB device found, idVendor=0403, idProduct=6001 [18830.887426] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [18830.887433] usb 1-1: Product: USB-RS485 Cable [18830.887440] usb 1-1: Manufacturer: FTDI [18830.887446] usb 1-1: SerialNumber: FT2FZ7WG [18830.909034] ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected [18830.909237] usb 1-1: Detected FT232RL [18830.909847] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0
Of course the script crashes after this. Is it a faulty hardware or a cable broken or what am I suppost to do now?
You could start here for controlling the car: Tesla API
It would be much simpler than the project in this thread, since you don't have to make any HW connections, just write software. It could run on a PC, or on something like the Raspberry Pi. Any computer with a network connection.
I am new to all this. I have been trying to keep up, but I keep getting stymied by all the code examples. My understanding after trying to re-read this thread is that it started with reverse-engineering the communications between a slave and a master TWC and then @CDragon released software that communicates with a Tesla Powerwall and then uses this protocol to change the charge rate of the TWC to reflect the amount of solar energy being generated. I have seen the video showing its use:
My question is, has anyone used this and controlled it from something other than Tesla software. I have the Sense Energy monitor installed and I am in the process of installing my own solar system using Enphase Envoy to track the generation on a panel by panel basis, but the Sense will give the view of how much solar there is vs. how much draw there is. It would be grand if I could connect a TWC to my car to charge from the sun. But since I charge using the UMC I would be happy if I could just tell the car to start charging when there is too much extra solar energy and cut it off when there isn't enough extra.
Just not sure how I am going to do it.
Hi Everyone,
Has anyone else witnessed some strange behavior on their car with using the pi TMC interface to the wall charger since the 2019.24.4 update ?
Was working perfectly prior.
Today the web interface was reporting 18a available and charging at 17.3 ish (normal) but the car was only accepting 11a / 18a and showed this on the car and the app.
Then later when it was supposed to shutdown from end of sufficient sunshine, it instead just reduced to 5a and kept charging.
Thanks
That's essentially what I did. I just programmed a uc with a tiny RS 485 chip hanging off of it. Then you don't have to worry about the vampire drain of the rasp, or whether there's enough power coming from the TWC power supply, or whether it will fit. There are some advantages to the rasp but not enough to be worth it IMO.Rasp with linux, python and lots of interfacing.
Why not just use a Arduino with a RS485 shield ... am i missing something?
That's essentially what I did. I just programmed a uc ...
Just finished home install with 2 TWCs on a Pi with TWCManager. Seems to work great. I used Nicer82s fork as I am not looking at solar but at house load and not maxing out my main fuse.Question... this raspberry PI loadsharing thing.... it emulates the master and tells the slave unit how much current it can draw. What if there’s more than one HPWC? I’m thinking of an application where my solar system would control two HPWCs... the load share would depend on how many cars were plugged in. Anyone tried this?
Just finished home install with 2 TWCs on a Pi with TWCManager. Seems to work great. I used Nicer82s fork as I am not looking at solar but at house load and not maxing out my main fuse.
I will report my changes here later and post some pictures.
I installed all the stuff and the script runs basically well, many thanks @CDragon for your hard work!
Nevertheless, the "trackgreenenergy" part crashes every day or two, prompting the following lines:
--------------------------
14:49:39: SHB 4112: 00 00.00/00.00A 0000 0000 M: 09 00.00/06.00A 0000 0000
{"Id":"cc8dcff0-92a9-4ef3-980a-736f5d5e6b91","Name":"Solarinput","Serial":XXXXXX,"DeviceEnergyType":1,"FamilyType":1,"ActivePower":-0.35355000000000003,"ActivePowerUnit":"kW","CounterReading":-513.953,"CounterReadingUnit":"kWh","CounterReadingT1":-513.953,"CounterReadingImport":-513.953,"SwitchOn":true,"Voltage":234.5,"VoltageL1":234.5,"Current":-1.512,"PowerFactor":0.998,"PowerFactorL1":0.998,"Temperature":16.95,"ValueDate":"2019-03-16T13:48:55.0197151Z"}
14:49:41: Solar generating 353W so limit car charging to:
6.47A + 0.00A = 6.47A. Charge when above 6A (minAmpsPerTWC).
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/home/pi/TWC/TWCManager.py", line 1246, in background_tasks_thread
check_green_energy()
File "/home/pi/TWC/TWCManager.py", line 1296, in check_green_energy
parsedJson = json.loads(jsonStr)
File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
14:59:39: SHB 4112: 00 00.00/00.00A 0000 0000 M: 09 00.00/06.00A 0000 0000
15:02:59: Web query: 'b'getStatus'', id 1027, time 1552744979, type 2
15:09:40: SHB 4112: 00 00.00/00.00A 0000 0000 M: 09 00.00/06.00A 0000 0000
15:19:41: SHB 4112: 00 00.00/00.00A 0000 0000 M: 09 00.00/06.00A 0000 0000
15:20:39: Web query: 'b'getStatus'', id 41052, time 1552746039, type 2
15:29:42: SHB 4112: 00 00.00/00.00A 0000 0000 M: 09 00.00/06.00A 0000 0000
---------------------------
So at time 14:49:39 was the last successful interrogation of my smart-meter, and then an error encountered. As I'm no IT-crack at all, I'd like to ask you guys out there if you have any clue what's the issue there??
Once this occured, the scipt keeps basically running, but without the "trackgreenenergy" part. It is not recommiting without restarting the script.
Cheers Chris
since i have two Tesla Wall Connector installed i found a bug in the code which is responsible to display the TWC on the website (index.php):
i changed three lines (342,343,345) in the code and now it displays the correct values when more than one TWC is connected.
sorry for the pictures. was not able to copy&paste as text right now
Hi, I found the location in the file. I was looking at the wrong file (it is in /HTML/index.php)Hi Marlan,
I do have as well two TWC and I am still having the same issue as you, both appear with the same name. I wanted to fix it in the code you posted, but I can not find the lines. I installed everything two weeks ago, so maybe @CDragon though he fixed it and change the code but the error is still there?