Re: [mh] The Post Insteon World
H Plato <[email protected]> Sun, 18 Sep 2022 13:44:38 -0600
| Newsgroups | gmane.comp.misc.misterhouse.user |
|---|---|
| Message-ID | <[email protected]> |
I made a change to my Tasmota_HTTP_Item.pm and moved the:
use RRD::Simple;
use RRDs;
to the if block:
if ($self->{RRD}) {
use RRD::Simple;
use RRDs;
Hopefully this will work for an non-RRD enabled system that doesn’t care about the power graphing.
Looking at my devices, here are the rules from the console output:
rule0
20:38:27 RSL: stat/tasmota_9E60E3/RESULT = {"Rule1":"ON","Once":"OFF","StopOnError":"OFF","Length":120,"Free":391,"Rules":"ON Rules#Timer=1 DO BACKLOG WebSend [192.168.0.1:803] /SUB%3Btasmota_push(hb); RuleTimer1 10 ENDON Rule1 4 RuleTimer 10"}
20:38:27 RSL: stat/tasmota_9E60E3/RESULT = {"Rule2":"ON","Once":"OFF","StopOnError":"OFF","Length":84,"Free":427,"Rules":"ON Power1#State DO WebSend [192.168.0.1:803] /SUB;tasmota_push(state,%value%) ENDON"}
20:38:27 RSL: stat/tasmota_9E60E3/RESULT = {"Rule3":"ON","Once":"OFF","StopOnError":"OFF","Length":359,"Free":152,"Rules":"ON Energy#Power DO VAR1 %value% ENDON ON Energy#Current DO VAR2 %value% ENDON ON Margins#PowerDelta DO BACKLOG VAR3 1; RuleTimer2 1 ENDON ON VAR3#State > 6 0 DO BACKLOG RuleTimer2 0 ; VAR3 0 ENDON ON Rules#Timer=2 DO BACKLOG WebSend [192.168.0.51:803] /SUB%3Btasmota_push(power,%var1%,%var2%); RuleTimer2 1; ADD3 1 ENDON PowerDelta 10 VAR3 0”}
Right now I have 3 S31s, one to monitor the power usage of my freezer, and another that has a USB adapter to provide power to a Displayport coupler, that occasionally needs to be reset. I find one of them to be a bit flakey, occasionally I can’t ping it then it comes back to life.This could be any number of things though. I’m running 9.2.0 on all three of them.
> On Jul 27, 2022, at 5:15 PM, Bruce Schaeffer <[email protected]> wrote:
>
> I found that in addition to "Rule1 4", it's necessary to also use "Rule1 1". This starts it up.
>
> I'm now seeing the WebSends in the console and in the MH print log. Unfortunately, the one S31 I have already deployed, while it's able to get commands over my wifi, is generating failures when trying to send the heartbeat. While I do more research on that (could be an issue with my wifi), I find that if I configure "sync", it seems to be reliable. So for now, that's how I'll keep it.
>
> I have another S31 configured, so I'll be deploying it somewhere soon.
>
> In your environment (I know you're away, but maybe get back to me when you return), what are you using Tasmota on for other types of devices, such as wall switches, an S31-type outlet that also dims, maybe something with a small buzzer. When the Insteon company went out of business, my plan was to replace my Insteon environment. I know the company came back, but until I have another PLM in hand, I'm still vulnerable.
>
> Thanks,
> Bruce
>
>
>
> On Mon, Jul 25, 2022 at 10:30 AM H Plato <[email protected] <mailto:[email protected]>> wrote:
> I’m away from my house so doing this from memory — if you go onto the tasmota device and the console, you should see the rules trigger. I can dig into this a bit more in August and update the module with the RRD option. Be good to get your feedback and suggestions so the module documentation can be improved!
>
> the direct mode is a lot simpler and works really well. Loop pauses are (in my opinion) the biggest weakness of MH, so I’ve been working to move all my modules that use http calls to the process_item approach.
>
>> On Jul 24, 2022, at 10:10 PM, Bruce Schaeffer <[email protected] <mailto:[email protected]>> wrote:
>>
>> I set the two rules per the Tasmota...pm file. I haven't figured out how to prove that the rules are doing something.
>>
>> On Sun, Jul 24, 2022, 22:32 H Plato <[email protected] <mailto:[email protected]>> wrote:
>> Do you have the heartbeat rule set up on the sonoff device?
>>
>>> On Jul 24, 2022, at 9:26 PM, Bruce Schaeffer <[email protected] <mailto:[email protected]>> wrote:
>>>
>>> Also, I can't get the heartbeat to work so for now I'm running nohb.
>>>
>>> On Sun, Jul 24, 2022, 22:23 Bruce Schaeffer <[email protected] <mailto:[email protected]>> wrote:
>>> I found that without "sync" MH wouldn't send commands. Any ideas how to diagnose why I need "sync"?
>>>
>>> Thanks,
>>> Bruce
>>>
>>> On Sun, Jul 24, 2022, 22:13 H Plato <[email protected] <mailto:[email protected]>> wrote:
>>> The RRDs is probably my fault. I added in the ability to graph power usage of the S31s through the web interface. I’ll make a note to make that a config.ini parameter so it defaults off.
>>>
>>> the sync option does a direct call to the device, so if one is offline there may be pauses. I use async, and haven’t had any issues, but haven’t done extensive testing.
>>>
>>>> On Jul 24, 2022, at 2:38 PM, Bruce Schaeffer <[email protected] <mailto:[email protected]>> wrote:
>>>>
>>>> Finally success!
>>>>
>>>> I had to comment out two "use" statements in "Tasmota_HTTP_Item.pm": "use RRD::Simple;" and "use RRDs;".
>>>>
>>>> In "items.mht", I had to add options "debug" and "sync" to the "TASMOTA_HTTP_SWITCH" line.
>>>>
>>>> I added Rule1 and Rule2 per the comments in "Tasmota_HTTP_Item.pm" to the Sonoff S31.
>>>>
>>>> It now appears to be working. I had bought two so I'm going to start on the second. After that, I'll be looking for light switches. Someone suggested Martin Jerry, so I'll be looking there next.
>>>>
>>>> At some point, I'm going to want to switch from HTTP access to MQTT access.
>>>>
>>>> Thanks,
>>>> Bruce
>>>>
>>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon> Virus-free. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link> <>
>>>> On Mon, Jul 4, 2022 at 5:47 PM Bruce Schaeffer <[email protected] <mailto:[email protected]>> wrote:
>>>> That didn't seem to help. I know that MH modifies @INC so testing from the command line won't know about MH's modifications. Here's what I got when I tried it from the command line.
>>>>
>>>> misterhouse@raspberrypi:/var/local/misterhouse/prod $ cd /usr/local/misterhouse/lib
>>>> misterhouse@raspberrypi:/usr/local/misterhouse/lib $ ls -l Tasmota_HTTP_Item.pm
>>>> -rwxr-xr-x 1 misterhouse misterhouse 25149 Jul 4 17:25 Tasmota_HTTP_Item.pm
>>>> misterhouse@raspberrypi:/usr/local/misterhouse/lib $ ls -l Generic_Item.pm
>>>> -rw-r--r-- 1 misterhouse misterhouse 63266 Jul 4 17:25 Generic_Item.pm
>>>> misterhouse@raspberrypi:/usr/local/misterhouse/lib $ perl Tasmota_HTTP_Item.pm
>>>> Can't locate Generic_Item.pm in @INC (you may need to install the Generic_Item module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/arm-linux-gnueabihf/perl5/5.28 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base) at /usr/share/perl/5.28/parent.pm <http://parent.pm/> line 16.
>>>> BEGIN failed--compilation aborted at Tasmota_HTTP_Item.pm line 98.
>>>> misterhouse@raspberrypi:/usr/local/misterhouse/lib $
>>>>
>>>> Has anyone else run into these problems while implementing Tasmota?
>>>>
>>>> Thanks,
>>>> Bruce
>>>>
>>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon> Virus-free. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link> <>
>>>> On Fri, Jul 1, 2022 at 11:03 AM Dave Neudoerffer <[email protected] <mailto:[email protected]>> wrote:
>>>> Try running 'perl Tasmota_HTTP_item.pm'. You are probably missing a required perl package.
>>>>
>>>> On Fri, Jul 1, 2022, 10:43 AM Bruce Schaeffer <[email protected] <mailto:[email protected]>> wrote:
>>>> I now have the "master" branch installed. It's still not recognizing the Tasmota device. I think I have identified the statement that isn't working, but don't know why.
>>>>
>>>> In "read_table_A.pl", is this section:
>>>> elsif ( $type eq "TASMOTA_HTTP_SWITCH" ) {
>>>> print_log "read_table_A.pl: Type is TASMOTA_HTTP_SWITCH\n";
>>>> print_log "Tasmota 00\n";
>>>> require Tasmota_HTTP_Item;
>>>> print_log "Tasmota 01\n";
>>>> my ( $output );
>>>> ( $address, $name, $output, $grouplist, @other ) = @item_info;
>>>> $other = join ',', @other ; # Quote data
>>>> $other =~ s/^[\'\"]//; #strip out quotes in case they are included
>>>> $other =~ s/[\'\"]$//;
>>>> $object = "Tasmota_HTTP::Switch('$address', '$output', '$other')";
>>>> print_log "read_table_A.pl Tasmota: object = |$object|\n";
>>>>
>>>>
>>>> I added the two "print_log" statements. When I restart MH, it prints the "00" statement, but doesn't print the "01". I put two equivalent statements around the Insteon code and it prints both of them.
>>>>
>>>> From what I can tell, it means that it's not able to either find or execute "Tasmota_HTTP_Item", but I don't know why. I tried commenting out the "requires" line. When I did, I saw both the "00" and "01" lines and the code continued, but then it displayed "Evaluating user code" and sat forever (at least 5 minutes) before I gave up.
>>>>
>>>> I thought about adding "print_log" statements directly into "Tasmota_HTTP_Item.pm", but I'm not familiar with Perl packages.
>>>>
>>>> In Powershell, it's possible to configure a setting where it shows each statement as it's executing it. Is there something the same that I can set to see what's going on in Perl?
>>>>
>>>>
>>>> Thanks, as always.
>>>> Bruce
>>>>
>>>> On Fri, Jun 24, 2022 at 12:50 PM Bruce Schaeffer <[email protected] <mailto:[email protected]>> wrote:
>>>> I have successfully flashed a Sonoff S31 with Tasmota 12.0.2. I am able to control it locally via http. Now I want to incorporate it into misterhouse. I don't think my current installation has the features for http and mqtt access. I'm not sure how to report what my current version is, although the file VERSION contains"5.0".
>>>>
>>>> Looking through my notes, I believe I followed ( https://github.com/hollie/misterhouse/wiki/Contributing#user_access <https://github.com/hollie/misterhouse/wiki/Contributing#user_access> ) to manually copy the "stable" branch when I first installed misterhouse.
>>>>
>>>> - Since it has been a while, how do I update what I currently have?
>>>> - Should I update more frequently than "when I need a new feature"?
>>>> - If I update to the current "stable" branch as described, will my installation have the necessary features to be able to use http and mqtt, per ( https://github.com/hollie/misterhouse/wiki/Tasmota#controlling-tasmota-from-misterhouse-using-http <https://github.com/hollie/misterhouse/wiki/Tasmota#controlling-tasmota-from-misterhouse-using-http> ) and ( https://github.com/hollie/misterhouse/wiki/Tasmota#controlling-tasmota-from-misterhouse-using-mqtt <https://github.com/hollie/misterhouse/wiki/Tasmota#controlling-tasmota-from-misterhouse-using-mqtt> )?
>>>> - I see references in the documentation to a branch named "master".
>>>> - Should I remain with "stable" or change to "master"? How do I do that? Is there a reason NOT to move to "master"?
>>>>
>>>> Thanks,
>>>> Bruce
>>>>
>>>>
>>>> On Fri, Jun 17, 2022 at 10:07 AM Bruce Schaeffer <[email protected] <mailto:[email protected]>> wrote:
>>>> Thanks to all for your ideas on how to move away from Insteon/X10 and suggestions for a replacement environment.
>>>>
>>>> I have found numerous articles and YouTubes regarding Tasmota. A few articles (I didn't keep the references - I should have) seem to say that some devices that used to be able to be reflashed with Tasmota are no longer able to due to changes on the device's chip set. I'm looking for your opinions.
>>>>
>>>> As far as device replacements, I have found the Sonoff S31 (ASIN B08GKGS197) so I bought one. Along with that purchase, I bought a Moyina FT232 (ASIN B075N82CD) and Goupchn Mini Grabber Test Hooks (ASIN B08M5Z5YF) [to avoid soldering].My plan is to reflash the S31 with Tasmota and start playing with it.
>>>>
>>>> The Sonoff S31 appears to be a direct replacement for the Insteon On/Off Module 2635-222 and Insteon ApplianceLinc 2456S3.
>>>>
>>>> I also have the following Insteon modules. What devices are suitable substitutes?
>>>> - SwitchLinc 2477S Wall Switch
>>>> - SwitchLinc 2466SW Wall Switch
>>>> - SwitchLinc 2474DWH Wall Switch [this is being used where there is no neutral wire available]
>>>> - LampLinc Dimmer 2457D2 [similar to On/Off Module 2635-222, but dims via a triac]
>>>>
>>>> Now for the Misterhouse part. I have read ( https://github.com/hollie/misterhouse/wiki/Tasmota <https://github.com/hollie/misterhouse/wiki/Tasmota> ) and have a question about the MHT file. The article gives two examples, TASMOTA_HTTP_SWITCH and TASMOTA_HTTP_FAN. What other Tasmota device types are there and how are they coded in the MHT file?
>>>>
>>>> It appears that I can command devices from Misterhouse via either HTTP or MQTT.
>>>> - What are the advantages of one over the other?
>>>> - Can the environment be mixed where some devices are commanded via HTTP and some via MQTT? Why would I want to do this?
>>>> - Can HTTPS be used rather than HTTP?
>>>> - Is there a secure implementation of MQTT? Can it be used?
>>>> - The article mentions a MQTT broker for the Raspberry PI (mine is a 4) called "Mosquitto". I may start with HTTP and move to MQTT based on your suggestions.
>>>>
>>>> The Sonoff S31 has power monitoring capabilities (as opposed to the S31 Lite). Can I get this information into Misterhouse so it can make decisions based on power usage?
>>>>
>>>> Your ideas and experiences are always valued.
>>>>
>>>> Thanks,
>>>> Bruce
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon> Virus-free. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link> <>
>>>> On Sun, May 15, 2022 at 12:17 PM Bruce Schaeffer <[email protected] <mailto:[email protected]>> wrote:
>>>> I'm looking for suggestions on how to move forward in a "post Insteon" world.
>>>>
>>>> My own environment is a Raspberry Pi connected to a PowerLinc 2413U running Misterhouse. The end devices are a mix of Insteon with X10 controllers. I "translate" X10 signals to Insteon commands within MH.
>>>>
>>>> The PLM and Raspberry PI are less than a year old. I had plans to purchase a backup PLM, but it didn't happen. I see now it's no longer an option.
>>>>
>>>> I would like to migrate from Insteon (and maybe X10) to something that is more modern; keeping MH on the Pi as the main "server". My MH programming has more than 20 years of effort.
>>>>
>>>> I have read that MH is able to utilize technologies other than X10 and Insteon.
>>>>
>>>> What direction are you folks leaning towards that is able to be controlled with MH and is still in business?
>>>>
>>>> Please include hardware requirements for each suggested protocol so I can begin working on a budget. If your suggestion is also able to run Insteon devices, all the better. I don't expect that to be the case since the Insteon protocol was proprietary.
>>>>
>>>> The optimum situation would be for me to first purchase whatever controller is needed for the new protocol (the device that would eventually replace the Insteon PLM), get it talking to MH. I'd like to think that MH would be able to talk to both PLMs. Then I'd start purchasing end devices that would replace my existing Insteon end devices.
>>>>
>>>> Your suggestions would be very welcome.
>>>>
>>>> Thanks,
>>>> Bruce
>>>> ________________________________________________________
>>>> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users <https://lists.sourceforge.net/lists/listinfo/misterhouse-users>
>>>>
>>>> ________________________________________________________
>>>> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users <https://lists.sourceforge.net/lists/listinfo/misterhouse-users>
>>>>
>>>
>>
>
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users