Skip to content

Commit

Permalink
Updated Winky/Denky/Wemos configuration for Teleinfo (#52)
Browse files Browse the repository at this point in the history
* updated Denky D4, added all D4 boards version

updated Denky D4, added all D4 boards version

* updated Wemos Teleinfo to reflect other configs

updated Wemos Teleinfo to reflect other configs

* removed teleinfo driver, now native in Nicolas's Firmware

removed teleinfo driver, now native in Nicolas's Firmware
adjusted some parameters to pre production

* fixed autoload of cp2fs.be

fixed autoload of cp2fs.be

* added autoexec.be

added autoexec.be

* Enable default Winky Sleep Time to 5min

Enable default Winky Sleep Time to 5min

* Enable Wifi Scan on boot for Winky

Enable Wifi Scan on boot for Winky
  • Loading branch information
hallard authored Aug 29, 2024
1 parent 669cb04 commit d6d7960
Show file tree
Hide file tree
Showing 19 changed files with 376 additions and 74 deletions.
23 changes: 12 additions & 11 deletions raw/esp32/DenkyD4_V1.0/init.bat
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
Template {"NAME":"Denky D4 (v1.0)","GPIO":[32,0,0,0,1,0,0,0,0,1,0,1,0,0,0,0,0,640,608,0,0,450,449,448,0,0,5632,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
Module 0
OtaUrl https://raw.githubusercontent.com/tasmota/install/main/firmware/unofficial/tasmota32-teleinfo.bin

; All these parameters are saved onto flash device
; so once configured, it's better to leave them in
; file init.bat
; only once when autoconf is activated or
; when it's removed and activated again
; ===================================================

; Set Teleinfo in legacy (historique) mode at 1200 baud.
EnergyConfig Historique
; Disable Boot Loop Detection
SetOption65 1

; Set Teleinfo in standard mode at 9600 baud.
; EnergyConfig Standard
; define OTA Url
OtaUrl https://github.com/NicolasBernaerts/tasmota/raw/master/teleinfo/binary/tasmota32-teleinfo-denkyd4.bin

; Enable sending of all frames in raw mode
EnergyConfig Full
; # Set auto timezone
Backlog0 Timezone 99; TimeStd 0,0,10,1,3,60; TimeDst 0,0,3,1,2,120

; Send only each 1 on 10 frames received
EnergyConfig Skip 9
; # Set Teleinfo in legacy (historique) mode at 1200 baud.
; EnergyConfig Historique

; # Set Teleinfo in stadard mode at 9600 baud.
; EnergyConfig Standard
20 changes: 20 additions & 0 deletions raw/esp32/DenkyD4_V1.1/_autoexec.be
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file does nothing it just contains some
# examples to suit your needs depending on project
# It will be copied into filesystem to be editable
# =====================================================

# Set auto timezone
#tasmota.cmd("Backlog0 Timezone 99; TimeStd 0,0,10,1,3,60; TimeDst 0,0,3,1,2,120")

# Set Teleinfo in legacy (historique) mode at 1200 baud.
#tasmota.cmd("EnergyConfig Historique")

# Set Teleinfo in Standar mode at 9600 baud.
#tasmota.cmd("EnergyConfig Standard")

# Disable Boot Loop Detection
#tasmota.cmd("SetOption65 1")

# Avoid conflict between native WS2812 and Berry control
# disables native WS2812 (default Scheme is 0)
#tasmota.cmd("Scheme 14")
33 changes: 33 additions & 0 deletions raw/esp32/DenkyD4_V1.1/cp2fs.be
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copy teleinfo driver to file system to be end user editable

# simple function to copy from autoconfig archive to filesystem
# return true if ok
def cp(from, to)
import path
if to == nil to = from end # to is optional
tasmota.log("OTA: copying "+tasmota.wd + to, 2)
if !path.exists(to)
try
# tasmota.log("f_in="+tasmota.wd + from)
var f_in = open(tasmota.wd + from)
var f_content = f_in.readbytes()
f_in.close()
var f_out = open(to, "w")
f_out.write(f_content)
f_out.close()
except .. as e,m
tasmota.log("OTA: Couldn't copy "+to+" "+e+" "+m,2)
return false
end
return true
end
return true
end

import path

# copy some samples files from autoconf
# to filesystem for end user speed up learn
cp("_autoexec.be", "autoexec.be")

# Done
26 changes: 13 additions & 13 deletions raw/esp32/DenkyD4_V1.1/init.bat
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
Br load("DenkyD4_V1.1.autoconf#cp2fs.be")
Template {"NAME":"Denky D4 (v1.1)","GPIO":[32,0,0,0,1,0,0,0,0,1,1376,1,0,0,0,0,0,640,608,0,0,0,0,0,0,0,5632,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
Module 0
OtaUrl https://raw.githubusercontent.com/tasmota/install/main/firmware/unofficial/tasmota32-teleinfo.bin

; All these parameters are saved onto flash device
; so once configured, it's better to leave them in
; file init.bat
; only once when autoconf is activated or
; when it's removed and activated again
; ===================================================

; Set Teleinfo in legacy (historique) mode at 1200 baud.
EnergyConfig Historique
; Disable Boot Loop Detection
SetOption65 1

; Set Teleinfo in standard mode at 9600 baud.
; EnergyConfig Standard

; Enable sending of all frames in raw mode
EnergyConfig Full

; Send only each 1 on 10 frames received
EnergyConfig Skip 9
; define OTA Url
OtaUrl https://github.com/NicolasBernaerts/tasmota/raw/master/teleinfo/binary/tasmota32-teleinfo-denkyd4.bin

; # Set auto timezone
Backlog0 Timezone 99; TimeStd 0,0,10,1,3,60; TimeDst 0,0,3,1,2,120

; # Set Teleinfo in legacy (historique) mode at 1200 baud.
; EnergyConfig Historique

; # Set Teleinfo in stadard mode at 9600 baud.
; EnergyConfig Standard
20 changes: 20 additions & 0 deletions raw/esp32/DenkyD4_V1.3/_autoexec.be
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file does nothing it just contains some
# examples to suit your needs depending on project
# It will be copied into filesystem to be editable
# =====================================================

# Set auto timezone
#tasmota.cmd("Backlog0 Timezone 99; TimeStd 0,0,10,1,3,60; TimeDst 0,0,3,1,2,120")

# Set Teleinfo in legacy (historique) mode at 1200 baud.
#tasmota.cmd("EnergyConfig Historique")

# Set Teleinfo in Standar mode at 9600 baud.
#tasmota.cmd("EnergyConfig Standard")

# Disable Boot Loop Detection
#tasmota.cmd("SetOption65 1")

# Avoid conflict between native WS2812 and Berry control
# disables native WS2812 (default Scheme is 0)
#tasmota.cmd("Scheme 14")
33 changes: 33 additions & 0 deletions raw/esp32/DenkyD4_V1.3/cp2fs.be
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copy teleinfo driver to file system to be end user editable

# simple function to copy from autoconfig archive to filesystem
# return true if ok
def cp(from, to)
import path
if to == nil to = from end # to is optional
tasmota.log("OTA: copying "+tasmota.wd + to, 2)
if !path.exists(to)
try
# tasmota.log("f_in="+tasmota.wd + from)
var f_in = open(tasmota.wd + from)
var f_content = f_in.readbytes()
f_in.close()
var f_out = open(to, "w")
f_out.write(f_content)
f_out.close()
except .. as e,m
tasmota.log("OTA: Couldn't copy "+to+" "+e+" "+m,2)
return false
end
return true
end
return true
end

import path

# copy some samples files from autoconf
# to filesystem for end user speed up learn
cp("_autoexec.be", "autoexec.be")

# Done
23 changes: 23 additions & 0 deletions raw/esp32/DenkyD4_V1.3/init.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Br load("DenkyD4_V1.3.autoconf#cp2fs.be")
Template {"NAME":"Denky D4 (v1.3)","GPIO":[32,0,0,0,1,0,0,0,0,1,1376,1,0,0,0,0,0,640,608,0,0,0,0,0,0,0,5632,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
Module 0

; All these parameters are saved onto flash device
; only once when autoconf is activated or
; when it's removed and activated again
; ===================================================

; Disable Boot Loop Detection
SetOption65 1

; define OTA Url
OtaUrl https://github.com/NicolasBernaerts/tasmota/raw/master/teleinfo/binary/tasmota32-teleinfo-denkyd4.bin

; # Set auto timezone
Backlog0 Timezone 99; TimeStd 0,0,10,1,3,60; TimeDst 0,0,3,1,2,120

; # Set Teleinfo in legacy (historique) mode at 1200 baud.
; EnergyConfig Historique

; # Set Teleinfo in stadard mode at 9600 baud.
; EnergyConfig Standard
20 changes: 20 additions & 0 deletions raw/esp32/DenkyD4_V1.3a/_autoexec.be
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file does nothing it just contains some
# examples to suit your needs depending on project
# It will be copied into filesystem to be editable
# =====================================================

# Set auto timezone
#tasmota.cmd("Backlog0 Timezone 99; TimeStd 0,0,10,1,3,60; TimeDst 0,0,3,1,2,120")

# Set Teleinfo in legacy (historique) mode at 1200 baud.
#tasmota.cmd("EnergyConfig Historique")

# Set Teleinfo in Standar mode at 9600 baud.
#tasmota.cmd("EnergyConfig Standard")

# Disable Boot Loop Detection
#tasmota.cmd("SetOption65 1")

# Avoid conflict between native WS2812 and Berry control
# disables native WS2812 (default Scheme is 0)
#tasmota.cmd("Scheme 14")
33 changes: 33 additions & 0 deletions raw/esp32/DenkyD4_V1.3a/cp2fs.be
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copy teleinfo driver to file system to be end user editable

# simple function to copy from autoconfig archive to filesystem
# return true if ok
def cp(from, to)
import path
if to == nil to = from end # to is optional
tasmota.log("OTA: copying "+tasmota.wd + to, 2)
if !path.exists(to)
try
# tasmota.log("f_in="+tasmota.wd + from)
var f_in = open(tasmota.wd + from)
var f_content = f_in.readbytes()
f_in.close()
var f_out = open(to, "w")
f_out.write(f_content)
f_out.close()
except .. as e,m
tasmota.log("OTA: Couldn't copy "+to+" "+e+" "+m,2)
return false
end
return true
end
return true
end

import path

# copy some samples files from autoconf
# to filesystem for end user speed up learn
cp("_autoexec.be", "autoexec.be")

# Done
23 changes: 23 additions & 0 deletions raw/esp32/DenkyD4_V1.3a/init.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Br load("DenkyD4_V1.3a.autoconf#cp2fs.be")
Template {"NAME":"Denky D4 (v1.3a)","GPIO":[32,0,0,0,1,0,0,0,0,1,1376,1,0,0,0,0,0,640,608,0,0,0,0,0,0,0,5632,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
Module 0

; All these parameters are saved onto flash device
; only once when autoconf is activated or
; when it's removed and activated again
; ===================================================

; Disable Boot Loop Detection
SetOption65 1

; define OTA Url
OtaUrl https://github.com/NicolasBernaerts/tasmota/raw/master/teleinfo/binary/tasmota32-teleinfo-denkyd4.bin

; # Set auto timezone
Backlog0 Timezone 99; TimeStd 0,0,10,1,3,60; TimeDst 0,0,3,1,2,120

; # Set Teleinfo in legacy (historique) mode at 1200 baud.
; EnergyConfig Historique

; # Set Teleinfo in stadard mode at 9600 baud.
; EnergyConfig Standard
20 changes: 20 additions & 0 deletions raw/esp32/Wemos_Teleinfo/_autoexec.be
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file does nothing it just contains some
# examples to suit your needs depending on project
# It will be copied into filesystem to be editable
# =====================================================

# Set auto timezone
#tasmota.cmd("Backlog0 Timezone 99; TimeStd 0,0,10,1,3,60; TimeDst 0,0,3,1,2,120")

# Set Teleinfo in legacy (historique) mode at 1200 baud.
#tasmota.cmd("EnergyConfig Historique")

# Set Teleinfo in Standar mode at 9600 baud.
#tasmota.cmd("EnergyConfig Standard")

# Disable Boot Loop Detection
#tasmota.cmd("SetOption65 1")

# Avoid conflict between native WS2812 and Berry control
# disables native WS2812 (default Scheme is 0)
#tasmota.cmd("Scheme 14")
33 changes: 33 additions & 0 deletions raw/esp32/Wemos_Teleinfo/cp2fs.be
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copy teleinfo driver to file system to be end user editable

# simple function to copy from autoconfig archive to filesystem
# return true if ok
def cp(from, to)
import path
if to == nil to = from end # to is optional
tasmota.log("OTA: copying "+tasmota.wd + to, 2)
if !path.exists(to)
try
# tasmota.log("f_in="+tasmota.wd + from)
var f_in = open(tasmota.wd + from)
var f_content = f_in.readbytes()
f_in.close()
var f_out = open(to, "w")
f_out.write(f_content)
f_out.close()
except .. as e,m
tasmota.log("OTA: Couldn't copy "+to+" "+e+" "+m,2)
return false
end
return true
end
return true
end

import path

# copy some samples files from autoconf
# to filesystem for end user speed up learn
cp("_autoexec.be", "autoexec.be")

# Done
23 changes: 13 additions & 10 deletions raw/esp32/Wemos_Teleinfo/init.bat
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
Br load("Wemos_Teleinfo.autoconf#cp2fs.be")
Template {"NAME":"Wemos Teleinfo","GPIO":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1376,1,1,640,608,5632,1,1,0,1,0,0,0,1,1,1,1,1,1,1,1,1],"FLAG":0,"BASE":1}
Module 0

; All these parameters are saved onto flash device
; so once configured, it's better to leave them in
; file init.bat
; only once when autoconf is activated or
; when it's removed and activated again
; ===================================================

; Set Teleinfo in legacy (historique) mode at 1200 baud.
EnergyConfig Historique
; Disable Boot Loop Detection
SetOption65 1

; Set Teleinfo in standard mode at 9600 baud.
; EnergyConfig Standard
; define OTA Url
OtaUrl https://github.com/NicolasBernaerts/tasmota/raw/master/teleinfo/binary/tasmota32-teleinfo.bin

; Enable sending of all frames in raw mode
EnergyConfig Full
; # Set auto timezone
Backlog0 Timezone 99; TimeStd 0,0,10,1,3,60; TimeDst 0,0,3,1,2,120

; Send only each 1 on 10 frames received
EnergyConfig Skip 9
; # Set Teleinfo in legacy (historique) mode at 1200 baud.
; EnergyConfig Historique

; # Set Teleinfo in stadard mode at 9600 baud.
; EnergyConfig Standard


Loading

0 comments on commit d6d7960

Please sign in to comment.