Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Unsolved
Collapse
Discussion Forum to share and further the development of home control and automation, independent of platforms.
  1. Home
  2. openLuup
  3. Plugins
  4. openLuup: Tasmota MQTT Bridge
openweather plugin ?
DesTD

Hey guys....

long time 😉

Since Dark weather is no more active, thanks Apple. Anyone switch to openweather to get weather data ?

Plugins
Openluup: Datayours
D

Hi akbooer,

I've an installation with a centralized openluup/DY on Debian 11 where're archived and consolidated several remote openluup/DY on RPI. I'm also using a user-defined (defined with your support) "DataUser.lua" to process metrics and creating different metric names. I've a schema of this configuration but I can't upload on forum.
I'd like to manage outage network connections between remote and centralized system while the remote DY is running and archives data locally.
I see the whisper-fill.py python routine (https://github.com/graphite-project/whisper/blob/master/bin/whisper-fill.py) from Graphite tool. I know that DY/whisper format is different from Graphite/whisper (CSV vs. binary packing), but based on your deep knowledge and experience is it hard to adapt the fill routine to DY/whisper format ?

tnks

donato

Plugins
openLuup: Shelly Bridge plugin
akbooerA

Feedback / solutions with openLuup's built-in Shelly bridge.

Plugins
zigbee2mqtt and openLuup
A

Been using zigbee2mqtt and openLuup for sometime now and it is working well.

I attempted to add another Hue switch to-day. It's a newer version of the other ones I have been using so far. They are pretty much identical.

The older ones installed no problem (which is weird), but the new one won't. Looking at the code, it looks this function in L_Zigbee2MQTTBridge.lua:

configure_scene_controller(dno)

is not being passed the parameter "dno" when the function is called. The device is created but is incomplete.

Just out of interest how do you pretty print to the log from within say L_Zigbee2MQTTBridge.lua? I tried a few incarnations such a:

local pretty = openLuup.loader.shared_environment.pretty

but they all failed.

Plugins
UPnP event proxy plugin using systemd service file
A

Originally I was using Futzle's UPnP event proxy plugin on Vera with the Sonos plugin. Worked very well.

On making the move to openLuup, one finds that the proxy can't be used because the proxy daemon start and stop, etc uses a script installed by the plugin that only works on openWRT, as used by Vera.

The Sonos plugin still works without the proxy but it reverts to polling. It becomes a bit on the sluggish side and sometimes doesn't function quite as intended.

I've modified the proxy plugin to install a script that runs as a systemd service. systemd can be found on a lot of contemporary Linux installs, including Raspberry Pis. To make use of; just install the plugin from the AltUI app store and restart the Luup engine a couple of times. The dashboard should indicate "Status: Proxy running".

Note that the service file expects "L_UPnPProxyDaemon.lua" to be located at the typical plugin files location:

/etc/cmh-ludl/

After the plugin is installed, the service file should be found in:

/etc/systemd/system/

as UPnPProxy.service.

If you use the Sonos plugin, you need to change the variable "UseProxy" to "1" and restart the LuupEngine. In the Sonos parent device, you should see: "Running x zones; proxy detected".

Updated doco here.

Hope it works - YMMV.

Plugins
Sonos system alerts truncated
A

Well pretty sure I didn't change or touch anything! I've turned everything on and off again as one might hope. Excepting a total reboot of the Pi3 that's running all my stuff very reliably in openLuup.

It's all been working well for years and now all of sudden 6 second alerts are truncated to about 4 seconds. Occasionally it works as it should. I see this in the log - does it help?

2023-02-20 09:39:06.662 luup_log:0: My Lua ver 0.50 debug: executing scene 63: "Check windows doors" in room: "Watchers" 2023-02-20 09:39:06.663 luup.call_action:: 217.urn:micasaverde-com:serviceId:Sonos1.Alert 2023-02-20 09:39:06.663 luup.call_action:: action will be handled by parent: 214 2023-02-20 09:39:06.663 luup_log:0: My Lua ver 0.50 debug: rest of scene 63 was executed 2023-02-20 09:39:06.663 luup.scenes:: scene 63, Check windows doors, initiated by AltUI 2023-02-20 09:39:06.665 luup_log:214: Sonos: Alert action on device 217 URI "http://redacted:3480/www/sounds/AllClosed.mp3" duration "6" 2023-02-20 09:39:06.758 luup_log:214: Sonos: UPnP_request (Pause, urn:schemas-upnp-org:service:AVTransport:1): status=1 statusMsg=500 result=[<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring>UPnPError</faultstring><detail><UPnPError xmlns="urn:schemas-upnp-org:control-1-0"><errorCode>701</errorCode></UPnPError></detail></s:Fault></s:Body></s:Envelope>] 2023-02-20 09:39:06.759 luup_log:214: stack traceback: ./L_SonosSystem1.lua:265: in function 'error' ./L_SonosUPnP.lua:289: in function <./L_SonosUPnP.lua:169> (tail call): ? ./L_SonosSystem1.lua:3390: in function 'sayOrAlert' ./L_SonosSystem1.lua:3452: in function 'queueAlert' ./L_SonosSystem1.lua:3843: in function <./L_SonosSystem1.lua:3839> (tail call): ? [C]: in function 'pcall' ./openLuup/scheduler.lua:204: in function 'context_switch' ./openLuup/scheduler.lua:366: in function 'dispatch' ./openLuup/scheduler.lua:588: in function 'task_callbacks' ./openLuup/scheduler.lua:699: in function 'start' openLuup/init.lua:354: in main chunk [C]: ? 2023-02-20 09:39:06.888 luup.variable_set:: 214.urn:toggledbits-com:serviceId:SonosSystem1.zoneInfo was: {"zones":{"RINCON_000E58DC7BBE01400":{"Location":"http://redacted3:1400/xml/device_description.xml","Group":"RIN... now: {"zones":{"RINCON_000E58DC7BBE01400":{"Location":"http://redacted3:1400/xml/device_description.xml","Group":"RIN... #hooks:0 2023-02-20 09:39:06.895 luup.variable_set:: 217.urn:upnp-org:serviceId:AVTransport.TransportState was: STOPPED now: TRANSITIONING #hooks:0 2023-02-20 09:39:06.901 luup.variable_set:: 217.urn:upnp-org:serviceId:AVTransport.CurrentPlayMode was: SHUFFLE_NOREPEAT now: NORMAL #hooks:0 2023-02-20 09:39:06.913 luup.variable_set:: 217.urn:upnp-org:serviceId:AVTransport.CurrentTransportActions was: Set, Stop, Pause, Play, X_DLNA_SeekTime, Next, X_DLNA_SeekTrackNr now: Set, Stop, Pause, Play, X_DLNA_SeekTime, X_DLNA_SeekTrackNr #hooks:0 2023-02-20 09:39:06.921 luup.variable_set:: 217.urn:upnp-org:serviceId:AVTransport.NumberOfTracks was: 10 now: 1 #hooks:0 2023-02-20 09:39:06.922 luup.variable_set:: 217.urn:upnp-org:serviceId:AVTransport.AVTransportURI was: x-rincon-queue:RINCON_000E58DC7BBE01400#0 now: http://redacted:3480/www/sounds/AllClosed.mp3 #hooks:0 2023-02-20 09:39:11.929 luup_log:214: Sonos: UPnP_request() "urn:schemas-upnp-org:service:AVTransport:1"#"GetPositionInfo" action took 5.0073010921478s (long) 2023-02-20 09:39:11.932 luup.variable_set:: 217.urn:upnp-org:serviceId:AVTransport.CurrentTrackDuration was: 0:02:22 now: 0:00:00 #hooks:0 2023-02-20 09:39:11.933 luup.variable_set:: 217.urn:upnp-org:serviceId:AVTransport.CurrentTrackURI was: x-file-cifs://ELEPHANT1/Multimedia/My%20Music/Music%20JP/The%20Smiths/The%20Queen%20Is%20Dead/08%20Vicar%20in%20a%2... now: http://redacted:3480/www/sounds/AllClosed.mp3 #hooks:0 2023-02-20 09:39:11.934 luup.variable_set:: 217.urn:upnp-org:serviceId:AVTransport.CurrentTrackMetaData was: <DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r... now: <DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r... #hooks:0 2023-02-20 09:39:11.936 luup.variable_set:: 217.urn:upnp-org:serviceId:AVTransport.CurrentStatus was: Vicar in a Tutu: (The Smiths, The Queen Is Dead) now: AllClosed.mp3 #hooks:0 2023-02-20 09:39:11.937 luup.variable_set:: 217.urn:upnp-org:serviceId:AVTransport.CurrentTitle was: Vicar in a Tutu now: AllClosed.mp3 #hooks:0 2023-02-20 09:39:11.937 luup.variable_set:: 217.urn:upnp-org:serviceId:AVTransport.CurrentArtist was: The Smiths now: #hooks:0 2023-02-20 09:39:11.938 luup.variable_set:: 217.urn:upnp-org:serviceId:AVTransport.CurrentAlbum was: The Queen Is Dead now: #hooks:0

Also see these:

2023-02-24 16:12:13.576 openLuup.server:: GET /www/sounds/YouRang.mp3 HTTP/1.1 tcp{client}: 0x17e96f0 2023-02-24 16:12:13.579 openLuup.server:: error 'closed' sending 43102 bytes to tcp{client}: 0x17e96f0

So any clues?

Plugins
Generic support for vacuums
therealdbT

I've got myself a nice Ecovacs Deebot 950, because one of the Roombas is getting really old (12 years and still going strong). It's my first one connected to WiFi, since the others are legacy. I've found a nice mqtt library and it's already pushing to my broker in real time, but I'm wondering if there's a generic device template and/or service, otherwise I'll start building one and I'll try to keep it as much generic as possible.

Plugins
Switchboard plugin
D

Hi,
I've installed switchboard plugin from openluup app store but I'm not sure which action to use to create a binary switch. I try "addswitch" action but I see the device only after using the "addchild" action too. is it correct ?

Attached the openluup device screen, the control switchboard and the actions i see.

tnks donato

switchboard_openluup_console.png

Plugins
Cannot publish new version in ALTAPP Store
M

Hi @akbooer,

I have an updated version of one of my plugins but I cannot publish it in the ALTApp Store. When I click publish it gets in a sort of loop of Refreshing Token.../Token refreshed. However, I never get to page to refresh the token.

Looking at the browser debug window I see this as the response to http://192.168.178.101:3480/data_request?id=lr_ALTUI_Handler&command=refresh_auth_token
{"error":{"code":400,"message":"Bad Request - invalid_grant","step":"Get access token from refresh token"}}

Running openLuup v21.7.25. Any suggestion?

Cheers Rene

Plugins
openLuup: UI Device / Tile Text
parkercP

Hi,

Sorry if I missed it but how do I update the .json file of my plugins so that I can make the text/content visible on the tile itself, via openLuup/ALTui dashboard ?

The same plugins on Vera show the content ?

BF995483-F9E0-4FCE-8EE6-AE56AFDEEA00.jpeg

Plugins
Reactor scope issues
B

Hi Patrick/AK Booer

I am able to see Reactor expressions in the AltUI UI per the below and the expressions work as they should in my reactor sensors. When an expression changes, the reactor sensor responds accordingly.

javascript.png

However, I cannot see the expressions in luup state variables or the luup logs:

Luup.png

Log.png

I tried reinstalling openLuup (latest development) and when that failed to change the noted behavior, I reinstalled lua5.1. There was also no change. Rebooting the machine also produced no change.
I suspect this is an openLuup issue as I also see nil values for some plugins:

plugin.png

And other plugins are fine:

2022-01-12 20:47:12.027 luup.variable_set:: 63.urn:upnp-micasaverde-com:serviceId:Weather1.CurrentDewPoint was: 32 now: 29.7 #hooks:0 2022-01-12 20:47:12.028 luup.variable_set:: 63.urn:upnp-micasaverde-com:serviceId:Weather1.WindSpeed was: 1.76 now: 2.8 #hooks:0 2022-01-12 20:47:12.028 luup.variable_set:: 63.urn:micasaverde-com:serviceId:HumiditySensor1.CurrentLevel was: 30 now: 27 #hooks:0 2022-01-12 20:47:12.028 luup.variable_set:: 65.urn:micasaverde-com:serviceId:HumiditySensor1.CurrentLevel was: 30 now: 27 #hooks:0 2022-01-12 20:47:12.028 luup.variable_set:: 63.urn:upnp-micasaverde-com:serviceId:Weather1.LastUpdate was: 1642047430 now: 1642049231 #hooks:0

Any ideas on how to troubleshoot this.....

Plugins
Virtual Devices Plug-in update (with async HTTP support)
therealdbT

I just published an update to my Virtual Devices Plug-in.

What's new in version 1.5:

support for async HTTP (out of the box on openluup, just download https://github.com/akbooer/openLuup/blob/master/openLuup/http_async.lua and copy with the plug-in files on Vera) experimental support for setpoints management in Virtual Heaters (you know, the device will turn itself off if temperature is reached, and automatically on when temperature is not beyond the setpoint) external device for temperature in Virtual Heaters (just set urn:bochicchio-com:serviceId:VirtualHeater1/TemperatureDevice variable) small fixes, stabilization

Grab your copy from https://github.com/dbochicchio/vera/tree/master/VirtualDevices

As always, 100% local, 100% apps friendly, 100% supported by Alexa (and Google Home, I guess).

Plugins
AltUI will not update under openLuup (Vera: not sure what it does)
A

This topic has come up before but I haven't seen an answer. Symptom: AltuUI says there is a new update available, so you tell it to do the update but the update does not happen. AltUI remains stuck on it's old version. On other occasions it works OK. So my version is:

AltUI v2.49.2546, © 2019

AltUI says this:

a newer version #2551 of ALTUI is available, do you want to upgrade ? add scrollable dialog for long boxes bugfix: clock display on safari remote url update ( @olov ) update jquery and bootstrap versions credential to camera device url ( @rafale77 ) ignore Ezlo hub ( @reneboer)

Track through the JavaScript and find that this issues the update command:

function _triggerAltUIUpgrade(newversion,newtracnum) { var url = '?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version={1}&TracRev={0}'.format(newversion,newtracnum); return _httpGet(url,{}).always( function() { PageMessage.message(_T("Upgrade Request succeeded, a Luup reload will happen"),"success"); }); };

And the url variable equals:

url: "?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version=40628&TracRev=2551"

All looks good so far. I manually issue the same url complete with my openLuup ip_address in a local browser. Update fails - looks like AltUI is doing as it should:

http://ip_address:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version=40628&TracRev=2551

In openLuup I see:

2021-12-06 13:56:14.821 luup_log:3: ALTUI: startupDeferred, called on behalf of device:3 2021-12-06 13:56:14.838 luup.variable_set:: 3.urn:upnp-org:serviceId:altui1.Version was: v2.49 now: v2.49 #hooks:0

And then later:

2021-12-06 13:55:58.256 openLuup.server:: GET /data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version=40628&TracRev=2551 HTTP/1.1 tcp{client}: 0x25712a8 2021-12-06 13:55:58.257 luup.call_action:: 0.urn:micasaverde-com:serviceId:HomeAutomationGateway1.CreatePlugin 2021-12-06 13:55:58.259 luup.call_action:: 4.urn:upnp-org:serviceId:AltAppStore1.update_plugin 2021-12-06 13:55:58.260 luup_log:4: AltAppStore : starting <run> phase... 2021-12-06 13:55:58.262 luup_log:4: AltAppStore : downloading amg0/ALTUI [2551] to trash/AltAppStore/ 2021-12-06 13:55:58.262 luup_log:4: AltAppStore : GitHub request: https://api.github.com/repos/amg0/ALTUI/contents?ref=2551 2021-12-06 13:55:58.760 luup_log:4: AltAppStore : GitHub request: https://api.github.com/repos/amg0/ALTUI/contents/blockly?ref=2551 2021-12-06 13:55:59.543 luup_log:4: AltAppStore : getting contents of version: 2551 2021-12-06 13:55:59.544 luup.variable_set:: 4.urn:upnp-org:serviceId:altui1.DisplayLine1 was: AltAppStore now: Downloading... #hooks:0 2021-12-06 13:55:59.544 luup.variable_set:: 4.urn:upnp-org:serviceId:altui1.DisplayLine2 was: now: Alternate UI #hooks:0 2021-12-06 13:55:59.544 luup_log:4: AltAppStore : scheduling <job> phase... 2021-12-06 13:55:59.544 openLuup.requests:: 2021-12-06 13:55:59.545 openLuup.server:: request completed (148 bytes, 1 chunks, 1288 ms) tcp{client}: 0x25712a8 2021-12-06 13:55:59.554 openLuup.server:: request completed (6233 bytes, 1 chunks, 16442 ms) tcp{client}: 0x255e680 2021-12-06 13:55:59.555 luup_log:4: AltAppStore : ...final <job> phase 2021-12-06 13:55:59.555 luup_log:4: AltAppStore : Total size 0.000 (kB) 2021-12-06 13:55:59.555 luup.variable_set:: 4.urn:upnp-org:serviceId:altui1.DisplayLine2 was: Alternate UI now: Alternate UI 100% #hooks:0 2021-12-06 13:55:59.555 luup_log:4: AltAppStore : updating icons in icons/ ... 2021-12-06 13:55:59.555 luup_log:4: AltAppStore : updating device files in ./ ... 2021-12-06 13:55:59.556 luup_log:4: AltAppStore : ... 0 icon files 2021-12-06 13:55:59.556 luup_log:4: AltAppStore : ... 0 device files 2021-12-06 13:55:59.556 luup_log:4: AltAppStore : Alternate UI update completed 2021-12-06 13:55:59.556 openLuup.luup:: device 4 'Alternate App Store' requesting reload 2021-12-06 13:55:59.556 luup.reload:: saving user_data 2021-12-06 13:56:00.262 openLuup.luup:: exiting with code 42 - after 0.3 hours

All looks OK. Then I check GitHub. It shows the latest changes to the version 2551. However this page says the latest version is 2550.

So I wondering what's going on. Seems the latest version number is not being picked by the installer? (not sure how it works.) Is it possible for openLuup to log a bit more about the version it's trying to install. As this call returns.

https://api.github.com/repos/amg0/ALTUI/contents?ref=2551 message "No commit found for the ref 2551" documentation_url "https://docs.github.com/v3/repos/contents/"

But this works fine:

https://api.github.com/repos/amg0/ALTUI/contents?ref=2550

So it looks like AMG0 doesn't always update the repository with whatever is needed to get this to work (I imagine that's easy to forget). But could openLuup send back a fail result to AltUI and AltUI pick that up? Currently it looks like AltUI always assumes everything went OK. Or somehow; could openLuup log and/or notify the user what went wrong?

Plugins
Reactor: double click action
R

Hi @toggledbits and others,

Could you help me out with the following use case? I have a z-wave module that doesn't have scene functionality, but I want to trigger a double click action on the switch.

What is the easiest way to do this in reactor? I'm struggling with this and I think I'm thinking too complex at this point.

Plugins
Virtual Pronto Remote plugin
A

Well, I disappeared down a rabbit hole on a different mission and resurfaced with this monstrosity.

What does it do?

It translates button functions for various (certainly not all) IRP protocols to Pronto codes. These can then be sent by a plugin that sends Pronto Codes to IR transmitters - such as the BroadLink Plugin or the GC100 Plugin (or similar).

The IRP protocol "Device", "Subdevice" and "Function" numbers are stored in a json file as buttons for "virtual remotes".

So you could have say three physical IR transmitters and want to command different AV devices (ie TVs, AVR, Xmas tree, etc) in the vicinity of those various IR emitters.

The button codes are far less cumbersome than heaps of pronto codes. You can set up a virtual remote for each AV device in the json file. Each physical emitter can be assigned to any virtual remote. And away you go!

Well - you already have a pile of pronto codes already running just fine? However, as the plugin "manufacturers" pronto codes, you could also use it to scan/search for functions for any AV device you may have. GitHub has an example for Pioneer: SearchForButtonCodes.lua

Read about the IRP protocol

Find "Device", "Subdevice" and "Function" codes:

IR database

Plugin details in:

GitHub

Install via AltUI:

Plugins available via AltUI

Version 0.51
Initial release.

Version 0.52
Add RC6 format: includes Windows Media Center based items eg Intel NUCs, Xboxes, Kodi, etc

Panasonic plasma TV json.jpg

Panasonic plasma TV web page.jpg

Plugins
openLuup: SmartSwitch plugin
akbooerA

This plugin was updated by @vosmont to run under openLuup (and possibly UI7.)

@DesT recently asked for a slight addition to its functionality, so I'm adding this thread to discuss the changes.

Plugins
Reactor icons for local lan
B

@toggledbits Hi Patrick. I had my internet go down for about 12 hours the other day, and that experience encouraged me to work on getting my HA off the cloud to the extent that I can. I have not converted my Veras to local devices yet, though after the next VeraPlus stable firmware release, I will probably run your scripts to localize the device as I don't see Ezlo surviving to maintain Vera firmware.

My question concerns the icons in your plugins. While attempting to mod a reactor sensor during the outage, I could not really do anything (without a sense of risk anyway) as the icons used are pulled from your website. Many Vera plugins operate this way--no doubt to save space on the vera, and my inclination was to manually start downloading what I needed when the outage was over. I run everything on openLuup and space is not an issue. It occurred to me that localizing a plugin could be a button push somewhere in the plugin UI where one could auto download any needed icons and the plugin would recognize the local copy first, before trying the cloud.

Could this be a possible enhancement to your plugins? I don't really have a technical grasp of whether this would be workable or not.

Plugins
openLuup: Tasmota MQTT Bridge
akbooerA

Feedback / solutions for openLuup's built-in Tasmota MQTT bridge.

Plugins
AltUi
C

I reinstalled the AltUi plugin on OpenLuup and I no longer access its web interface
I have the following error:
error in callback [lr_ALTUI_Handler]: ./dkjson.lua:397: bad argument # 1 to 'strfind' (string expected, got nil)
Can someone help me?
OpenLuup version 2021.05.08

Plugins
AltUI sort?
CatmanV2C

Am I losing it or did there used to be a sort either alphabetically or numerically option on devices in AltUI?

Seems to not be there there?

TIA

C

Plugins

openLuup: Tasmota MQTT Bridge

Scheduled Pinned Locked Moved Plugins
127 Posts 5 Posters 26.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ArcherS
    replied to ArcherS on last edited by
    #32

    I have now updated to v21.4.17 and also installed cjson.

    The cpu load on my test Pi went down from 10.5% to 4-4.5%, so that is a good step better.
    028a681d-78bd-4272-b1ce-1c9371b718d7-image.png

    The server has been running with my Zway bridge with 64 zNodes and 165 vDevs and five Tasmota devices.
    Data this morning after 2.5 days run time:

    bc93653b-66cf-4b4f-bade-9aeb4c6a7968-image.png I have added one more Tasmota device, in total 6 are now pushing data over Mqtt to OpenLuup.

    @akbooer what is changed in v21.4.17, I could not see any changes to be honest. 🙂

    What I did notice however was that the old error messages I posted above have disappeared. I will see if I get any new, so far I have not seen any.

    akbooerA 1 Reply Last reply
    0
    • akbooerA Offline
      akbooerA Offline
      akbooer
      replied to ArcherS on last edited by
      #33

      @archers said in openLuup: Tasmota MQTT Bridge:

      what is changed in v21.4.17

      Well, I think you answered your own question...

      @archers said in openLuup: Tasmota MQTT Bridge:

      the old error messages I posted above have disappeared

      😉

      A 1 Reply Last reply
      1
      • akbooerA Offline
        akbooerA Offline
        akbooer
        replied to Buxton on last edited by
        #34

        @buxton said in openLuup: Tasmota MQTT Bridge:

        You may need to decode a layer deeper for the "table" entries....

        Version 21.4.17c does just that (I hope.)

        Would be interesting in seeing the variables which result...

        1 Reply Last reply
        0
        • ElcidE Offline
          ElcidE Offline
          Elcid
          wrote on last edited by Elcid
          #35

          Just reporting that the variables in the tasmota devices are not updating correctly

          tasmota/tele	
          {"Time":"2021-04-17T19:28:59","Switch1":"ON"}
          

          The time stamp updates, but not the value of Switch1.
          [edit] after deleteing the 4 devices and reloading luup I found these errors in log

          2021-04-17 19:59:39.142   openLuup.server:: GET /data_request?id=lu_status2&output_format=json&DataVersion=685929357&Timeout=60&MinimumDelay=1500&_=1618685858944 HTTP/1.1 tcp{client}: 0xff56978
          2021-04-17 19:59:39.145   openLuup.mqtt:: localhost.bridge-01 SUBSCRIBE to # tcp{client}: 0xff593e0
          2021-04-17 19:59:39.147   luup.tasmota:47: JSON error: Expected value but found invalid token at character 1
          2021-04-17 19:59:39.148   luup.tasmota:47: JSON error: Expected value but found invalid token at character 1
          2021-04-17 19:59:39.153   luup.tasmota:47: JSON error: Expected value but found invalid token at character 1
          2021-04-17 19:59:39.154   luup.tasmota:47: JSON error: Expected value but found invalid token at character 1
          
          1 Reply Last reply
          0
          • A Offline
            A Offline
            ArcherS
            replied to akbooer on last edited by ArcherS
            #36

            @akbooer I have now discovered a few new error messages:

            2021-04-17 19:52:02.446   openLuup.io.server:: MQTT:1883 connection from 192.168.1.56 tcp{client}: 0x2654a78
            
            2021-04-17 19:52:02.464   luup.tasmota:14: JSON error: Expected value but found invalid token at character 1
            
            2021-04-17 19:52:02.477   openLuup.io.server:: MQTT:1883 connection closed  tcp{client}: 0x20aeec0
            
            2021-04-17 19:52:02.477   openLuup.mqtt:: RECEIVE ERROR: closed tcp{client}: 0x20aeec0
            
            2021-04-17 19:52:02.477   openLuup.mqtt:: TasmotaBLE UNSUBSCRIBE from cmnd/tasmotas/# tcp{client}: 0x20aeec0
            2021-04-17 19:52:02.478   openLuup.mqtt:: TasmotaBLE UNSUBSCRIBE from cmnd/TasmotaBLE/# tcp{client}: 0x20aeec0
            2021-04-17 19:52:02.478   openLuup.mqtt:: TasmotaBLE UNSUBSCRIBE from cmnd/TasmotaBLE_fb/# tcp{client}: 0x20aeec0
            2021-04-17 19:52:02.482   openLuup.mqtt:: TasmotaBLE SUBSCRIBE to cmnd/TasmotaBLE/# tcp{client}: 0x2654a78
            2021-04-17 19:52:02.561   openLuup.mqtt:: TasmotaBLE SUBSCRIBE to cmnd/tasmotas/# tcp{client}: 0x2654a78
            2021-04-17 19:52:02.859   openLuup.mqtt:: TasmotaBLE SUBSCRIBE to cmnd/TasmotaBLE_fb/# tcp{client}: 0x2654a78
            

            I seem to get it on an irregular basis now and then in the log.

            It is coming from my ESP32 Tasmota that has three BLE devices connected to it (device #20005). It typically sends the following every 5 minutes:

            tele/TasmotaBLE/SENSOR = {"Time":"2021-04-17T19:12:04","ATC-f159bf":{"Temperature":24.0,"Humidity":44.0,"DewPoint":11.0,"Battery":63,"RSSI":-84},"ATC-9446bf":{"Temperature":23.1,"Humidity":62.0,"DewPoint":15.4,"Battery":80,"RSSI":-82},"ATC-6d5d44":{"Temperature":14.8,"Humidity":43.0,"DewPoint":2.3,"Battery":54,"RSSI":-89},"TempUnit":"C"}
            

            I have seen in the log that the device works, i.e. the data for the three devices get updated between the errors.

            I tried to capture what is going on and I think it is the device restarting or something when the errors occur. I will check some more on that, perhaps to try and update to a newer firmware.

            At the time for the error I got the following in the Tasmota Console:

            19:50:09.833 MQT: tele/TasmotaBLE/INFO1 = {"Module":"ESP32-DevKit","Version":"9.2.0.3(tasmota)","FallbackTopic":"cmnd/TasmotaBLE_fb/","GroupTopic":"cmnd/tasmotas/"}
            19:50:09.841 MQT: tele/TasmotaBLE/INFO2 = {"WebServerMode":"Admin","Hostname":"TasmotaBLE-0476","IPAddress":"192.168.1.56"}
            19:50:09.852 MQT: tele/TasmotaBLE/INFO3 = {"RestartReason":"Software reset CPU"}
            19:50:10.911 QPC: Reset
            19:50:13.901 MQT: tele/TasmotaBLE/STATE = {"Time":"2021-04-17T19:50:13","Uptime":"0T00:00:10","UptimeSec":10,"Heap":110,"SleepMode":"Normal","Sleep":50,"LoadAvg":37,"MqttCount":1,"Wifi":{"AP":1,"SSId":"BeachAC","BSSId":"FC:EC:DA:D1:7A:64","Channel":11,"RSSI":86,"Signal":-57,"LinkCount":1,"Downtime":"0T00:00:04"}}
            19:50:13.924 MQT: tele/TasmotaBLE/SENSOR = {"Time":"2021-04-17T19:50:13","ATC-f159bf":{"Temperature":24.0,"Humidity":43.0,"DewPoint":10.6,"Battery":63,"RSSI":-81},"TempUnit":"C"}
            

            Maybee it is the OpenLuup Mqtt server reacting to the startup messages?

            Edit: Yes it is an error from when a Tasmota device starts, I restarted one of my other devices and got the same error in the log. It also recovered as it should after rebooted.

            2021-04-17 22:01:05.433   openLuup.io.server:: MQTT:1883 connection from 192.168.1.50 tcp{client}: 0x25fcc50
            
            2021-04-17 22:01:05.440   luup.tasmota:14: JSON error: Expected value but found invalid token at character 1
            
            2021-04-17 22:01:05.447   openLuup.mqtt:: TasmotaUterum SUBSCRIBE to cmnd/TasmotaUterum/# tcp{client}: 0x25fcc50
            2021-04-17 22:01:05.452   openLuup.mqtt:: TasmotaUterum SUBSCRIBE to cmnd/tasmotas/# tcp{client}: 0x25fcc50
            2021-04-17 22:01:05.454   openLuup.mqtt:: TasmotaUterum SUBSCRIBE to cmnd/TasmotaUterum_fb/# tcp{client}: 0x25fcc50
            2021-04-17 22:01:05.455   openLuup.io.server:: MQTT:1883 connection closed  tcp{client}: 0x24ae758
            
            2021-04-17 22:01:05.455   openLuup.mqtt:: RECEIVE ERROR: closed tcp{client}: 0x24ae758
            
            2021-04-17 22:01:05.456   openLuup.mqtt:: TasmotaUterum UNSUBSCRIBE from cmnd/TasmotaUterum/# tcp{client}: 0x24ae758
            2021-04-17 22:01:05.456   openLuup.mqtt:: TasmotaUterum UNSUBSCRIBE from cmnd/tasmotas/# tcp{client}: 0x24ae758
            2021-04-17 22:01:05.456   openLuup.mqtt:: TasmotaUterum UNSUBSCRIBE from cmnd/TasmotaUterum_fb/# tcp{client}: 0x24ae758
            
            1 Reply Last reply
            0
            • akbooerA Offline
              akbooerA Offline
              akbooer
              wrote on last edited by
              #37

              @ArcherS

              Version 21.4.17d adds an additional error message to see what is causing the JSON error. However, this should be totally recoverable, the message is simply ignored.

              B A 4 Replies Last reply
              0
              • B Offline
                B Offline
                Buxton
                replied to akbooer on last edited by
                #38

                @akbooer My log is much calmer with the oL update. Thanks for that. I still have the following error though:

                2021-04-17 13:41:37.079   luup.tasmota:262: JSON error: ?
                2021-04-17 13:41:37.080   luup.tasmota:262: Received message causing error was: Online
                

                This happens only on a LUUP reload. If I were to guess, the JSON decoder is seeing a single text string, so it doesn't/can't really decode, but throws an error instead. Maybe trap for strings before being sent to the decoder.... They are valid messages and should not throw receive errors or decode errors.

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  ArcherS
                  replied to akbooer on last edited by ArcherS
                  #39

                  @akbooer good to know it is recoverable, it seemed so also. I updated and will check the log and see what shows up. 🙂

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    Buxton
                    replied to akbooer on last edited by
                    #40

                    @akbooer And the below error is probably related to the string error:

                    2021-04-17 13:48:51.407   openLuup.context_switch::  ERROR: [dev #0] attempt to call a string value
                    2021-04-17 13:48:51.407   openLuup.mqtt:: ERROR publishing application message for mqtt:tele/power_BedroomTV/SENSOR : attempt to call a string value
                    
                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      Buxton
                      replied to akbooer on last edited by
                      #41

                      @akbooer The table level decode issue is a byproduct of the type of relay I'm using in the above examples.

                      This tasmota relay controls two separate outputs (switches), as well as an unlimited number of bluetooth sensors that see/connect to the relay. So for example, I placed the above mentioned relay behind a standard wall power outlet that has its two plug ports separated into two different circuits. One outlet of the relay controls the top plug and the other relay outlet controls the bottom.

                      This is not uncommon with the tasmota devices as I also have a four relay tasmota device that controls four different circuits of my landscape lights, though there is only a single device with a single IP address.

                      therealdbT 1 Reply Last reply
                      0
                      • therealdbT Offline
                        therealdbT Offline
                        therealdb
                        replied to Buxton on last edited by
                        #42

                        My devices seem to have been discovered OK, albeit as generic. I'm eager to help to map them to child devices. Even with different sensors, the variable name seems to be consistent.

                        Here's what I have:

                        • Temperature
                        • Humidity
                        • Distance
                        • DewPoint
                        • IR
                        • Illuminance
                        • Pressure
                        • Broadband (for light)

                        I think that if multiple are present, multiple child devices could be created. I could also help with code @akbooer if you need help.

                        --
                        On a mission to automate everything.

                        My MS Reactor contrib
                        My Luup Plug-ins

                        akbooerA 1 Reply Last reply
                        0
                        • akbooerA Offline
                          akbooerA Offline
                          akbooer
                          replied to therealdb on last edited by akbooer
                          #43

                          @therealdb said in openLuup: Tasmota MQTT Bridge:

                          I'm eager to help to map them to child devices.

                          Oh, I didn't think that was necessary since you made it so easy to create virtual devices? You want ALL the child devices to be separate? This could become messy.

                          A therealdbT 2 Replies Last reply
                          0
                          • A Offline
                            A Offline
                            ArcherS
                            replied to akbooer on last edited by ArcherS
                            #44

                            @akbooer I think it is quite good without the plugin creating a lot of child devices for Tasmota sensor devices.

                            Instead I create child devices myself with the excellent Virtual Sensor plugin for the ones I want (I typically do not want child devices for all the data from a Tasmota sensor). I then simply map each virtual sensor to the device and variable in the Virtual Sensor plugin:
                            a158bc49-6c34-4186-9d79-1bd27da553c6-image.png

                            Super easy and clean without any coding. 🙂

                            For Tasmota switches or similar where you typically want to send Mqtt data to the device it may be a bit different of course. I have not tested any of these yet. Perhaps the Mqtt addition to the Virtual Http plugin from @therealdb is the right path here? I have still to test this. 🙂
                            I have a Tasmota IR tranceiver that I will test for controlling my HVAC, but I have not come that far yet!

                            akbooerA 1 Reply Last reply
                            0
                            • akbooerA Offline
                              akbooerA Offline
                              akbooer
                              replied to ArcherS on last edited by akbooer
                              #45

                              @archers said in openLuup: Tasmota MQTT Bridge:

                              I typically do not want child devices for all the data from a Tasmota sensor

                              Yes, that would be my thinking too.

                              I went through the same issues when creating the Netatmo plugin, and the auto-creation of child devices made it overly complex, handling all the possible options. If I started again (and I may now make a simplified Netatmo 'bridge') I'd just leave that to manually created virtual sensors.

                              1 Reply Last reply
                              1
                              • therealdbT Offline
                                therealdbT Offline
                                therealdb
                                replied to akbooer on last edited by therealdb
                                #46

                                @akbooer if we want to make it user friendly, I think it’s the easiest thing to do. I could of course do it with my virtual plugin in a future update if you think it’d be better to leave it to each setup.

                                EDIT: or just don’t implement it, since I forgot about virtual sensor. Ok, I think we’re covered now.

                                --
                                On a mission to automate everything.

                                My MS Reactor contrib
                                My Luup Plug-ins

                                1 Reply Last reply
                                1
                                • A Offline
                                  A Offline
                                  ArcherS
                                  replied to akbooer on last edited by ArcherS
                                  #47

                                  Thought it could be good for future users to give a short write up on how to set up Tasmota devices reporting sensors into OpenLuup with the new Tasmota bridge.

                                  First setup the Tasmota device:
                                  Browse to the Tasmota device IP and then select "Configuration"
                                  5037d753-42b7-4014-a4d9-1fd120adfcbb-image.png Go into Configuration Other
                                  Make sure "Mqtt enable" is set and give a Device Name
                                  61776069-bf6e-4d2d-b9a5-95451c08b62c-image.png Then into Configuration MQTT
                                  Give IP adress and port of OpenLuup Mqtt server
                                  Give a Client name
                                  Set user and password
                                  Set topic name
                                  701d2925-8897-4a7b-8bac-55f13654213b-image.png

                                  If you want to change how often the Tasmota device pushes data over Mqtt you can do that in the Console for the Tasmota by using the "TelePeriod" command. By default TelePeriod is set to 300 seconds, e.g. "TelePeriod 60" sets it to once every minute. (Just typing "TelePeriod" shows the current value.)

                                  Second set up OpenLuup:
                                  Paste the following into Lua Startup:

                                  luup.attr_set ("openLuup.MQTT.Port", 1883)
                                  luup.attr_set ("openLuup.MQTT.Username", "luup")
                                  luup.attr_set ("openLuup.MQTT.Password", "password")
                                  luup.attr_set ("openLuup.MQTT.PublishVariableUpdates", true) -- Not requred for Tasmota, publish every variable update if wanted
                                  

                                  Save and reload Luup engine, you should now get the Tasmota bridge in OpenLuup
                                  218be9a6-ec10-471a-8e96-65e2462e2d5c-image.png

                                  You should also get the Tasmota device you setup above
                                  9eb70057-37e2-4f77-a4c1-2dc5462d5840-image.png On my OpenLuup it got placed in the room "Tasmota".

                                  Next step is to set up devices for the sensor data you want to get from the Tasmota device. This data is pushed into variables for the Tasmota device (if you hover above a variable name you see the sensor, e.g. "BME280"):
                                  47c8cd4f-bd2d-499c-86db-0903c792c753-image.png

                                  Download the plugin "Virtual Sensor" if you do not have it.
                                  099ba5c9-a5f5-4200-ba6e-5f8d32021544-image.png Go into Virtual Sensors, tab "Virtual Sensors" and create the new virtual sensors you need for the data you want to display from the Tasmota device, you want one virtual sensor per value.
                                  4deddfff-45bf-4af5-9379-1f45a1ab6644-image.png

                                  Next step is to set the data from the Tasmota variables to the corresponding virtual sensors.
                                  Go into the Virtual Sensor plugin, into the tab "Virtual Sensors"
                                  Select the Tasmota device in the first drop down and then the variable in the second:

                                  6ba15680-9d35-41bb-a2e2-df5d85115094-image.png

                                  Job done! Now repeat for all the variables you wish to add into OpenLuup. 🙂

                                  1 Reply Last reply
                                  3
                                  • akbooerA Offline
                                    akbooerA Offline
                                    akbooer
                                    wrote on last edited by
                                    #48

                                    @ArcherS

                                    That’s great, thanks on behalf of all future users!

                                    AFAIK, you don’t need to enable the PublishVariableUpdates MQTT option in order for the Tasmota bridge to work (since it is, itself, only one-way) although you may need it for other purposes.

                                    A therealdbT 2 Replies Last reply
                                    0
                                    • A Offline
                                      A Offline
                                      ArcherS
                                      replied to akbooer on last edited by
                                      #49

                                      @akbooer said in openLuup: Tasmota MQTT Bridge:

                                      AFAIK, you don’t need to enable the PublishVariableUpdates MQTT option in order for the Tasmota bridge to work (since it is, itself, only one-way) although you may need it for other purposes.

                                      You are of course correct! 🙂 I edited the remark for that line in the example above.
                                      By the way, I have tested this enabled and not enabled on my test Pi and it does not affect the cpu load as far as I could see. It stayed at 4-4.5% in both cases.

                                      1 Reply Last reply
                                      0
                                      • akbooerA Offline
                                        akbooerA Offline
                                        akbooer
                                        wrote on last edited by
                                        #50

                                        I’m missing a suitable icon for all the generic Tasmota devices. I found (I hope) the right one for the bridge, but need something different for devices. Any suggestions?

                                        1 Reply Last reply
                                        0
                                        • therealdbT Offline
                                          therealdbT Offline
                                          therealdb
                                          replied to akbooer on last edited by
                                          #51

                                          @akbooer speaking of this, are you ok if I release a simple plugin to push data from Veras to openluup UDP? I have one in my system and it’s working flawlessly. I could port it easily. I just need a flag to disable polling from VeraBridge. It’s ok to call Vera’s endpoint to update status.

                                          --
                                          On a mission to automate everything.

                                          My MS Reactor contrib
                                          My Luup Plug-ins

                                          1 Reply Last reply
                                          0

                                          Recent Topics

                                          • Disaster recovery and virtualisation
                                            CatmanV2C
                                            CatmanV2
                                            0
                                            5
                                            574

                                          • Remote access of Zwave stick from Z-wave server
                                            CatmanV2C
                                            CatmanV2
                                            0
                                            3
                                            298

                                          • Organizing/ structuring rule sets and rules
                                            G
                                            gwp1
                                            0
                                            5
                                            348

                                          • Moving MSR from a QNAP container to RP 5 - some issues
                                            G
                                            gwp1
                                            0
                                            5
                                            293

                                          • Widget deletion does not work and landing page (status) is empy
                                            G
                                            gwp1
                                            0
                                            4
                                            263

                                          • Need help reducing false positive notifications
                                            T
                                            tamorgen
                                            0
                                            7
                                            456

                                          • Reactor (Multi-System/Multi-Hub) Announcements
                                            toggledbitsT
                                            toggledbits
                                            5
                                            120
                                            35.1k

                                          • Deleting widgets
                                            toggledbitsT
                                            toggledbits
                                            0
                                            4
                                            440

                                          • MQTT configuration question
                                            tunnusT
                                            tunnus
                                            0
                                            11
                                            591

                                          • System Configuration Check - time is offset
                                            G
                                            gwp1
                                            0
                                            8
                                            588
                                          Powered by NodeBB | Contributors
                                          Hosted freely by 10RUPTiV - Solutions Technologiques | Contact us
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Unsolved